input box trans

This commit is contained in:
Gabe Yuan
2023-09-13 15:53:40 +08:00
parent f8c8a4ebeb
commit 0ea97b73e3
11 changed files with 312 additions and 52 deletions

View File

@@ -189,6 +189,7 @@ export const DEFAULT_COLOR = "#209CEE"; // 默认高亮背景色/线条颜色
export const GLOBLA_RULE = {
pattern: "*",
selector: DEFAULT_SELECTOR,
inputSelector: "",
translator: OPT_TRANS_MICROSOFT,
fromLang: "auto",
toLang: "zh-CN",
@@ -198,6 +199,15 @@ export const GLOBLA_RULE = {
textDiyStyle: "",
};
export const DEFAULT_INPUT_RULE = {
transOpen: true,
translator: OPT_TRANS_MICROSOFT,
fromLang: "auto",
toLang: "en",
triggerShortcut: ["Alt", "i"],
triggerCount: 1,
};
// 订阅列表
export const DEFAULT_SUBRULES_LIST = [
{
@@ -273,6 +283,7 @@ export const DEFAULT_SETTING = {
mouseKey: OPT_MOUSEKEY_DISABLE, // 鼠标悬停翻译
shortcuts: DEFAULT_SHORTCUTS, // 快捷键
hideFab: false, // 是否隐藏按钮
inputRule: DEFAULT_INPUT_RULE, // 输入框设置
};
export const DEFAULT_RULES = [GLOBLA_RULE];