Merge PR #70: feat(frontend): 优化弹窗组件架构和用户体验
## 主要变更 ### 对话框系统重构 - 升级 BaseDialog 组件,添加动画、焦点管理、响应式宽度 - 删除旧的 Modal.vue,统一使用 BaseDialog ### 使用量数据导出升级 - 改为 Excel 格式导出,支持分页全量导出 - 添加导出进度对话框,支持取消操作 - 新增依赖:xlsx、file-saver ### 使用量页面优化 - Token 明细悬浮提示 - 请求 ID 一键复制 - 新增 first_token 列 ### 后端修复 - 账户统计查询添加软删除过滤 ## 冲突解决 - 保留 driver.js 依赖(onboarding 功能需要) - 合并 package.json 变更
This commit is contained in:
@@ -301,7 +301,7 @@
|
||||
<BaseDialog
|
||||
:show="showCreateModal || showEditModal"
|
||||
:title="showEditModal ? t('keys.editKey') : t('keys.createKey')"
|
||||
width="narrow"
|
||||
width="normal"
|
||||
@close="closeModals"
|
||||
>
|
||||
<form id="key-form" @submit.prevent="handleSubmit" class="space-y-5">
|
||||
@@ -893,7 +893,20 @@ const importToCcswitch = (apiKey: string) => {
|
||||
usageAutoInterval: '30'
|
||||
})
|
||||
const deeplink = `ccswitch://v1/import?${params.toString()}`
|
||||
window.open(deeplink, '_self')
|
||||
|
||||
try {
|
||||
window.open(deeplink, '_self')
|
||||
|
||||
// Check if the protocol handler worked by detecting if we're still focused
|
||||
setTimeout(() => {
|
||||
if (document.hasFocus()) {
|
||||
// Still focused means the protocol handler likely failed
|
||||
appStore.showError(t('keys.ccSwitchNotInstalled'))
|
||||
}
|
||||
}, 100)
|
||||
} catch (error) {
|
||||
appStore.showError(t('keys.ccSwitchNotInstalled'))
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user