Wire home routing for album_list and album_trailer, add a DEBUG home menu preview in Profile, and expand Assets tests. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
877 B
Swift
39 lines
877 B
Swift
//
|
||
// ProfileRoute.swift
|
||
// suixinkan
|
||
//
|
||
// Created by Codex on 2026/6/22.
|
||
//
|
||
|
||
import SwiftUI
|
||
|
||
/// 个人中心二级页面路由,集中声明“我的”Tab 可以 push 的页面。
|
||
enum ProfileRoute: Hashable {
|
||
case accountSwitch
|
||
case realNameAuth
|
||
case settings
|
||
case agreement(AgreementPage)
|
||
#if DEBUG
|
||
case debugHomeMenus
|
||
#endif
|
||
|
||
/// 构建个人中心路由对应的 SwiftUI 目标页面。
|
||
@ViewBuilder
|
||
var destinationView: some View {
|
||
switch self {
|
||
case .accountSwitch:
|
||
AccountSwitchView()
|
||
case .realNameAuth:
|
||
RealNameAuthView()
|
||
case .settings:
|
||
SettingsCenterView()
|
||
case .agreement(let page):
|
||
AgreementView(page: page)
|
||
#if DEBUG
|
||
case .debugHomeMenus:
|
||
DebugHomeMenuPreviewView()
|
||
#endif
|
||
}
|
||
}
|
||
}
|