diff --git a/.changeset/web-archive-confirm-copy.md b/.changeset/web-archive-confirm-copy.md new file mode 100644 index 000000000..97ecc63b0 --- /dev/null +++ b/.changeset/web-archive-confirm-copy.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add an Archived sessions entry to the mobile settings sheet and clarify the archive confirmation to mention restoring from Settings. diff --git a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue index 07697e723..24034c703 100644 --- a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue +++ b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue @@ -6,11 +6,12 @@ @@ -154,6 +245,7 @@ function onLogout(): void { :title="t('mobile.settingsTitle')" @update:model-value="emit('update:modelValue', $event)" > + {{ t('mobile.groupSession') }} @@ -228,6 +320,15 @@ function onLogout(): void { {{ t('mobile.groupApp') }} + + + + {{ t('mobile.archivedSessions') }} + {{ t('mobile.archivedSessionsSub') }} + + › + + @@ -297,6 +398,53 @@ function onLogout(): void { {{ serverVersion }} + + + + + + + ‹ {{ t('mobile.archivedBack') }} + + {{ t('mobile.sessionCount', { n: filteredArchived.length }) }} + + + + + + + + {{ t('settings.archivedLoadingAll') }} + + + + + {{ s.title }} + {{ t('settings.archivedAt', { time: archiveTime(s.updatedAt) }) }} + + {{ t('settings.archivedRestore') }} + + + + + {{ archivedItems.length === 0 ? t('settings.archivedEmpty') : t('settings.archivedNoMatch') }} + + @@ -478,4 +626,69 @@ function onLogout(): void { .srow, .srow-sub, .srow-val { font-family: var(--sans); } + +/* Archived sessions sub-view */ +.arch-subhead { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--space-3); + padding: var(--space-2) var(--space-3) var(--space-1); +} +.arch-back { + display: inline-flex; + align-items: center; + gap: 2px; + border: none; + background: none; + padding: var(--space-1) var(--space-2) var(--space-1) 0; + font-family: var(--font-ui); + font-size: var(--text-base); + color: var(--color-accent-hover); + cursor: pointer; +} +.chev.back { font-size: 20px; } +.arch-count { + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-text-faint); +} +.arch-tools { + display: flex; + align-items: center; + gap: var(--space-2); + padding: var(--space-2) var(--space-3); + flex-wrap: wrap; +} +.arch-search-input { flex: 1; min-width: 160px; } +.arch-row { + display: flex; + align-items: center; + gap: var(--space-3); + min-height: 56px; + padding: var(--space-2) var(--space-3); + border-top: 1px solid var(--color-line); +} +.arch-row:first-of-type { border-top: none; } +.arch-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } +.arch-name { + font-family: var(--font-ui); + font-size: var(--text-base); + color: var(--color-text); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.arch-time { + font-family: var(--font-mono); + font-size: var(--text-xs); + color: var(--color-text-faint); +} +.arch-empty { + padding: var(--space-6) var(--space-4); + text-align: center; + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-text-faint); +} diff --git a/apps/kimi-web/src/i18n/locales/en/mobile.ts b/apps/kimi-web/src/i18n/locales/en/mobile.ts index 01dc4ecd4..ae60023dd 100644 --- a/apps/kimi-web/src/i18n/locales/en/mobile.ts +++ b/apps/kimi-web/src/i18n/locales/en/mobile.ts @@ -16,4 +16,7 @@ export default { permYoloSub: 'auto-approve all', planModeSub: 'Plan mode', swarmModeSub: 'Swarm mode', + archivedSessions: 'Archived sessions', + archivedSessionsSub: 'Browse and restore archived sessions', + archivedBack: 'Back', } as const; diff --git a/apps/kimi-web/src/i18n/locales/en/sidebar.ts b/apps/kimi-web/src/i18n/locales/en/sidebar.ts index cda064d44..3bb705ca3 100644 --- a/apps/kimi-web/src/i18n/locales/en/sidebar.ts +++ b/apps/kimi-web/src/i18n/locales/en/sidebar.ts @@ -12,7 +12,7 @@ export default { newChat: 'New Chat', newWorkspace: 'New Workspace', emptyState: 'No sessions yet · click New Session to start', - archiveConfirm: 'Archive session?', + archiveConfirm: 'Archive this session? You can restore it later from Settings.', options: 'Options', rename: 'Rename', copyPath: 'Copy path', diff --git a/apps/kimi-web/src/i18n/locales/zh/mobile.ts b/apps/kimi-web/src/i18n/locales/zh/mobile.ts index f4f8690f7..22799adf2 100644 --- a/apps/kimi-web/src/i18n/locales/zh/mobile.ts +++ b/apps/kimi-web/src/i18n/locales/zh/mobile.ts @@ -16,4 +16,7 @@ export default { permYoloSub: '全部自动批准', planModeSub: '计划模式', swarmModeSub: 'Swarm 模式', + archivedSessions: '已归档会话', + archivedSessionsSub: '查看并恢复已归档会话', + archivedBack: '返回', } as const; diff --git a/apps/kimi-web/src/i18n/locales/zh/sidebar.ts b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts index 473f3eeca..bea56f556 100644 --- a/apps/kimi-web/src/i18n/locales/zh/sidebar.ts +++ b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts @@ -12,7 +12,7 @@ export default { newChat: '新建对话', newWorkspace: '新建工作区', emptyState: '还没有会话 · 点击 新建会话 开始', - archiveConfirm: '归档会话?', + archiveConfirm: '确认归档会话?归档后可以从「设置」中恢复', options: '选项', rename: '重命名', copyPath: '复制路径',