From c01cebb5d1cdb94db2d9f49dfb653623a84f45de Mon Sep 17 00:00:00 2001 From: purocean Date: Mon, 7 Mar 2022 19:08:45 +0800 Subject: [PATCH] upd: rename file --- src/renderer/components/ExportPanel.vue | 8 ++--- src/renderer/plugins.ts | 4 +-- ...-rendered-content.tsx => copy-content.tsx} | 32 +++++++++---------- src/share/i18n/languages/en.ts | 4 +-- src/share/i18n/languages/zh-CN.ts | 4 +-- 5 files changed, 26 insertions(+), 26 deletions(-) rename src/renderer/plugins/{copy-rendered-content.tsx => copy-content.tsx} (83%) diff --git a/src/renderer/components/ExportPanel.vue b/src/renderer/components/ExportPanel.vue index 6cf963d9..0d92921c 100644 --- a/src/renderer/components/ExportPanel.vue +++ b/src/renderer/components/ExportPanel.vue @@ -62,10 +62,10 @@ diff --git a/src/renderer/plugins.ts b/src/renderer/plugins.ts index 384a6eab..40bb705b 100644 --- a/src/renderer/plugins.ts +++ b/src/renderer/plugins.ts @@ -46,7 +46,7 @@ import markdownHeadingNumber from '@fe/plugins/markdown-heading-number' import syncScroll from '@fe/plugins/sync-scroll' import imageLocalization from '@fe/plugins/image-localization' import imageHostingPicgo from '@fe/plugins/image-hosting-picgo' -import copyRenderedContent from '@fe/plugins/copy-rendered-content' +import copyContent from '@fe/plugins/copy-content' import sharePreview from '@fe/plugins/share-preview' export default [ @@ -98,6 +98,6 @@ export default [ syncScroll, imageLocalization, imageHostingPicgo, - copyRenderedContent, + copyContent, sharePreview, ] diff --git a/src/renderer/plugins/copy-rendered-content.tsx b/src/renderer/plugins/copy-content.tsx similarity index 83% rename from src/renderer/plugins/copy-rendered-content.tsx rename to src/renderer/plugins/copy-content.tsx index 9fefcb7c..0f4d2cb2 100644 --- a/src/renderer/plugins/copy-rendered-content.tsx +++ b/src/renderer/plugins/copy-content.tsx @@ -2,7 +2,7 @@ import type { Plugin } from '@fe/context' import type Token from 'markdown-it/lib/token' export default { - name: 'copy-rendered-content', + name: 'copy-content', register: (ctx) => { const options = ctx.lib.vue.reactive({ inlineStyle: false, @@ -24,22 +24,22 @@ export default { } }) - return () =>
+ return () =>
-
{ctx.i18n.t('copy-rendered-content.type')}
+
{ctx.i18n.t('copy-content.type')}
- +
-
{ctx.i18n.t('copy-rendered-content.options')}
+
{ctx.i18n.t('copy-content.options')}
- - - {options.type !== 'markdown' && } - {options.type !== 'markdown' && } + + + {options.type !== 'markdown' && } + {options.type !== 'markdown' && }
@@ -108,7 +108,7 @@ export default { : await ctx.view.getContentHtml(options) if (Date.now() - startedAt > 3000) { - await ctx.ui.useModal().alert({ content: ctx.i18n.t('copy-rendered-content.complete') }) + await ctx.ui.useModal().alert({ content: ctx.i18n.t('copy-content.complete') }) } if (options.type === 'rtf') { @@ -127,7 +127,7 @@ export default { ctx.statusBar.tapMenus(menus => { menus['status-bar-tool']?.list?.push( { - id: 'plugin.copy-rendered-content.copy-content', + id: 'plugin.copy-content.copy-content', type: 'normal', title: ctx.i18n.t('status-bar.tool.copy-content'), onClick: () => copyContent() @@ -136,26 +136,26 @@ export default { }) ctx.theme.addStyles(` - .copy-rendered-content { + .copy-content { margin-top: 20px; } - .copy-rendered-content > div { + .copy-content > div { padding: 4px 12px; display: flex; } - .copy-rendered-content > div > div { + .copy-content > div > div { display: flex; flex-wrap: wrap; } - .copy-rendered-content .label { + .copy-content .label { width: 100px; flex: none; } - .copy-rendered-content label { + .copy-content label { margin-left: 12px; white-space: nowrap; margin-bottom: 8px; diff --git a/src/share/i18n/languages/en.ts b/src/share/i18n/languages/en.ts index 52ea27c6..95c7c356 100644 --- a/src/share/i18n/languages/en.ts +++ b/src/share/i18n/languages/en.ts @@ -222,7 +222,7 @@ const data = { 'tool': 'Tool', 'convert-img-link': 'Download Remote Image', 'macro-copy-markdown': 'Copy Markdown after Macro Replacement', - 'copy-content': 'Copy Rendered Content', + 'copy-content': 'Copy Content', 'doc-history': 'Document History', 'share-preview': 'Share Preview', }, @@ -483,7 +483,7 @@ const data = { 'hint': 'Input some message (optional)', }, }, - 'copy-rendered-content': { + 'copy-content': { 'options': 'Options: ', 'type': 'Copy Type: ', 'inline-style': 'Inline Style', diff --git a/src/share/i18n/languages/zh-CN.ts b/src/share/i18n/languages/zh-CN.ts index ff568cb1..cc3d9f6d 100644 --- a/src/share/i18n/languages/zh-CN.ts +++ b/src/share/i18n/languages/zh-CN.ts @@ -223,7 +223,7 @@ const data: BaseLanguage = { 'tool': '工具', 'convert-img-link': '下载外链图片', 'macro-copy-markdown': '复制宏替换后的 Markdown', - 'copy-content': '复制渲染内容', + 'copy-content': '复制内容', 'doc-history': '文档历史版本', 'share-preview': '分享预览', }, @@ -484,7 +484,7 @@ const data: BaseLanguage = { 'hint': '输入一些信息(可选)', }, }, - 'copy-rendered-content': { + 'copy-content': { 'options': '选项: ', 'type': '复制类型: ', 'inline-style': '内联样式',