build(desktop): 升级 electron-shell 版本至 1.6.3 并调整插件执行超时配置

- 插件执行超时默认延长至 6 小时,支持插件单独配置超时时间
- 新增插件根目录迁移逻辑,解决旧版权限问题
- 新增多个服务端实体、DTO、配置模块等基础代码
- 新增插件 UI 模板及相关静态资源
This commit is contained in:
2026-10-15 11:38:45 +08:00
parent 3dcedf95fd
commit f27639777f
717 changed files with 88647 additions and 17543 deletions
@@ -0,0 +1,104 @@
<script setup lang="ts">
/**
* 敏感凭证(37du 控制台)
* 已登记账号列表 + 明文源录入(对接 /api/admin/creds/manage、creds/seed)
*/
import { onMounted, reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { fetchCredsManage, seedCreds } from '@/api/business'
const loading = ref(false)
const list = ref<any[]>([])
const total = ref(0)
const query = reactive({ page: 1, page_size: 20 })
async function load() {
loading.value = true
try {
const r = await fetchCredsManage(query)
list.value = r.items || []
total.value = r.total || 0
allowedKeys.value = r.allowed_keys || []
} finally {
loading.value = false
}
}
const allowedKeys = ref<string[]>([])
// ---- 录入明文源 ----
const seedOpen = ref(false)
const saving = ref(false)
const seedForm = reactive<{ account: string; values: Record<string, string> }>({ account: '', values: {} })
function openSeed(row: any) {
seedForm.account = row.account
seedForm.values = {}
for (const k of allowedKeys.value) seedForm.values[k] = row.creds?.[k] || ''
seedOpen.value = true
}
async function submitSeed() {
if (!seedForm.account) return ElMessage.warning('account 不能为空')
saving.value = true
try {
await seedCreds({ account: seedForm.account, values: seedForm.values })
ElMessage.success('明文源已保存')
seedOpen.value = false
load()
} finally {
saving.value = false
}
}
onMounted(load)
</script>
<template>
<div class="p-5 space-y-4">
<div class="flex items-center justify-between">
<h2 class="text-lg font-bold">敏感凭证</h2>
<el-button :loading="loading" @click="load">刷新</el-button>
</div>
<el-card shadow="never" class="rounded-xl">
<el-table v-loading="loading" :data="list" border stripe>
<el-table-column prop="account" label="账号" min-width="140" />
<el-table-column prop="nickname" label="昵称" min-width="120" />
<el-table-column label="已上报公钥" width="110">
<template #default="{ row }">
<el-tag :type="row.has_pubkey ? 'success' : 'info'" size="small">{{ row.has_pubkey ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="已配置键" width="140">
<template #default="{ row }">
<el-tag v-for="k in Object.keys(row.creds || {})" :key="k" size="small" class="mr-1">{{ k }}</el-tag>
<span v-if="!Object.keys(row.creds || {}).length" class="text-gray-400">-</span>
</template>
</el-table-column>
<el-table-column prop="updated_at" label="更新时间" width="170" />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openSeed(row)">录入明文</el-button>
</template>
</el-table-column>
</el-table>
<div class="flex justify-end mt-4">
<el-pagination v-model:current-page="query.page" v-model:page-size="query.page_size" :total="total"
layout="total, prev, pager, next" @current-change="load" />
</div>
</el-card>
<el-dialog v-model="seedOpen" title="录入敏感凭证明文源" width="520px">
<el-form label-width="120px">
<el-form-item label="账号">{{ seedForm.account }}</el-form-item>
<el-form-item v-for="k in allowedKeys" :key="k" :label="k">
<el-input v-model="seedForm.values[k]" type="password" show-password placeholder="留空则清除" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="seedOpen = false">取消</el-button>
<el-button type="primary" :loading="saving" @click="submitSeed">保存</el-button>
</template>
</el-dialog>
</div>
</template>