fix(ios): 调整首页标题和入口的留白
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6fb69f234a
commit
4e33ec4ecb
|
|
@ -26,6 +26,7 @@ struct WelcomeView: View {
|
||||||
@ScaledMetric(relativeTo: .largeTitle) private var headlineSize = 41.0
|
@ScaledMetric(relativeTo: .largeTitle) private var headlineSize = 41.0
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
GeometryReader { viewport in
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(alignment: .leading, spacing: 19) {
|
VStack(alignment: .leading, spacing: 19) {
|
||||||
EntryBrand()
|
EntryBrand()
|
||||||
|
|
@ -35,13 +36,20 @@ struct WelcomeView: View {
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.foregroundStyle(.primary.opacity(0.77))
|
.foregroundStyle(.primary.opacity(0.77))
|
||||||
.lineSpacing(4)
|
.lineSpacing(4)
|
||||||
|
signInLink
|
||||||
|
.padding(.top, 4)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: 460, alignment: .leading)
|
.frame(maxWidth: 460, alignment: .leading)
|
||||||
.padding(.horizontal, 23)
|
.padding(.horizontal, 23)
|
||||||
.padding(.vertical, 12)
|
.padding(.vertical, 16)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity, minHeight: viewport.size.height)
|
||||||
}
|
}
|
||||||
.safeAreaInset(edge: .bottom, spacing: 0) {
|
}
|
||||||
|
.background(Color.entryBackground(for: colorScheme).ignoresSafeArea())
|
||||||
|
.toolbar(.hidden, for: .navigationBar)
|
||||||
|
}
|
||||||
|
|
||||||
|
private var signInLink: some View {
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
SignInView(account: account)
|
SignInView(account: account)
|
||||||
} label: {
|
} label: {
|
||||||
|
|
@ -55,15 +63,6 @@ struct WelcomeView: View {
|
||||||
.buttonStyle(.borderedProminent)
|
.buttonStyle(.borderedProminent)
|
||||||
.buttonBorderShape(.roundedRectangle(radius: 15))
|
.buttonBorderShape(.roundedRectangle(radius: 15))
|
||||||
.controlSize(.large)
|
.controlSize(.large)
|
||||||
.frame(maxWidth: 460)
|
|
||||||
.padding(.horizontal, 23)
|
|
||||||
.padding(.vertical, 12)
|
|
||||||
.frame(maxWidth: .infinity)
|
|
||||||
.foregroundStyle(.white)
|
|
||||||
.background(Color.entryBackground(for: colorScheme))
|
|
||||||
}
|
|
||||||
.background(Color.entryBackground(for: colorScheme).ignoresSafeArea())
|
|
||||||
.toolbar(.hidden, for: .navigationBar)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var headline: some View {
|
private var headline: some View {
|
||||||
|
|
@ -74,7 +73,7 @@ struct WelcomeView: View {
|
||||||
|
|
||||||
private var scene: some View {
|
private var scene: some View {
|
||||||
Color.atlasNavy
|
Color.atlasNavy
|
||||||
.aspectRatio(0.94, contentMode: .fit)
|
.aspectRatio(0.86, contentMode: .fit)
|
||||||
.overlay {
|
.overlay {
|
||||||
GeometryReader { proxy in
|
GeometryReader { proxy in
|
||||||
Image("WelcomeTray")
|
Image("WelcomeTray")
|
||||||
|
|
@ -86,7 +85,8 @@ struct WelcomeView: View {
|
||||||
}
|
}
|
||||||
.overlay(alignment: .topLeading) {
|
.overlay(alignment: .topLeading) {
|
||||||
if !dynamicType.isAccessibilitySize {
|
if !dynamicType.isAccessibilitySize {
|
||||||
LinearGradient(colors: [.black.opacity(0.42), .clear], startPoint: .top, endPoint: .center)
|
ZStack(alignment: .topLeading) {
|
||||||
|
LinearGradient(colors: [.black.opacity(0.36), .clear], startPoint: .top, endPoint: .center)
|
||||||
.accessibilityHidden(true)
|
.accessibilityHidden(true)
|
||||||
headline
|
headline
|
||||||
.foregroundStyle(.white)
|
.foregroundStyle(.white)
|
||||||
|
|
@ -94,6 +94,7 @@ struct WelcomeView: View {
|
||||||
.padding(.top, 23)
|
.padding(.top, 23)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.clipShape(.rect(cornerRadius: 25))
|
.clipShape(.rect(cornerRadius: 25))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
## 首次打开
|
## 首次打开
|
||||||
|
|
||||||
首页上方是见物标识。光线偏暖的玄关照片占主要空间,标题放在照片留出的深色区域。照片下方用一句实际的录入场景说明用途。底部保留单个主入口。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg)
|
首页上方是见物标识。光线偏暖的玄关照片占主要空间,标题放在照片留出的深色区域。照片下方用一句实际的录入场景说明用途。说明下方保留单个主入口。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg)
|
||||||
|
|
||||||
```text
|
```text
|
||||||
见物
|
见物
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue