shortcuts dev...
This commit is contained in:
@@ -489,4 +489,20 @@ export const I18N = {
|
||||
zh: `恢复默认`,
|
||||
en: `Restore Default`,
|
||||
},
|
||||
shortcuts_setting: {
|
||||
zh: `快捷键设置`,
|
||||
en: `Shortcuts Setting`,
|
||||
},
|
||||
toggle_translate_shortcut: {
|
||||
zh: `开启翻译快捷键`,
|
||||
en: `Toggle Translate Shortcut`,
|
||||
},
|
||||
toggle_style_shortcut: {
|
||||
zh: `切换样式快捷键`,
|
||||
en: `Toggle Style Shortcut`,
|
||||
},
|
||||
toggle_popup_shortcut: {
|
||||
zh: `打开弹窗快捷键`,
|
||||
en: `Open Popup Shortcut`,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -238,6 +238,16 @@ export const DEFAULT_TRANS_APIS = {
|
||||
},
|
||||
};
|
||||
|
||||
// 默认快捷键
|
||||
export const OPT_SHORTCUT_TRANSLATE = "toggleTranslate";
|
||||
export const OPT_SHORTCUT_STYLE = "toggleStyle";
|
||||
export const OPT_SHORTCUT_POPUP = "togglePopup";
|
||||
export const DEFAULT_SHORTCUTS = {
|
||||
[OPT_SHORTCUT_TRANSLATE]: ["Alt", "q"],
|
||||
[OPT_SHORTCUT_STYLE]: ["Alt", "c"],
|
||||
[OPT_SHORTCUT_POPUP]: ["Alt", "k"],
|
||||
};
|
||||
|
||||
export const TRANS_MIN_LENGTH = 5; // 最短翻译长度
|
||||
export const TRANS_MAX_LENGTH = 5000; // 最长翻译长度
|
||||
export const TRANS_NEWLINE_LENGTH = 40; // 换行字符数
|
||||
@@ -256,6 +266,7 @@ export const DEFAULT_SETTING = {
|
||||
owSubrule: DEFAULT_OW_RULE, // 覆写订阅规则
|
||||
transApis: DEFAULT_TRANS_APIS, // 翻译接口
|
||||
mouseKey: OPT_MOUSEKEY_DISABLE, // 鼠标悬停翻译
|
||||
shortcuts: DEFAULT_SHORTCUTS, // 快捷键
|
||||
};
|
||||
|
||||
export const DEFAULT_RULES = [GLOBLA_RULE];
|
||||
|
||||
Reference in New Issue
Block a user