feat: 新增未登录占位组件 LoggedOutView

This commit is contained in:
AndyChen1024
2026-09-15 14:35:52 +08:00
parent c39a324534
commit 542f08c0a8

View File

@@ -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)
}
}
}