Skip to content

Commit 3589e79

Browse files
committed
update preferences
1 parent b26d98c commit 3589e79

11 files changed

Lines changed: 43 additions & 82 deletions

File tree

README-en.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ Supports:
256256
- Edit styles
257257
- Execute arbitrary logic
258258

259-
> Supports user-defined commands, please modify the configuration file
260-
261259
![slash_commands](assets/slash_commands.gif)
262260

263261

@@ -267,8 +265,6 @@ Function: Similar to Obsidian's file template function, quickly create files bas
267265

268266
Usage: Right-click menu -> Often Used Plugins -> Secondary Plugins -> File Templates.
269267

270-
> For the template list, please modify the configuration file.
271-
272268
![templater](assets/templater.gif)
273269

274270

@@ -381,7 +377,7 @@ Examples:
381377

382378
All plugins support direct invocation through the right-click menu. Mouse enthusiasts can use the right-click menu as the main way to call all plugins.
383379

384-
You can customize the right-click menu by modifying the configuration file:
380+
You can customize the right-click menu by modifying the configuration:
385381

386382
```toml
387383
# Each MENUS corresponds to a primary menu, allowing unlimited additions of primary menus and repeated addition of the same plugin

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,6 @@ yay -S typora-plugin
267267
- 编辑样式
268268
- 执行任意逻辑
269269

270-
> 支持用户自定义命令,请前往配置文件修改
271-
272270
![slash_commands](assets/slash_commands.gif)
273271

274272

@@ -279,8 +277,6 @@ yay -S typora-plugin
279277

280278
使用方式:右键菜单 -> 常用插件 -> 二级插件 -> 文件模板。
281279

282-
> 模板列表请前往配置文件修改。
283-
284280
![templater](assets/templater.gif)
285281

286282

@@ -400,7 +396,7 @@ BUILTIN = [
400396

401397
所有插件都支持在右键菜单中直接调用。鼠标党可以将右键菜单作为所有插件的主要调用方式。
402398

403-
可以通过修改配置文件自定义右键菜单
399+
可以通过修改配置自定义右键菜单
404400

405401
```toml
406402
# 每一个MENUS对应一个一级菜单,允许无限添加一级菜单,允许重复添加同一个插件

plugin/commander.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class commanderPlugin extends BasePlugin {
6868
this.act_value_prefix = "call_builtin@"
6969
const defaultAct = { act_name: this.i18n.t("act.toggle_modal"), act_value: "toggle_modal", act_hotkey: this.config.HOTKEY }
7070
const customActs = this.builtin
71-
.filter(a => a.name)
71+
.filter(a => a.name && a.cmd)
7272
.map(a => ({ act_name: a.name, act_value: this.act_value_prefix + a.name, act_hotkey: a.hotkey }))
7373
this.staticActions = [defaultAct, ...customActs]
7474
}

