feat: 设置页面
This commit is contained in:
parent
b7b093866b
commit
2f0d487dc4
5
wake/Assets/Svg/Box.svg
Normal file
5
wake/Assets/Svg/Box.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16.6667 5H3.33333C2.8731 5 2.5 5.3731 2.5 5.83333V16.6667C2.5 17.1269 2.8731 17.5 3.33333 17.5H16.6667C17.1269 17.5 17.5 17.1269 17.5 16.6667V5.83333C17.5 5.3731 17.1269 5 16.6667 5Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||||
|
<path d="M7.479 10.0034H12.479" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M2.5 5.41683L5.41667 2.0835H14.5833L17.5 5.41683" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 626 B |
5
wake/Assets/Svg/Memory.svg
Normal file
5
wake/Assets/Svg/Memory.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16.25 2.5H3.75C3.05965 2.5 2.5 3.05965 2.5 3.75V16.25C2.5 16.9404 3.05965 17.5 3.75 17.5H16.25C16.9404 17.5 17.5 16.9404 17.5 16.25V3.75C17.5 3.05965 16.9404 2.5 16.25 2.5Z" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M7.49996 9.58317C8.65054 9.58317 9.58329 8.65042 9.58329 7.49984C9.58329 6.34925 8.65054 5.4165 7.49996 5.4165C6.34938 5.4165 5.41663 6.34925 5.41663 7.49984C5.41663 8.65042 6.34938 9.58317 7.49996 9.58317Z" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M17.5 15.0002L12.9167 10.8335L8.75 14.5835L5.83333 12.0835L2.5 14.5835" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 846 B |
14
wake/Assets/Svg/Pioneer.svg
Normal file
14
wake/Assets/Svg/Pioneer.svg
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<svg width="274" height="120" viewBox="0 0 274 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M18 120H256C265.941 120 274 111.941 274 102V60.6067C274 50.6656 265.941 42.6067 256 42.6067H226.773C221.12 42.6067 215.795 39.9507 212.394 35.4346L197.136 15.1722C193.735 10.656 188.41 8 182.757 8H18C8.05887 8 0 16.0589 0 26V102C0 111.941 8.05888 120 18 120Z" fill="#FFB645"/>
|
||||||
|
<rect x="203.396" width="54.9113" height="54.9113" rx="27.4556" transform="rotate(13.0475 203.396 0)" fill="black"/>
|
||||||
|
<path d="M227.444 17.8455L235.272 43.5257L209.119 37.4648L227.444 17.8455Z" fill="#D9D9D9"/>
|
||||||
|
<path d="M13.4714 27.032C13.9079 27.032 14.2938 26.7489 14.4247 26.3326L17.2577 17.3222C17.4603 16.6778 16.9786 16.0216 16.303 16.0216L12.1813 16.0216C11.7444 16.0216 11.3583 16.3052 11.2278 16.7221L8.40683 25.7324C8.20516 26.3766 8.68677 27.0319 9.36191 27.0319L13.4714 27.032Z" fill="black"/>
|
||||||
|
<path d="M52.1379 27.032C52.5744 27.032 52.9603 26.7489 53.0912 26.3326L55.9242 17.3222C56.1269 16.6778 55.6452 16.0216 54.9695 16.0216L50.8478 16.0216C50.4109 16.0216 50.0248 16.3052 49.8943 16.7221L47.0733 25.7324C46.8717 26.3766 47.3533 27.0319 48.0284 27.0319L52.1379 27.032Z" fill="black"/>
|
||||||
|
<path d="M23.1382 27.031C23.5747 27.0311 23.9605 26.748 24.0914 26.3317L26.9245 17.3212C27.1271 16.6768 26.6454 16.0206 25.9697 16.0206L21.8481 16.0206C21.4112 16.0206 21.025 16.3043 20.8945 16.7211L18.0736 25.7315C17.8719 26.3756 18.3535 27.0309 19.0287 27.0309L23.1382 27.031Z" fill="black"/>
|
||||||
|
<path d="M42.4714 27.031C42.9079 27.0311 43.2938 26.748 43.4247 26.3317L46.2577 17.3212C46.4603 16.6768 45.9786 16.0206 45.303 16.0206L41.1813 16.0206C40.7444 16.0206 40.3583 16.3043 40.2278 16.7211L37.4068 25.7315C37.2052 26.3756 37.6868 27.0309 38.3619 27.0309L42.4714 27.031Z" fill="black"/>
|
||||||
|
<path d="M32.8049 27.031C33.2414 27.0311 33.6273 26.748 33.7582 26.3317L36.5912 17.3212C36.7938 16.6768 36.3121 16.0206 35.6365 16.0206L31.5148 16.0206C31.0779 16.0206 30.6918 16.3043 30.5613 16.7211L27.7403 25.7315C27.5387 26.3756 28.0203 27.0309 28.6954 27.0309L32.8049 27.031Z" fill="black"/>
|
||||||
|
<path d="M61.8049 27.031C62.2414 27.0311 62.6273 26.748 62.7582 26.3317L65.5912 17.3212C65.7938 16.6768 65.3121 16.0206 64.6365 16.0206L60.5148 16.0206C60.0779 16.0206 59.6918 16.3043 59.5613 16.7211L56.7403 25.7315C56.5387 26.3756 57.0203 27.0309 57.6954 27.0309L61.8049 27.031Z" fill="black"/>
|
||||||
|
<path d="M252.201 111.98C252.637 111.98 253.023 111.697 253.154 111.281L255.97 102.323C256.173 101.679 255.691 101.023 255.016 101.023L250.924 101.023C250.487 101.023 250.101 101.306 249.97 101.723L247.166 110.681C246.964 111.325 247.446 111.98 248.121 111.98L252.201 111.98Z" fill="black"/>
|
||||||
|
<path d="M242.581 111.98C243.017 111.98 243.403 111.697 243.534 111.281L246.35 102.323C246.553 101.679 246.071 101.023 245.396 101.023L241.304 101.023C240.867 101.023 240.481 101.306 240.35 101.723L237.546 110.681C237.344 111.325 237.826 111.98 238.501 111.98L242.581 111.98Z" fill="black"/>
|
||||||
|
<path d="M261.821 111.98C262.258 111.98 262.644 111.697 262.775 111.281L265.591 102.323C265.794 101.679 265.312 101.023 264.636 101.023L260.545 101.023C260.108 101.023 259.721 101.306 259.591 101.723L256.787 110.681C256.585 111.325 257.066 111.98 257.742 111.98L261.821 111.98Z" fill="black"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
4
wake/Assets/Svg/Set.svg
Normal file
4
wake/Assets/Svg/Set.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M7.61821 17.9878C6.22192 17.5721 4.97904 16.8003 3.9949 15.7777C4.36204 15.3426 4.58329 14.7804 4.58329 14.1665C4.58329 12.7858 3.46401 11.6665 2.08329 11.6665C1.99977 11.6665 1.91721 11.6706 1.83579 11.6786C1.72487 11.1363 1.66663 10.5749 1.66663 9.99984C1.66663 9.12876 1.80028 8.28888 2.04821 7.49959C2.05988 7.49976 2.07158 7.49984 2.08329 7.49984C3.46401 7.49984 4.58329 6.38055 4.58329 4.99984C4.58329 4.60347 4.49104 4.22867 4.32688 3.89568C5.29058 2.99959 6.46683 2.32897 7.77167 1.96777C8.18513 2.77821 9.02775 3.33319 9.99996 3.33319C10.9722 3.33319 11.8148 2.77821 12.2283 1.96777C13.5331 2.32897 14.7093 2.99959 15.673 3.89568C15.5089 4.22867 15.4166 4.60347 15.4166 4.99984C15.4166 6.38055 16.5359 7.49984 17.9166 7.49984C17.9283 7.49984 17.94 7.49976 17.9517 7.49959C18.1996 8.28888 18.3333 9.12876 18.3333 9.99984C18.3333 10.5749 18.275 11.1363 18.1641 11.6786C18.0827 11.6706 18.0002 11.6665 17.9166 11.6665C16.5359 11.6665 15.4166 12.7858 15.4166 14.1665C15.4166 14.7804 15.6379 15.3426 16.005 15.7777C15.0209 16.8003 13.778 17.5721 12.3817 17.9878C12.0595 16.9798 11.115 16.2498 9.99996 16.2498C8.88496 16.2498 7.94046 16.9798 7.61821 17.9878Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||||
|
<path d="M10 12.9168C11.6109 12.9168 12.9167 11.611 12.9167 10.0002C12.9167 8.38933 11.6109 7.0835 10 7.0835C8.38921 7.0835 7.08337 8.38933 7.08337 10.0002C7.08337 11.611 8.38921 12.9168 10 12.9168Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
10
wake/Assets/Svg/Upload.svg
Normal file
10
wake/Assets/Svg/Upload.svg
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<mask id="mask0_7079_2856" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20">
|
||||||
|
<path d="M20 0H0V20H20V0Z" fill="black"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_7079_2856)">
|
||||||
|
<path d="M2.5 10.0035V17.5H17.5V10" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M13.75 6.25L10 2.5L6.25 6.25" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M9.99658 13.3333V2.5" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 672 B |
@ -169,7 +169,8 @@ struct ContentView: View {
|
|||||||
LoginView()
|
LoginView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding()
|
||||||
|
.padding(.top, 20)
|
||||||
// 标题
|
// 标题
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
Text("Hi! Click And")
|
Text("Hi! Click And")
|
||||||
@ -194,19 +195,11 @@ struct ContentView: View {
|
|||||||
|
|
||||||
// 2. Lottie动画层
|
// 2. Lottie动画层
|
||||||
if showLottieAnimation {
|
if showLottieAnimation {
|
||||||
LottieView(name: "loading", loopMode: .loop)
|
GIFView(name: "Blind") {
|
||||||
.frame(width: 200, height: 200)
|
// 点击事件处理
|
||||||
.position(x: UIScreen.main.bounds.width / 2,
|
Router.shared.navigate(to: .blindBox(mediaType: .video))
|
||||||
y: UIScreen.main.bounds.height * 0.325)
|
}
|
||||||
.onAppear {
|
.frame(width: 300, height: 300)
|
||||||
// 5秒后隐藏Lottie动画并显示视频
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
|
||||||
withAnimation {
|
|
||||||
showLottieAnimation = false
|
|
||||||
showVideoPlayer = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 视频播放器
|
// 3. 视频播放器
|
||||||
@ -288,7 +281,7 @@ struct ContentView: View {
|
|||||||
for (index, item) in login.enumerated() {
|
for (index, item) in login.enumerated() {
|
||||||
print("记录 \(index + 1): 邮箱=\(item.email), 姓名=\(item.name)")
|
print("记录 \(index + 1): 邮箱=\(item.email), 姓名=\(item.name)")
|
||||||
}
|
}
|
||||||
// showModal.toggle()
|
showModal.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ enum TypographyStyle {
|
|||||||
case headline // 大标题
|
case headline // 大标题
|
||||||
case title // 标题
|
case title // 标题
|
||||||
case title2 // 标题
|
case title2 // 标题
|
||||||
|
case title3 // 标题
|
||||||
case body // 正文
|
case body // 正文
|
||||||
case subtitle // 副标题
|
case subtitle // 副标题
|
||||||
case caption // 说明文字
|
case caption // 说明文字
|
||||||
@ -54,6 +55,7 @@ struct Typography {
|
|||||||
.largeTitle: TypographyConfig(size: 32, weight: .heavy, textStyle: .largeTitle),
|
.largeTitle: TypographyConfig(size: 32, weight: .heavy, textStyle: .largeTitle),
|
||||||
.smallLargeTitle: TypographyConfig(size: 30, weight: .heavy, textStyle: .largeTitle),
|
.smallLargeTitle: TypographyConfig(size: 30, weight: .heavy, textStyle: .largeTitle),
|
||||||
.headline: TypographyConfig(size: 24, weight: .bold, textStyle: .headline),
|
.headline: TypographyConfig(size: 24, weight: .bold, textStyle: .headline),
|
||||||
|
.title3: TypographyConfig(size: 22, weight: .semibold, textStyle: .title2),
|
||||||
.title: TypographyConfig(size: 20, weight: .semibold, textStyle: .title2),
|
.title: TypographyConfig(size: 20, weight: .semibold, textStyle: .title2),
|
||||||
.title2: TypographyConfig(size: 18, weight: .bold, textStyle: .title2),
|
.title2: TypographyConfig(size: 18, weight: .bold, textStyle: .title2),
|
||||||
.body: TypographyConfig(size: 16, weight: .regular, textStyle: .body),
|
.body: TypographyConfig(size: 16, weight: .regular, textStyle: .body),
|
||||||
|
|||||||
@ -11,59 +11,92 @@ struct UserProfileModal: View {
|
|||||||
.frame(height: UIApplication.shared.windows.first?.safeAreaInsets.top ?? 0)
|
.frame(height: UIApplication.shared.windows.first?.safeAreaInsets.top ?? 0)
|
||||||
// 用户信息区域
|
// 用户信息区域
|
||||||
HStack(alignment: .center, spacing: 16) {
|
HStack(alignment: .center, spacing: 16) {
|
||||||
// 头像
|
|
||||||
Image(systemName: "person.circle.fill")
|
Image(systemName: "person.circle.fill")
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fill)
|
.aspectRatio(contentMode: .fill)
|
||||||
.frame(width: 60, height: 60)
|
.frame(width: 60, height: 60)
|
||||||
.foregroundColor(.blue)
|
.foregroundColor(.blue)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
|
|
||||||
// 姓名和ID
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
Text("Name")
|
||||||
Text("用户名")
|
.font(Typography.font(for: .body))
|
||||||
.font(.headline)
|
.fontWeight(.bold)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
HStack(spacing: 4) {
|
||||||
Text("ID: 12345678")
|
Text("ID: 12345678")
|
||||||
.font(.subheadline)
|
.font(.system(size: 14))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
UIPasteboard.general.string = "12345678"
|
||||||
|
}) {
|
||||||
|
Image(systemName: "doc.on.doc")
|
||||||
|
.font(.system(size: 12))
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 16)
|
.frame(maxWidth: .infinity)
|
||||||
.padding(.top, 16)
|
.padding()
|
||||||
|
.background(
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
RoundedRectangle(cornerRadius: 16)
|
||||||
Text("会员等级")
|
.fill(Color.white)
|
||||||
.font(.headline)
|
.shadow(color: .black.opacity(0.1), radius: 4, x: 0, y: 2)
|
||||||
.foregroundColor(.primary)
|
)
|
||||||
Text("会员时间")
|
.padding(.horizontal)
|
||||||
.font(.subheadline)
|
|
||||||
.foregroundColor(.secondary)
|
ZStack(alignment: .center) {
|
||||||
Text("会员中心")
|
// SVG背景 - 确保铺满整个区域
|
||||||
.font(.subheadline)
|
SVGImage(svgName: "Pioneer")
|
||||||
.foregroundColor(.secondary)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.scaledToFill()
|
||||||
|
|
||||||
|
// 内容区域
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
|
Text("Pioneer")
|
||||||
|
.font(Typography.font(for: .title3))
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
.padding(.top, 6)
|
||||||
|
|
||||||
|
Text("Expires on :")
|
||||||
|
.font(.system(size: 12))
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
.padding(.top, 2)
|
||||||
|
|
||||||
|
Text("March 15, 2025")
|
||||||
|
.font(.system(size: 12))
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(.leading, 32)
|
||||||
|
// 可以添加内边距使内容不紧贴边缘
|
||||||
|
.padding(.vertical, 12)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(height: 112)
|
||||||
.padding(16)
|
.frame(maxWidth: .infinity)
|
||||||
.background(Color.clear)
|
.clipped() // 确保内容不会超出边界
|
||||||
.padding(.horizontal, 16)
|
|
||||||
|
|
||||||
VStack(spacing: 12) {
|
VStack(spacing: 12) {
|
||||||
// memories
|
// upload
|
||||||
Button(action: {
|
Button(action: {
|
||||||
print("memories")
|
Router.shared.navigate(to: .mediaUpload)
|
||||||
}) {
|
}) {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
Image(systemName: "crown.fill")
|
SVGImage(svgName: "Upload")
|
||||||
.foregroundColor(.orange)
|
.foregroundColor(.orange)
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 20, height: 20)
|
||||||
|
|
||||||
Text("My Memories")
|
Text("Upload Resources")
|
||||||
.font(.headline)
|
.font(Typography.font(for: .body))
|
||||||
.foregroundColor(.primary)
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
@ -73,17 +106,41 @@ struct UserProfileModal: View {
|
|||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle()) // 移除按钮默认样式
|
.buttonStyle(PlainButtonStyle()) // 移除按钮默认样式
|
||||||
|
|
||||||
// Box
|
// memories
|
||||||
Button(action: {
|
Button(action: {
|
||||||
print("Box")
|
Router.shared.navigate(to: .mediaUpload)
|
||||||
}) {
|
}) {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
Image(systemName: "clock.fill")
|
SVGImage(svgName: "Memory")
|
||||||
.foregroundColor(.blue)
|
.foregroundColor(.orange)
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 20, height: 20)
|
||||||
Text("My Bind Box")
|
|
||||||
.font(.headline)
|
Text("My Memories")
|
||||||
.foregroundColor(.primary)
|
.font(Typography.font(for: .body))
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.cornerRadius(10)
|
||||||
|
.contentShape(Rectangle()) // 使整个区域可点击
|
||||||
|
}
|
||||||
|
.buttonStyle(PlainButtonStyle()) // 移除按钮默认样式
|
||||||
|
|
||||||
|
// Box
|
||||||
|
Button(action: {
|
||||||
|
Router.shared.navigate(to: .mediaUpload)
|
||||||
|
}) {
|
||||||
|
HStack(spacing: 16) {
|
||||||
|
SVGImage(svgName: "Box")
|
||||||
|
.foregroundColor(.orange)
|
||||||
|
.frame(width: 20, height: 20)
|
||||||
|
|
||||||
|
Text("My Blind Box")
|
||||||
|
.font(Typography.font(for: .body))
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
@ -95,36 +152,41 @@ struct UserProfileModal: View {
|
|||||||
|
|
||||||
// setting
|
// setting
|
||||||
Button(action: {
|
Button(action: {
|
||||||
withAnimation(.spring(response: 0.5, dampingFraction: 0.8)) {
|
withAnimation(.spring(response: 0.5, dampingFraction: 0.8)) {
|
||||||
showSettings = true
|
showSettings = true
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
Image(systemName: "person.circle.fill")
|
SVGImage(svgName: "Set")
|
||||||
.foregroundColor(.purple)
|
.foregroundColor(.orange)
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 20, height: 20)
|
||||||
|
|
||||||
Text("Setting")
|
Text("Setting")
|
||||||
.font(.headline)
|
.font(Typography.font(for: .body))
|
||||||
.foregroundColor(.primary)
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.themeTextMessageMain)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
Image(systemName: "chevron.right")
|
|
||||||
.foregroundColor(.gray)
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color.clear)
|
.cornerRadius(10)
|
||||||
.overlay(
|
|
||||||
RoundedRectangle(cornerRadius: 10)
|
|
||||||
.stroke(Color.gray.opacity(0.2), lineWidth: 1)
|
|
||||||
)
|
|
||||||
.contentShape(Rectangle()) // 使整个区域可点击
|
.contentShape(Rectangle()) // 使整个区域可点击
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle()) // 移除按钮默认样式
|
.buttonStyle(PlainButtonStyle()) // 移除按钮默认样式
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 16)
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding()
|
||||||
|
.background(
|
||||||
|
RoundedRectangle(cornerRadius: 16)
|
||||||
|
.fill(Color.white)
|
||||||
|
.shadow(color: .black.opacity(0.1), radius: 4, x: 0, y: 2)
|
||||||
|
)
|
||||||
|
.padding(.horizontal)
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(width: UIScreen.main.bounds.width * 0.8)
|
.frame(width: UIScreen.main.bounds.width * 0.8)
|
||||||
.background(Color(red: 0.87, green: 0.87, blue: 0.87))
|
.background(Color.themeTextWhiteSecondary)
|
||||||
.cornerRadius(20, corners: [.topRight, .bottomRight])
|
.cornerRadius(20, corners: [.topRight, .bottomRight])
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,7 @@ struct SettingsView: View {
|
|||||||
.background(Color(.systemGroupedBackground))
|
.background(Color(.systemGroupedBackground))
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.background(Color(.systemGroupedBackground))
|
.background(Color.themeTextWhiteSecondary)
|
||||||
// 设置水平尺寸类别为常规宽度(regular),用于支持分屏和不同设备尺寸的布局
|
// 设置水平尺寸类别为常规宽度(regular),用于支持分屏和不同设备尺寸的布局
|
||||||
.environment(\.horizontalSizeClass, .regular)
|
.environment(\.horizontalSizeClass, .regular)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,13 +48,11 @@ struct WakeApp: App {
|
|||||||
// 已登录:显示userInfo页面
|
// 已登录:显示userInfo页面
|
||||||
// ContentView()
|
// ContentView()
|
||||||
// .environmentObject(authState)
|
// .environmentObject(authState)
|
||||||
MediaUploadView()
|
ContentView()
|
||||||
.environmentObject(authState)
|
.environmentObject(authState)
|
||||||
} else {
|
} else {
|
||||||
// 未登录:显示登录界面
|
// 未登录:显示登录界面
|
||||||
// LoginView()
|
LoginView()
|
||||||
// .environmentObject(authState)
|
|
||||||
UserInfo()
|
|
||||||
.environmentObject(authState)
|
.environmentObject(authState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user