From 542f08c0a8401e3e7e743d343494d3909bafac92 Mon Sep 17 00:00:00 2001 From: AndyChen1024 Date: Tue, 15 Sep 2026 14:35:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=8D=A0=E4=BD=8D=E7=BB=84=E4=BB=B6=20LoggedOutView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/CoreUI/LoggedOutView.swift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 IosClientKit/Sources/CoreUI/LoggedOutView.swift diff --git a/IosClientKit/Sources/CoreUI/LoggedOutView.swift b/IosClientKit/Sources/CoreUI/LoggedOutView.swift new file mode 100644 index 0000000..1513ab4 --- /dev/null +++ b/IosClientKit/Sources/CoreUI/LoggedOutView.swift @@ -0,0 +1,20 @@ +import SwiftUI + +/// 未登录占位视图(打卡/计划/我的页复用)。 +public struct LoggedOutView: View { + private let onNavigateToAuth: () -> Void + + public init(onNavigateToAuth: @escaping () -> Void) { + self.onNavigateToAuth = onNavigateToAuth + } + + public var body: some View { + ContentUnavailableView { + Label("未登录", systemImage: "lock") + } description: { + Text("登录后即可查看") + } actions: { + Button("去登录", action: onNavigateToAuth) + } + } +}