mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-25 16:46:17 +00:00
feat(kimi-web): rename session delete to archive in UI
- i18n: add archiveConfirm and archive keys (zh/en) - SessionRow: change delete confirm overlay and menu button to archive - MobileSwitcherSheet: change delete button to archive - Keep workspace delete as-is (separate from session archive)
This commit is contained in:
parent
5a31aeb065
commit
87aec8877e
4 changed files with 11 additions and 7 deletions
|
|
@ -195,7 +195,7 @@ function onDelete(id: string): void {
|
|||
<!-- Kebab menu -->
|
||||
<div v-if="menuFor === s.id" class="kmenu" @click.stop>
|
||||
<button class="kitem" @click.stop="onRename(s)">{{ t('sidebar.rename') }}</button>
|
||||
<button class="kitem del" @click.stop="onDelete(s.id)">{{ t('sidebar.delete') }}</button>
|
||||
<button class="kitem archive" @click.stop="onDelete(s.id)">{{ t('sidebar.archive') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -372,5 +372,5 @@ function onDelete(id: string): void {
|
|||
padding: 10px 14px;
|
||||
}
|
||||
.kitem:active { background: var(--panel2); }
|
||||
.kitem.del { color: var(--err); }
|
||||
.kitem.archive { color: var(--err); }
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ defineExpose({ closeMenu, cancelDelete });
|
|||
<div class="se" :class="{ on: active }" @click="emit('select', session.id)">
|
||||
<!-- Delete confirm overlay -->
|
||||
<div v-if="confirming" class="del-confirm" @click.stop>
|
||||
<span class="del-label">{{ t('sidebar.deleteConfirm') }}</span>
|
||||
<span class="del-label">{{ t('sidebar.archiveConfirm') }}</span>
|
||||
<button class="btn-confirm" @click.stop="confirmDelete">{{ t('sidebar.confirm') }}</button>
|
||||
<button class="btn-cancel" @click.stop="cancelDelete">{{ t('sidebar.cancel') }}</button>
|
||||
</div>
|
||||
|
|
@ -166,7 +166,7 @@ defineExpose({ closeMenu, cancelDelete });
|
|||
</button>
|
||||
<div class="menu-divider" />
|
||||
<button class="menu-item" @click.stop="startRename">{{ t('sidebar.rename') }}</button>
|
||||
<button class="menu-item del" @click.stop="startDelete">{{ t('sidebar.delete') }}</button>
|
||||
<button class="menu-item archive" @click.stop="startDelete">{{ t('sidebar.archive') }}</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
|
@ -296,7 +296,7 @@ defineExpose({ closeMenu, cancelDelete });
|
|||
padding: 6px 12px;
|
||||
}
|
||||
.menu-item:hover { background: var(--panel2); }
|
||||
.menu-item.del { color: var(--err); }
|
||||
.menu-item.archive { color: var(--err); }
|
||||
|
||||
.menu-divider {
|
||||
height: 1px;
|
||||
|
|
@ -317,14 +317,14 @@ defineExpose({ closeMenu, cancelDelete });
|
|||
min-width: 0;
|
||||
}
|
||||
|
||||
.del-confirm {
|
||||
.archive-confirm {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
.del-label { color: var(--err); flex: 1; }
|
||||
.archive-label { color: var(--err); flex: 1; }
|
||||
.btn-confirm {
|
||||
background: var(--err);
|
||||
color: #fff;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@ export default {
|
|||
newSession: 'New Session',
|
||||
newWorkspace: 'New Workspace',
|
||||
emptyState: 'No sessions yet · click New Session to start',
|
||||
archiveConfirm: 'Archive session?',
|
||||
deleteConfirm: 'Delete session?',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
options: 'Options',
|
||||
rename: 'Rename',
|
||||
copyPath: 'Copy path',
|
||||
archive: 'Archive',
|
||||
delete: 'Delete',
|
||||
brand: 'Kimi Code',
|
||||
signedIn: 'Signed in',
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@ export default {
|
|||
newSession: '新建会话',
|
||||
newWorkspace: '新建工作区',
|
||||
emptyState: '还没有会话 · 点击 新建会话 开始',
|
||||
archiveConfirm: '归档会话?',
|
||||
deleteConfirm: '删除会话?',
|
||||
confirm: '确认',
|
||||
cancel: '取消',
|
||||
options: '选项',
|
||||
rename: '重命名',
|
||||
copyPath: '复制路径',
|
||||
archive: '归档',
|
||||
delete: '删除',
|
||||
brand: 'Kimi Code',
|
||||
signedIn: '已登录',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue