release: v0.2.4 里程碑快照(孤儿提交,无父;树 = dev 68362e5)
CI / fmt (rustfmt --check) (push) Waiting to run
CI / clippy (ubuntu-latest) (push) Waiting to run
CI / clippy (windows-latest) (push) Waiting to run
CI / test (ubuntu-latest) (push) Waiting to run
CI / test (windows-latest) (push) Waiting to run
CI / build release (ubuntu-latest) (push) Waiting to run
CI / build release (windows-latest) (push) Waiting to run
CI / runtime smoke (ubuntu x64, xvfb) (push) Waiting to run
CI / runtime smoke (macos arm64, probe) (push) Skipped
CI / update-e2e (windows x64) (push) Waiting to run
GPU evidence / GPU 判据自测(不需 GPU;跳过 ≠ 已验证) (push) Waiting to run
GPU evidence / GPU 证据 — 探测可用产物与硬件适配器 (push) Waiting to run
Guards / core 零 UI 守门 (push) Waiting to run
Guards / presenter 零 UI 守门 (push) Waiting to run
Guards / design 零第三方依赖守门 (push) Waiting to run
Guards / unsafe 落点守门(集合必须恰好等于期望) (push) Waiting to run
Guards / 文件行数 ≤400 守门 (push) Waiting to run
Guards / 依赖许可与来源(cargo-deny) (push) Waiting to run
Release guard / 发布标记语义守门(push tag → 稳定版) (push) Waiting to run
Signing status(播报,不是门禁) / 判据自测(三行/退出码/变异重放/接线) (push) Waiting to run
Signing status(播报,不是门禁) / 签名就绪度(播报) (push) Waiting to run
Release / 选槽位(默认四个:Windows 两档 + Linux 两档) (push) Waiting to run
CI / fmt (rustfmt --check) (push) Waiting to run
CI / clippy (ubuntu-latest) (push) Waiting to run
CI / clippy (windows-latest) (push) Waiting to run
CI / test (ubuntu-latest) (push) Waiting to run
CI / test (windows-latest) (push) Waiting to run
CI / build release (ubuntu-latest) (push) Waiting to run
CI / build release (windows-latest) (push) Waiting to run
CI / runtime smoke (ubuntu x64, xvfb) (push) Waiting to run
CI / runtime smoke (macos arm64, probe) (push) Skipped
CI / update-e2e (windows x64) (push) Waiting to run
GPU evidence / GPU 判据自测(不需 GPU;跳过 ≠ 已验证) (push) Waiting to run
GPU evidence / GPU 证据 — 探测可用产物与硬件适配器 (push) Waiting to run
Guards / core 零 UI 守门 (push) Waiting to run
Guards / presenter 零 UI 守门 (push) Waiting to run
Guards / design 零第三方依赖守门 (push) Waiting to run
Guards / unsafe 落点守门(集合必须恰好等于期望) (push) Waiting to run
Guards / 文件行数 ≤400 守门 (push) Waiting to run
Guards / 依赖许可与来源(cargo-deny) (push) Waiting to run
Release guard / 发布标记语义守门(push tag → 稳定版) (push) Waiting to run
Signing status(播报,不是门禁) / 判据自测(三行/退出码/变异重放/接线) (push) Waiting to run
Signing status(播报,不是门禁) / 签名就绪度(播报) (push) Waiting to run
Release / 选槽位(默认四个:Windows 两档 + Linux 两档) (push) Waiting to run
本批内容见 CHANGELOG.md 的 0.2.4 段。按 D41 用孤儿快照推 main,保留「公开史只有里程碑」的模型。
This commit is contained in:
commit
a5d1dec495
1580 files changed
+320938
No files matched your search
@@ -0,0 +1,182 @@
|
||||
// 左侧主导航(D16 §1):图标+文字,选中项 accent 色块;可折叠成纯图标窄条(偏好记忆)。
|
||||
// 折叠宽度/展开宽度取 Metrics,动画时长取 Theme.motion-normal。
|
||||
import { Theme } from "../theme/tokens.slint";
|
||||
import { Metrics } from "../theme/metrics.slint";
|
||||
import { RouteKind } from "../models.slint";
|
||||
import { UiText, TextRole } from "label.slint";
|
||||
import { AppIcon, IconKind } from "icons.slint";
|
||||
|
||||
component NavItem inherits Rectangle {
|
||||
in property <IconKind> icon: IconKind.instances;
|
||||
in property <string> label: "";
|
||||
in property <bool> active: false;
|
||||
in property <bool> collapsed: false;
|
||||
callback clicked();
|
||||
|
||||
height: root.collapsed ? 48px : 64px;
|
||||
background: root.active
|
||||
? Theme.accent-soft
|
||||
: touch.has-hover ? Theme.bg-hover : transparent;
|
||||
animate background { duration: Theme.motion-fast; }
|
||||
|
||||
// 选中态:左侧 accent 竖条(Metro 侧栏语义)
|
||||
Rectangle {
|
||||
visible: root.active;
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: 3px;
|
||||
height: root.height;
|
||||
background: Theme.accent;
|
||||
}
|
||||
|
||||
AppIcon {
|
||||
kind: root.icon;
|
||||
icon-size: 20px;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: root.collapsed ? (root.height - self.height) / 2 : 12px;
|
||||
tint: root.active ? Theme.accent : Theme.fg-secondary;
|
||||
}
|
||||
|
||||
UiText {
|
||||
visible: !root.collapsed;
|
||||
role: TextRole.caption;
|
||||
text: root.label;
|
||||
color: root.active ? Theme.accent : Theme.fg-secondary;
|
||||
horizontal-alignment: center;
|
||||
x: 0;
|
||||
y: 38px;
|
||||
width: root.width;
|
||||
}
|
||||
|
||||
touch := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => { root.clicked(); }
|
||||
}
|
||||
|
||||
accessible-role: button;
|
||||
accessible-label: root.label;
|
||||
}
|
||||
|
||||
export component Nav inherits Rectangle {
|
||||
in property <RouteKind> active: RouteKind.instances;
|
||||
in-out property <bool> collapsed: false;
|
||||
in property <string> account-name: "未登录";
|
||||
in property <color> account-hue: #5C2D91;
|
||||
in property <string> account-initial: "?";
|
||||
callback navigate(RouteKind);
|
||||
callback toggle-collapsed();
|
||||
callback account-clicked();
|
||||
|
||||
width: collapsed ? Metrics.nav-collapsed-width : Metrics.nav-expanded-width;
|
||||
height: 100%;
|
||||
background: Theme.bg-surface;
|
||||
animate width { duration: Theme.motion-normal; easing: ease-in-out; }
|
||||
|
||||
// 右边界线
|
||||
Rectangle {
|
||||
x: root.width - 1px;
|
||||
y: 0;
|
||||
width: 1px;
|
||||
height: root.height;
|
||||
background: Theme.stroke;
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
x: 0;
|
||||
y: Metrics.gap-2;
|
||||
width: root.width;
|
||||
height: root.height - Metrics.gap-2 - Metrics.gap-2;
|
||||
|
||||
NavItem {
|
||||
icon: IconKind.instances;
|
||||
label: "实例";
|
||||
active: root.active == RouteKind.instances || root.active == RouteKind.detail;
|
||||
collapsed: root.collapsed;
|
||||
clicked => { root.navigate(RouteKind.instances); }
|
||||
}
|
||||
NavItem {
|
||||
icon: IconKind.download;
|
||||
label: "下载";
|
||||
active: root.active == RouteKind.download;
|
||||
collapsed: root.collapsed;
|
||||
clicked => { root.navigate(RouteKind.download); }
|
||||
}
|
||||
NavItem {
|
||||
icon: IconKind.logs;
|
||||
label: "日志";
|
||||
active: root.active == RouteKind.logs;
|
||||
collapsed: root.collapsed;
|
||||
clicked => { root.navigate(RouteKind.logs); }
|
||||
}
|
||||
NavItem {
|
||||
icon: IconKind.settings;
|
||||
label: "设置";
|
||||
active: root.active == RouteKind.settings;
|
||||
collapsed: root.collapsed;
|
||||
clicked => { root.navigate(RouteKind.settings); }
|
||||
}
|
||||
|
||||
Rectangle { vertical-stretch: 1; background: transparent; }
|
||||
|
||||
// 底部:账户头像(点击进设置·账户)
|
||||
Rectangle {
|
||||
height: 56px;
|
||||
background: account-touch.has-hover ? Theme.bg-hover : transparent;
|
||||
|
||||
Rectangle {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
background: root.account-hue;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: 8px;
|
||||
|
||||
UiText {
|
||||
text: root.account-initial;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: Theme.fg-on-accent;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
UiText {
|
||||
visible: !root.collapsed;
|
||||
role: TextRole.caption;
|
||||
text: root.account-name;
|
||||
horizontal-alignment: center;
|
||||
x: 0;
|
||||
y: 38px;
|
||||
width: root.width;
|
||||
}
|
||||
|
||||
account-touch := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => { root.account-clicked(); }
|
||||
}
|
||||
}
|
||||
|
||||
// 折叠开关(偏好由 Rust 侧持久化到 ui.nav.collapsed)
|
||||
Rectangle {
|
||||
height: 40px;
|
||||
background: toggle-touch.has-hover ? Theme.bg-hover : transparent;
|
||||
|
||||
AppIcon {
|
||||
kind: root.collapsed ? IconKind.chevronRight : IconKind.chevronLeft;
|
||||
icon-size: 16px;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: (root.height - self.height) / 2;
|
||||
tint: Theme.fg-secondary;
|
||||
}
|
||||
|
||||
toggle-touch := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => { root.toggle-collapsed(); }
|
||||
}
|
||||
|
||||
accessible-role: button;
|
||||
accessible-label: root.collapsed ? "展开导航栏" : "折叠导航栏";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user