diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml index 32eb6b27..d0111539 100644 --- a/.gitee/ISSUE_TEMPLATE/bug.yml +++ b/.gitee/ISSUE_TEMPLATE/bug.yml @@ -38,11 +38,9 @@ body: - type: textarea id: info attributes: - label: '☄️ 完整的 `tauri info` 输出' - description: '请运行 “tauri info” 在控制台等待输出完毕,并将输出内容复制到此处' + label: '☄️ 完整的 `pnpm tauri info` 输出' + description: '请运行 “pnpm tauri info” 在控制台等待输出完毕,并将输出内容复制到此处' render: text - validations: - required: true - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1b4535ba..bfacd1fc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -38,11 +38,9 @@ body: - type: textarea id: info attributes: - label: '☄️ intact `tauri info` output' - description: 'Please run "tauri info" in the console and wait for the output to finish, then copy the output here' + label: '☄️ intact `pnpm tauri info` output' + description: 'Please run "pnpm tauri info" in the console and wait for the output to finish, then copy the output here' render: text - validations: - required: true - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/bug_report_cn.yml b/.github/ISSUE_TEMPLATE/bug_report_cn.yml index 8ca435a1..415ac432 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_cn.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_cn.yml @@ -38,11 +38,9 @@ body: - type: textarea id: info attributes: - label: '☄️ 完整的 `tauri info` 输出' - description: '请运行 “tauri info” 在控制台等待输出完毕,并将输出内容复制到此处' + label: '☄️ 完整的 `pnpm tauri info` 输出' + description: '请运行 “pnpm tauri info” 在控制台等待输出完毕,并将输出内容复制到此处' render: text - validations: - required: true - type: textarea attributes: diff --git a/package.json b/package.json index 1c087ba1..cd7d1174 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "author": { "name": "HuLaSpark团队", "email": "2439646234@qq.com", - "url": "https://github.com/HuLaSpark/HuLa" + "url": "https://github.com/HuLaSpark" }, "scripts": { "========= 启动vue(tauri项目会连带执行不需要单独执行) =========": "", @@ -28,8 +28,8 @@ "tauri:build:debug": "tauri build --debug", "========= 生成icon =========": "", "tauri:icon": "tauri icon hula.png", - "========= 安装依赖前执行校验包管理器 =========": "", - "preinstall": "npx only-allow pnpm", + "========= 安装依赖前执行 =========": "", + "preinstall": "npx only-allow pnpm && node scripts/check-env.js", "========= 使用commit来进行代码提交 =========": "", "commit": "git add . && git-cz", "========= 校验代码规范 =========": "", diff --git a/scripts/check-env.js b/scripts/check-env.js new file mode 100644 index 00000000..da673a03 --- /dev/null +++ b/scripts/check-env.js @@ -0,0 +1,25 @@ +import { existsSync, writeFileSync } from 'fs' +import { join } from 'path' + +// 用于写入.env.local配置文件,该文件默认不会被git管理,所以不必担心会提交到远程仓库 +const envPath = join(process.cwd(), '.env.local') + +if (!existsSync(envPath)) { + const defaultEnvContent = `# 有道云翻译key +VITE_YOUDAO_APP_KEY= +VITE_YOUDAO_APP_SECRET= +# 腾讯云翻译key +VITE_TENCENT_API_KEY= +VITE_TENCENT_SECRET_ID= +` + + try { + writeFileSync(envPath, defaultEnvContent, 'utf8') + console.log('✨ 成功创建.env.local文件') + } catch (error) { + console.error('❌ 创建.env.local文件失败:', error) + process.exit(1) + } +} else { + console.log('✅ .env.local文件已存在') +} diff --git a/src/components/common/InfoPopover.vue b/src/components/common/InfoPopover.vue index 4e7ac940..cb2eb5c3 100644 --- a/src/components/common/InfoPopover.vue +++ b/src/components/common/InfoPopover.vue @@ -5,9 +5,11 @@ - - - 在线状态 + + +

+ {{ activeStatus === OnlineEnum.ONLINE ? '在线' : '离线' }} +

@@ -57,9 +59,11 @@