feat: 侧边栏两态重构(统一视图身份)+ 第四轮触控化走查
侧边栏(真机验证): - 砍掉悬浮态,只留收起⇄固定展开;TerminalSidebar 单一视图身份, 内容恒按 288pt 排版、收起=左侧裁切(clipped 宽度动画), 图标列两态同尺寸同位置,明细淡入淡出,终端随宽度盖上/让开 - 开合入口收敛:Logo 位(收起态=»展开键/展开态=Logo)+ 头部«; 删底部开合键与 Pin;LeadingHitShape 修 clipped 不裁触摸 - 修 GridBox 从不通知 UI:onGridChange→objectWillChange, 标题胶囊格子数随开合实时刷新 触控化走查(上一轮,真机部署验证): - 窗口按钮 13pt 色点→22pt 圆角方块常显字形;动作条改可点按钮 - TXTech 拼写/配色规范(SSH/mosh/tmux 官方写法+品牌色映射) - 首页会话卡固定 3 列 4:3;去掉未实现的 ⌘K 提示 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,19 +7,24 @@ import SwiftUI
|
||||
// - **红点 / ⌘W = 关闭**:弹一次确认,按主机能力两套文案;`esc` 取消、`⏎` 选推荐项。
|
||||
|
||||
/// 浮层容器:遮罩 + 居中卡片(对话框 / 菜单共用)。
|
||||
///
|
||||
/// 遮罩淡入、卡片从 96% 长出来(`TX.Motion.pop`)—— 两段分开写才有层次;整块套一个
|
||||
/// `.transition(.opacity)` 的话卡片只是跟着变淡,弹出感全无。
|
||||
/// 动画事务由 `AppRouter.present/dismissModal` 提供。
|
||||
struct TXModalScrim<Content: View>: View {
|
||||
let onDismiss: () -> Void
|
||||
@ViewBuilder let content: Content
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color(hex: 0x0A0B12).opacity(0.42)
|
||||
TX.Scrim.color.opacity(TX.Scrim.dialog)
|
||||
.ignoresSafeArea()
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture(perform: onDismiss)
|
||||
.transition(.opacity)
|
||||
content
|
||||
.transition(TX.Motion.pop)
|
||||
}
|
||||
.transition(.opacity)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +65,7 @@ struct CloseConfirmDialog: View {
|
||||
RoundedRectangle(cornerRadius: TX.Radius.dialog)
|
||||
.strokeBorder(p.borderStrong, lineWidth: 1)
|
||||
)
|
||||
.shadow(color: .black.opacity(0.7), radius: 40, y: 30)
|
||||
.txShadow(TX.Elevation.dialog)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +107,7 @@ struct CloseConfirmDialog: View {
|
||||
.font(TX.Font.mono(12, confirmingKill ? .semibold : .regular))
|
||||
.foregroundStyle(p.danger)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.buttonStyle(.txPress)
|
||||
}
|
||||
Spacer()
|
||||
TXButton(title: "取消", action: onCancel)
|
||||
@@ -129,7 +134,7 @@ struct CloseConfirmDialog: View {
|
||||
.strokeBorder(Color(hex: 0x8D5560), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.buttonStyle(.txPress)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +206,7 @@ struct SplitMenuView: View {
|
||||
RoundedRectangle(cornerRadius: TX.Radius.dialog - 1)
|
||||
.strokeBorder(p.borderStrong, lineWidth: 1)
|
||||
)
|
||||
.shadow(color: .black.opacity(0.7), radius: 40, y: 30)
|
||||
.txShadow(TX.Elevation.dialog)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +278,7 @@ struct SplitMenuView: View {
|
||||
.padding(.horizontal, TX.Space.xs)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.buttonStyle(.txPress)
|
||||
.disabled(disabled)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user