plugin/custom/plugins/markdownLint/index.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class markdownLintPlugin extends BaseCustomPlugin {
1616
<div class="plugin-markdownlint-icon ion-wrench" action="fixAll" ty-hint="${this.i18n.t("func.fixAll")}"></div>
1717
<div class="plugin-markdownlint-icon ion-earth" action="translate" ty-hint="${this.i18n.t("func.translate")}"></div>
1818
<div class="plugin-markdownlint-icon ion-information-circled" action="detailAll" ty-hint="${this.i18n.t("func.detailAll")}"></div>
19-
<div class="plugin-markdownlint-icon ion-gear-b" action="settings" ty-hint="${this.i18n.t("func.settings")}"></div>
2019
<div class="plugin-markdownlint-icon ion-document-text" action="doc" ty-hint="${this.i18n.t("func.doc")}"></div>
2120
</div>
2221
<div class="plugin-markdownlint-table">
@@ -113,15 +112,6 @@ class markdownLintPlugin extends BaseCustomPlugin {
113112
const op = { title, components, width: "600px" }
114113
this.utils.dialog.modal(op)
115114
},
116-
settings: () => {
117-
const title = this.i18n.t("func.settings")
118-
const label = this.i18n.t("editConfigFile") + " " + '<a class="fa fa-external-link"></a>'
119-
const onclick = ev => ev.target.closest("a") && this.utils.settings.openSettingFolder("custom_plugin.user.toml")
120-
const content = JSON.stringify(this.config.rule_config, null, "\t")
121-
const components = [{ label: label, type: "p", onclick }, { label: "", type: "textarea", rows: 15, content }]
122-
const op = { title, components, width: "600px" }
123-
this.utils.dialog.modal(op)
124-
},
125115
jumpToLine: lineToGo => {
126116
if (!lineToGo) return
127117
if (!File.editor.sourceView.inSourceMode) {

plugin/global/locales/en.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@
810810
"$label.DEFAULT_FORMAT_BRUSH": "Format Brush",
811811
"$label.ACTION_HOTKEYS.hotkey": "Hotkey",
812812
"$label.ACTION_HOTKEYS.action": "Action",
813-
"$title.COLOR_TABLE": "Preset List for Color Buttons",
814-
"$title.ACTION_HOTKEYS": "Preset List for Hotkey Mappings",
813+
"$title.COLOR_TABLE": "Preset Color Palette",
814+
"$title.ACTION_HOTKEYS": "Preset Hotkey",
815815
"$title.toolBar": "Toolbar",
816816
"$title.buttonDefaultOptions": "Default Values for Buttons",
817817
"$tooltip.brushExample": "Example: color:#FFF; font-weight:bold;"
@@ -880,7 +880,6 @@
880880
"slash_commands": {
881881
"pluginName": "Slash Commands",
882882
"unknown": "Unknown",
883-
"editConfigFile": "To customize commands, please edit the configuration file",
884883
"type.command": "Command",
885884
"type.snippet": "Snippet",
886885
"type.generateSnippet": "Dynamic Snippet",
@@ -918,7 +917,7 @@
918917
"$label.COMMANDS.cursorOffset.0": "Cursor Start Offset",
919918
"$label.COMMANDS.cursorOffset.1": "Cursor End Offset",
920919
"$label.COMMANDS.callback": "Callback",
921-
"$title.COMMANDS": "Preset Command List",
920+
"$title.COMMANDS": "Preset Commands",
922921
"$title.COMMANDS.callback": "Callback",
923922
"$title.trigger": "Command Trigger"
924923
},
@@ -980,15 +979,14 @@
980979
"hotkeys": {
981980
"pluginName": "Hotkeys",
982981
"registeredHotkey": "Registered Hotkeys",
983-
"editConfigFile": "To customize hotkeys, please edit the configuration file",
984982
"$label.CUSTOM_HOTKEYS.enable": "Enable",
985983
"$label.CUSTOM_HOTKEYS.hotkey": "Hotkey",
986984
"$label.CUSTOM_HOTKEYS.desc": "Desc",
987985
"$label.CUSTOM_HOTKEYS.plugin": "Plugin",
988986
"$label.CUSTOM_HOTKEYS.function": "Plugin Function",
989987
"$label.CUSTOM_HOTKEYS.closestSelector": "Cursor Closest Selector",
990988
"$label.CUSTOM_HOTKEYS.evil": "Callback",
991-
"$title.CUSTOM_HOTKEYS": "Custom Hotkey List",
989+
"$title.CUSTOM_HOTKEYS": "Custom Hotkey",
992990
"$title.CUSTOM_HOTKEYS.evil": "Callback"
993991
},
994992
"help": {
@@ -1185,7 +1183,7 @@
11851183
"$label.list.icon": "Icon",
11861184
"$label.list.background_color": "Background Color",
11871185
"$label.list.left_line_color": "Left Line Color",
1188-
"$title.list": "Preset Callouts List",
1186+
"$title.list": "Preset Callouts",
11891187
"$title.style": "Style",
11901188
"$title.mouseHover": "Mouse Hover",
11911189
"$title.fontFamily": "Icon Font",
@@ -1205,9 +1203,9 @@
12051203
"$label.template_variables.callback": "Callback",
12061204
"$label.template.name": "Name",
12071205
"$label.template.text": "Template",
1208-
"$title.template_variables": "Custom Template Variables List",
1206+
"$title.template_variables": "Custom Template Variables",
12091207
"$title.template_variables.callback": "Callback",
1210-
"$title.template": "Custom Template List",
1208+
"$title.template": "Custom Templates",
12111209
"$title.template.text": "Template"
12121210
},
12131211
"chineseSymbolAutoPairer": {
@@ -1377,7 +1375,7 @@
13771375
"$option.thumbnail_object_fit.contain": "Scale to Fit",
13781376
"$option.thumbnail_object_fit.cover": "Crop to Fit",
13791377
"$option.thumbnail_object_fit.scale-down": "Scale Down",
1380-
"$title.hotkey_function": "Preset Hotkey List",
1378+
"$title.hotkey_function": "Preset Hotkey",
13811379
"$title.style": "Style",
13821380
"$title.component": "Component",
13831381
"$title.behavior": "Behavior",
@@ -1391,15 +1389,13 @@
13911389
"desc": "DESC",
13921390
"ops": "OPS",
13931391
"gotoWeb": "The following is a brief description of the rules, visit the website for a complete document",
1394-
"editConfigFile": "For security, modifying the rules here is prohibited. Edit the configuration file to make changes",
13951392
"func.close": "Close",
13961393
"func.move": "Move",
13971394
"func.refresh": "Refresh",
13981395
"func.toggleSourceMode": "Source Mode",
13991396
"func.fixAll": "Fix",
14001397
"func.translate": "Translate",
14011398
"func.detailAll": "Information",
1402-
"func.settings": "Configuration",
14031399
"func.doc": "Rules",
14041400
"func.fixAll.ok": "Lint Errors Fixed",
14051401
"MD001": "Heading levels must increment by one",
@@ -1503,7 +1499,7 @@
15031499
"$label.buttons.hint": "Hint",
15041500
"$label.buttons.callback": "Callback",
15051501
"$label.buttons.evil": "Custom Callback",
1506-
"$title.buttons": "Preset Button List",
1502+
"$title.buttons": "Preset Button",
15071503
"$title.buttonStyle": "Button Style",
15081504
"$title.buttons.evil": "Custom Callback"
15091505
},

plugin/global/locales/zh-CN.json

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
"$tooltip.blockOrder": "副作用:影响高亮块顺序",
264264
"$title.ALLOW_EXT": "允许文件扩展名",
265265
"$title.IGNORE_FOLDERS": "忽略搜索的文件夹",
266-
"$title.HIGHLIGHT_COLORS": "高亮颜色列表",
266+
"$title.HIGHLIGHT_COLORS": "高亮颜色",
267267
"$title.searchResult": "搜索结果",
268268
"$title.search": "搜索",
269269
"$title.windowInteraction": "窗口交互"
@@ -293,7 +293,7 @@
293293
"$label.BUILTIN.cmd": "命令",
294294
"$title.cmdDisplay": "命令显示方式",
295295
"$title.windowInteraction": "窗口交互",
296-
"$title.BUILTIN": "预设的常用命令列表"
296+
"$title.BUILTIN": "预设命令"
297297
},
298298
"md_padding": {
299299
"pluginName": "中英文混排优化",
@@ -568,7 +568,7 @@
568568
"$label.DEFAULT_FENCE_OPTIONS.height": "图形高度",
569569
"$label.DEFAULT_FENCE_OPTIONS.backgroundColor": "图形背景颜色",
570570
"$title.DEFAULT_TOC_OPTIONS.color": "思维导图默认配色方案",
571-
"$title.CANDIDATE_COLOR_SCHEMES": "思维导图的预设配色方案列表",
571+
"$title.CANDIDATE_COLOR_SCHEMES": "思维导图的配色方案",
572572
"$title.DEFAULT_FENCE_OPTIONS.color": "代码块图形默认配色方案",
573573
"$title.FENCE_TEMPLATE": "模板",
574574
"$title.mindmapDiagram": "思维导图",
@@ -626,7 +626,7 @@
626626
"$label.LAYOUTS.layout.image": "图片",
627627
"$label.LAYOUTS.layout.fence": "代码块",
628628
"$label.ENABLE_WHEN_EXPORT": "导出为 HTML、PDF 时保留编号",
629-
"$title.LAYOUTS": "预设的编号格式列表",
629+
"$title.LAYOUTS": "编号格式",
630630
"$title.autoNumbering": "自动编号",
631631
"$title.style": "样式"
632632
},
@@ -810,8 +810,8 @@
810810
"$label.DEFAULT_FORMAT_BRUSH": "格式刷",
811811
"$label.ACTION_HOTKEYS.hotkey": "快捷键",
812812
"$label.ACTION_HOTKEYS.action": "动作",
813-
"$title.COLOR_TABLE": "颜色按钮的预设列表",
814-
"$title.ACTION_HOTKEYS": "快捷键映射的预设列表",
813+
"$title.COLOR_TABLE": "预设调色板",
814+
"$title.ACTION_HOTKEYS": "快捷键",
815815
"$title.toolBar": "工具栏",
816816
"$title.buttonDefaultOptions": "按钮的默认值",
817817
"$tooltip.brushExample": "例如:color:#FFF; font-weight:bold;"
@@ -880,7 +880,6 @@
880880
"slash_commands": {
881881
"pluginName": "斜杠命令",
882882
"unknown": "未知",
883-
"editConfigFile": "如需自定义命令,请修改配置文件",
884883
"type.command": "命令",
885884
"type.snippet": "文段",
886885
"type.generateSnippet": "动态文段",
@@ -918,7 +917,7 @@
918917
"$label.COMMANDS.cursorOffset.0": "光标的开始偏移量",
919918
"$label.COMMANDS.cursorOffset.1": "光标的结束偏移量",
920919
"$label.COMMANDS.callback": "回调",
921-
"$title.COMMANDS": "预设的命令列表",
920+
"$title.COMMANDS": "预设命令",
922921
"$title.COMMANDS.callback": "回调",
923922
"$title.trigger": "命令触发"
924923
},
@@ -980,15 +979,14 @@
980979
"hotkeys": {
981980
"pluginName": "快捷键中心",
982981
"registeredHotkey": "已注册快捷键",
983-
"editConfigFile": "如需自定义快捷键,请修改配置文件",
984982
"$label.CUSTOM_HOTKEYS.enable": "启用",
985983
"$label.CUSTOM_HOTKEYS.hotkey": "快捷键",
986984
"$label.CUSTOM_HOTKEYS.desc": "说明",
987985
"$label.CUSTOM_HOTKEYS.plugin": "插件",
988986
"$label.CUSTOM_HOTKEYS.function": "插件方法",
989987
"$label.CUSTOM_HOTKEYS.closestSelector": "适用光标的选择器",
990988
"$label.CUSTOM_HOTKEYS.evil": "回调",
991-
"$title.CUSTOM_HOTKEYS": "自定义快捷键列表",
989+
"$title.CUSTOM_HOTKEYS": "自定义快捷键",
992990
"$title.CUSTOM_HOTKEYS.evil": "回调"
993991
},
994992
"help": {
@@ -1185,7 +1183,7 @@
11851183
"$label.list.icon": "图标",
11861184
"$label.list.background_color": "背景颜色",
11871185
"$label.list.left_line_color": "左侧竖线颜色",
1188-
"$title.list": "预设的 Callouts 列表",
1186+
"$title.list": "预设 Callouts",
11891187
"$title.style": "样式",
11901188
"$title.mouseHover": "鼠标悬停",
11911189
"$title.fontFamily": "字体图标",
@@ -1205,9 +1203,9 @@
12051203
"$label.template_variables.callback": "回调",
12061204
"$label.template.name": "名称",
12071205
"$label.template.text": "模板",
1208-
"$title.template_variables": "自定义模板变量列表",
1206+
"$title.template_variables": "自定义模板变量",
12091207
"$title.template_variables.callback": "回调",
1210-
"$title.template": "自定义模板列表",
1208+
"$title.template": "自定义模板",
12111209
"$title.template.text": "模板"
12121210
},
12131211
"chineseSymbolAutoPairer": {
@@ -1377,7 +1375,7 @@
13771375
"$option.thumbnail_object_fit.contain": "保持比例缩放",
13781376
"$option.thumbnail_object_fit.cover": "保持原有尺寸,裁剪超出部分",
13791377
"$option.thumbnail_object_fit.scale-down": "保持比例缩放,当图片小于容器时图片不放大",
1380-
"$title.hotkey_function": "预设的快捷键列表",
1378+
"$title.hotkey_function": "预设快捷键",
13811379
"$title.style": "样式",
13821380
"$title.component": "组件",
13831381
"$title.behavior": "行为",
@@ -1391,15 +1389,13 @@
13911389
"desc": "说明",
13921390
"ops": "操作",
13931391
"gotoWeb": "以下是格式规范的简要说明,完整文档请访问网站",
1394-
"editConfigFile": "为了保护用户,此处禁止修改检测规则,如需修改请编辑配置文件",
13951392
"func.close": "关闭",
13961393
"func.move": "移动",
13971394
"func.refresh": "刷新",
13981395
"func.toggleSourceMode": "源码模式",
13991396
"func.fixAll": "修复",
14001397
"func.translate": "翻译",
14011398
"func.detailAll": "详细信息",
1402-
"func.settings": "配置",
14031399
"func.doc": "规则",
14041400
"func.fixAll.ok": "已修复格式错误",
14051401
"MD001": "标题层级应逐级递增,不可跳级",
@@ -1503,7 +1499,7 @@
15031499
"$label.buttons.hint": "提示",
15041500
"$label.buttons.callback": "回调",
15051501
"$label.buttons.evil": "自定义回调",
1506-
"$title.buttons": "预设的按钮列表",
1502+
"$title.buttons": "预设按钮",
15071503
"$title.buttonStyle": "按钮样式",
15081504
"$title.buttons.evil": "自定义回调"
15091505
},

0 commit comments

Comments
 (0)