fix(ios): 调整欢迎页品牌和登录入口
continuous-integration/drone/push Build is passing Details

This commit is contained in:
dongjf 2026-11-27 08:30:07 +08:00
parent bf17c02d00
commit 8351820d35
4 changed files with 64 additions and 66 deletions

View File

@ -117,7 +117,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 14; CURRENT_PROJECT_VERSION = 15;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com"; ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com";
@ -138,7 +138,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 14; CURRENT_PROJECT_VERSION = 15;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com"; ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com";

View File

@ -1,15 +1,20 @@
import SwiftUI import SwiftUI
struct EntryBrand: View { struct EntryBrand: View {
var prominent = false
var body: some View { var body: some View {
HStack(spacing: 9) { let size: CGFloat = prominent ? 46 : 32
HStack(spacing: prominent ? 12 : 9) {
Image("BrandMark") Image("BrandMark")
.resizable() .resizable()
.frame(width: 32, height: 32) .frame(width: size, height: size)
.clipShape(.rect(cornerRadius: 8)) .clipShape(.rect(cornerRadius: prominent ? 12 : 8))
.accessibilityHidden(true) .accessibilityHidden(true)
Text("见物").font(.headline) Text("见物").font(prominent ? .largeTitle.weight(.bold) : .headline)
} }
.accessibilityElement(children: .combine)
.accessibilityAddTraits(prominent ? .isHeader : [])
} }
} }
@ -22,33 +27,51 @@ extension Color {
struct WelcomeView: View { struct WelcomeView: View {
let account: AtlasAccount let account: AtlasAccount
@Environment(\.colorScheme) private var colorScheme @Environment(\.colorScheme) private var colorScheme
@Environment(\.dynamicTypeSize) private var dynamicType
@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: 22) {
EntryBrand() EntryBrand(prominent: true)
if dynamicType.isAccessibilitySize { headline }
scene scene
Text("说一句「数据线放在书房抽屉」,见物帮你记下。") example
.font(.body)
.foregroundStyle(.primary.opacity(0.77))
.lineSpacing(4)
signInLink
.padding(.top, 4)
} }
.frame(maxWidth: 460, alignment: .leading) .frame(maxWidth: 460, alignment: .leading)
.padding(.horizontal, 23) .padding(.horizontal, 24)
.padding(.vertical, 16) .padding(.top, 21)
.frame(maxWidth: .infinity, minHeight: viewport.size.height) .padding(.bottom, 24)
.frame(maxWidth: .infinity, alignment: .top)
} }
.safeAreaInset(edge: .bottom, spacing: 0) {
signInLink
.frame(maxWidth: 460)
.padding(.horizontal, 24)
.padding(.vertical, 12)
.frame(maxWidth: .infinity)
.background(Color.entryBackground(for: colorScheme))
} }
.background(Color.entryBackground(for: colorScheme).ignoresSafeArea()) .background(Color.entryBackground(for: colorScheme).ignoresSafeArea())
.toolbar(.hidden, for: .navigationBar) .toolbar(.hidden, for: .navigationBar)
} }
private var example: some View {
HStack(alignment: .center, spacing: 13) {
Image(systemName: "waveform")
.font(.body.weight(.semibold))
.foregroundStyle(Color.atlasBlue)
.frame(width: 36, height: 36)
.background(Color.atlasBlue.opacity(0.10), in: .rect(cornerRadius: 10))
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 4) {
Text("数据线放在书房抽屉").font(.headline)
Text("说一句,见物帮你记下。").font(.subheadline).foregroundStyle(.secondary)
}
.accessibilityElement(children: .combine)
}
.padding(14)
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color(uiColor: .secondarySystemGroupedBackground), in: .rect(cornerRadius: 15))
}
private var signInLink: some View { private var signInLink: some View {
NavigationLink { NavigationLink {
SignInView(account: account) SignInView(account: account)
@ -65,36 +88,12 @@ struct WelcomeView: View {
.controlSize(.large) .controlSize(.large)
} }
private var headline: some View {
Text("家里有的,\n心里有数。")
.font(.system(size: headlineSize, weight: .semibold))
.accessibilityAddTraits(.isHeader)
}
private var scene: some View { private var scene: some View {
Color.atlasNavy
.aspectRatio(0.86, contentMode: .fit)
.overlay {
GeometryReader { proxy in
Image("WelcomeTray") Image("WelcomeTray")
.resizable() .resizable()
.scaledToFill() .aspectRatio(contentMode: .fit)
.frame(width: proxy.size.width, height: proxy.size.height) .frame(maxWidth: .infinity)
.clipShape(.rect(cornerRadius: 21))
.accessibilityHidden(true) .accessibilityHidden(true)
} }
} }
.overlay(alignment: .topLeading) {
if !dynamicType.isAccessibilitySize {
ZStack(alignment: .topLeading) {
LinearGradient(colors: [.black.opacity(0.36), .clear], startPoint: .top, endPoint: .center)
.accessibilityHidden(true)
headline
.foregroundStyle(.white)
.padding(.horizontal, 23)
.padding(.top, 23)
}
}
}
.clipShape(.rect(cornerRadius: 25))
}
}

View File

@ -2,7 +2,7 @@
## 首页 ## 首页
入口用「家里有的,心里有数。」和一张家里随手放东西的场景画。用一句实话演示见物的用途,例如「数据线放在书房抽屉」。下方直接进入自己的空间。首次使用时可以新建空空间,或在空间列表里接受家人的邀请。 见物标识在顶部,照片下方用「数据线放在书房抽屉」举例。底部可以进入自己的空间。首次使用时可以新建空空间,或在空间列表里接受家人的邀请。
## 录入 ## 录入

View File

@ -8,32 +8,31 @@
| 页面 | 布局与交互 | | 页面 | 布局与交互 |
| --- | --- | | --- | --- |
| 欢迎 | 生活场景和标题放在同一画面,下方用一句口语演示录入。主入口进入原生登录。 | | 欢迎 | 品牌置顶。场景照片下展示一个语音录入示例,底部入口进入原生登录。 |
| 登录 | 系统返回按钮、小品牌行、大标题和两个带明确标签的原生输入框。密码默认隐藏,可切换显示。 | | 登录 | 系统返回按钮、小品牌行、大标题和两个带明确标签的原生输入框。密码默认隐藏,可切换显示。 |
| 找物与收藏 | 搜索框贴近标题,缩略图左对齐,物品名和完整位置路径置于同一行组。保留可见的空结果和清除搜索动作。 | | 找物与收藏 | 搜索框贴近标题,缩略图左对齐,物品名和完整位置路径置于同一行组。保留可见的空结果和清除搜索动作。 |
| 详情 | 标题、照片、完整位置路径依次展示。移位和编辑靠近位置,按角色展示可用动作。 | | 详情 | 标题、照片、完整位置路径依次展示。移位和编辑靠近位置,按角色展示可用动作。 |
| 位置和录入 | 位置按房间、柜子、收纳盒逐层打开。录入先输入再核对草稿,保留原话、重试和手工录入。 | | 位置和录入 | 位置按房间、柜子、收纳盒逐层打开。录入先输入再核对草稿,保留原话、重试和手工录入。 |
方向稿用于说明主要页面结构。首页以下面最新的文案和主图为准。 方向稿用于说明主要页面结构。首页现行布局见下文。
## 首次打开 ## 首次打开
首页上方是见物标识。光线偏暖的玄关照片占主要空间,标题放在照片留出的深色区域。照片下方用一句实际的录入场景说明用途。说明下方保留单个主入口。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg) 见物标识从屏幕安全区顶部起排。照片保留原有构图,示例独立放在照片下方,登录入口贴近底部安全区。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg)
```text ```text
见物 [标识] 见物
[ 家里有的, ]
[ 心里有数。 ]
[ 玄关托盘里的物品 ] [ 玄关托盘里的物品 ]
说一句「数据线放在书房抽屉」,见物帮你记下。 数据线放在书房抽屉
说一句,见物帮你记下。
[ 进入我的空间 ] [ 进入我的空间 ]
``` ```
- 登录后才加载空间。新账号可新建空空间,或在空间列表接受邀请。 - 登录后加载空间。新账号可新建空空间,或在空间列表接受邀请。
- 深色模式跟随系统。辅助字号下标题移至照片上方,避免文字遮住物品,小屏可滚动。 - 页面跟随深色模式和系统字号。小屏可以滚动查看图片和示例,主入口保持可用。
## 登录过程 ## 登录过程