feat: 支持4种OpenBridge主题切换,统一项目命名和端口配置

- 添加 OpenBridge 四种主题切换 (day/bright/dusk/night)
- 实现 DJB2 hash 算法生成项目专用端口 (14323)
- 统一项目名称为 openbridge-token-usage-viewer
- 更新 Tauri 应用名称、sidecar 命名和窗口标题
- 开发服务器端口从 3000 改为基于项目名称的稳定端口
This commit is contained in:
2026-01-22 13:02:43 +08:00
parent d077dfdd90
commit b520cdaf35
10 changed files with 189 additions and 36 deletions

View File

@@ -16,6 +16,13 @@ import { Schema } from '@effect/schema'
import { $ } from 'bun'
import { Console, Context, Data, Effect, Layer } from 'effect'
// ============================================================================
// 项目配置
// ============================================================================
/** 项目名称 - 用于生成 sidecar 文件名 */
const PROJECT_NAME = 'openbridge-token-usage-viewer'
// ============================================================================
// 领域模型和 Schema 定义
// ============================================================================
@@ -195,7 +202,7 @@ class BuildService extends Context.Tag('BuildService')<
Bun.build({
entrypoints: [config.entrypoint],
compile: {
outfile: `app-${targetMap[target]}`,
outfile: `${PROJECT_NAME}-${targetMap[target]}`,
target: target,
},
outdir: config.outputDir,
@@ -227,7 +234,7 @@ class BuildService extends Context.Tag('BuildService')<
Bun.build({
entrypoints: [config.entrypoint],
compile: {
outfile: `app-${targetMap[target]}`,
outfile: `${PROJECT_NAME}-${targetMap[target]}`,
target: target,
},
outdir: config.outputDir,