新增:Markdown编辑器/数据库优化/安全修复
- Markdown 编辑器:实时预览、PDF 导出、独立查看器 - 数据库优化:动态连接池、查询缓存、Redis Pipeline - 窗口置顶功能 - 文件系统增强:右键菜单、编辑器集成、收藏夹重构 - 安全修复:XSS 防护、路径穿越、HTML 注入 - 代码质量:正则预编译、缓存锁优化、死代码清理
This commit is contained in:
@@ -66,12 +66,20 @@ export const useConfigStore = defineStore('config', () => {
|
||||
const defaultTab = computed(() => appConfig.value.defaultTab)
|
||||
|
||||
// ==================== 核心方法 ====================
|
||||
let _retryCount = 0
|
||||
const MAX_RETRIES = 30 // 最多重试30次(约30秒)
|
||||
|
||||
/**
|
||||
* 加载配置
|
||||
*/
|
||||
const loadConfig = async () => {
|
||||
if (!window.go?.main?.App) {
|
||||
console.warn('Wails 绑定未准备好,1秒后重试')
|
||||
_retryCount++
|
||||
if (_retryCount > MAX_RETRIES) {
|
||||
console.error('Wails 绑定初始化超时,使用默认配置')
|
||||
useDefaultConfig()
|
||||
return
|
||||
}
|
||||
setTimeout(loadConfig, 1000)
|
||||
return
|
||||
}
|
||||
@@ -104,9 +112,10 @@ export const useConfigStore = defineStore('config', () => {
|
||||
appConfig.value = {
|
||||
tabs: [
|
||||
{ key: 'file-system', title: '文件管理', visible: true, enabled: true },
|
||||
{ key: 'db-cli', title: '数据库', visible: true, enabled: true }
|
||||
{ key: 'db-cli', title: '数据库', visible: true, enhanced: true },
|
||||
{ key: 'markdown-editor', title: 'Markdown 编辑器', visible: true, enabled: true }
|
||||
],
|
||||
visibleTabs: ['file-system', 'db-cli'],
|
||||
visibleTabs: ['file-system', 'db-cli', 'markdown-editor'],
|
||||
defaultTab: 'file-system'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user