()
| 55 | inputBoxTranslationTarget: string; // 输入框翻译目标语言 |
| 56 | |
| 57 | constructor() { |
| 58 | this.on = true; |
| 59 | this.autoTranslate = false; |
| 60 | this.from = defaultOption.from; |
| 61 | this.to = defaultOption.to; |
| 62 | this.style = defaultOption.style; |
| 63 | this.display = defaultOption.display; |
| 64 | this.hotkey = defaultOption.hotkey; |
| 65 | this.service = defaultOption.service; |
| 66 | this.token = {}; |
| 67 | this.ak = ''; |
| 68 | this.sk = ''; |
| 69 | this.appid = ''; |
| 70 | this.key = ''; |
| 71 | this.model = {}; |
| 72 | this.customModel = {}; |
| 73 | this.proxy = {}; |
| 74 | this.custom = defaultOption.custom; |
| 75 | this.extra = {}; |
| 76 | this.robot_id = {}; |
| 77 | this.system_role = systemRoleFactory(); |
| 78 | this.user_role = userRoleFactory(); |
| 79 | this.count = 0; |
| 80 | this.theme = 'auto'; // 默认跟随系统 |
| 81 | this.useCache = true; // 默认开启缓存 |
| 82 | this.disableFloatingBall = false; // 默认启用悬浮球 |
| 83 | this.floatingBallPosition = 'right'; // 默认在右侧 |
| 84 | this.floatingBallHotkey = 'Alt+T'; // 默认快捷键为 Alt+T |
| 85 | this.customFloatingBallHotkey = ''; // 自定义快捷键为空 |
| 86 | this.customHotkey = ''; // 自定义鼠标悬浮快捷键为空 |
| 87 | this.disableSelectionTranslator = false; // 默认不禁用划词翻译 |
| 88 | this.deeplx = ''; // DeepLX 默认服务地址 |
| 89 | this.selectionTranslatorMode = 'bilingual'; // 默认双语显示模式 |
| 90 | this.newApiUrl = 'http://localhost:3000'; // NewAPI 默认地址 |
| 91 | this.maxConcurrentTranslations = 6; // 默认最大并发数为6 |
| 92 | this.youdaoAppKey = ''; // 有道翻译 App Key |
| 93 | this.youdaoAppSecret = ''; // 有道翻译 App Secret |
| 94 | this.tencentSecretId = ''; // 腾讯云 Secret ID |
| 95 | this.tencentSecretKey = ''; // 腾讯云 Secret Key |
| 96 | this.azureOpenaiEndpoint = ''; // Azure OpenAI 端点地址 |
| 97 | this.animations = true; // 默认启用动画 |
| 98 | this.translationStatus = true; // 默认启用翻译进度面板 |
| 99 | this.inputBoxTranslationTrigger = 'disabled'; // 默认关闭输入框翻译 |
| 100 | this.inputBoxTranslationTarget = 'en'; // 默认翻译成英文 |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // 构建所有服务的 system_role |
nothing calls this directly
no test coverage detected