From 5789b2993f69ae0870a6c94323eec60ce987eae3 Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Thu, 2 Jun 2022 07:45:13 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8C=81=E7=BB=AD=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/ButtonBar.vue | 4 +- src/components/FindReplace.vue | 2 +- src/components/NavigationBar.vue | 12 +- src/components/Preview.vue | 2 +- src/components/SideBar.vue | 4 +- src/components/Tour.vue | 2 +- src/components/gutters/Comment.vue | 2 +- src/components/gutters/CurrentDiscussion.vue | 8 +- .../gutters/EditorNewDiscussionButton.vue | 2 +- src/components/gutters/NewComment.vue | 4 +- .../gutters/PreviewNewDiscussionButton.vue | 2 +- src/components/menus/MainMenu.vue | 4 +- src/components/menus/PublishMenu.vue | 2 +- src/components/menus/SyncMenu.vue | 2 +- src/components/modals/AboutModal.vue | 2 +- .../modals/AccountManagementModal.vue | 34 +- .../modals/BadgeManagementModal.vue | 10 +- src/components/modals/FilePropertiesModal.vue | 28 +- src/components/modals/HtmlExportModal.vue | 14 +- src/components/modals/ImageModal.vue | 12 +- src/components/modals/LinkModal.vue | 8 +- src/components/modals/PandocExportModal.vue | 8 +- src/components/modals/PdfExportModal.vue | 12 +- .../modals/PublishManagementModal.vue | 6 +- src/components/modals/SettingsModal.vue | 16 +- src/components/modals/SponsorModal.vue | 2 +- src/components/modals/SyncManagementModal.vue | 6 +- src/components/modals/TemplatesModal.vue | 22 +- .../modals/WorkspaceManagementModal.vue | 2 +- src/components/modals/common/ModalInner.vue | 2 +- .../providers/BloggerPagePublishModal.vue | 18 +- .../modals/providers/BloggerPublishModal.vue | 20 +- .../providers/CouchdbCredentialsModal.vue | 12 +- .../providers/CouchdbWorkspaceModal.vue | 12 +- .../modals/providers/DropboxAccountModal.vue | 12 +- .../modals/providers/DropboxPublishModal.vue | 14 +- .../modals/providers/DropboxSaveModal.vue | 12 +- .../modals/providers/GistPublishModal.vue | 16 +- .../modals/providers/GistSyncModal.vue | 14 +- .../modals/providers/GiteaAccountModal.vue | 14 +- .../modals/providers/GiteaOpenModal.vue | 16 +- .../modals/providers/GiteaPublishModal.vue | 20 +- .../modals/providers/GiteaSaveModal.vue | 18 +- .../modals/providers/GiteaWorkspaceModal.vue | 18 +- .../modals/providers/GiteeAccountModal.vue | 10 +- .../modals/providers/GiteeOpenModal.vue | 18 +- .../modals/providers/GiteePublishModal.vue | 20 +- .../modals/providers/GiteeSaveModal.vue | 18 +- .../modals/providers/GiteeWorkspaceModal.vue | 20 +- .../modals/providers/GithubAccountModal.vue | 10 +- .../modals/providers/GithubOpenModal.vue | 18 +- .../modals/providers/GithubPublishModal.vue | 20 +- .../modals/providers/GithubSaveModal.vue | 18 +- .../modals/providers/GithubWorkspaceModal.vue | 20 +- .../modals/providers/GitlabAccountModal.vue | 14 +- .../modals/providers/GitlabOpenModal.vue | 16 +- .../modals/providers/GitlabPublishModal.vue | 18 +- .../modals/providers/GitlabSaveModal.vue | 18 +- .../modals/providers/GitlabWorkspaceModal.vue | 18 +- .../providers/GoogleDriveAccountModal.vue | 12 +- .../providers/GoogleDrivePublishModal.vue | 12 +- .../modals/providers/GoogleDriveSaveModal.vue | 10 +- .../providers/GoogleDriveWorkspaceModal.vue | 14 +- .../modals/providers/GooglePhotoModal.vue | 10 +- .../providers/WordpressPublishModal.vue | 20 +- .../modals/providers/ZendeskAccountModal.vue | 14 +- .../modals/providers/ZendeskPublishModal.vue | 22 +- src/data/faq.md | 10 +- src/data/features.js | 374 +++++++++--------- src/data/simpleModals.js | 6 +- src/data/welcomeFile.md | 32 +- src/services/providers/helpers/giteaHelper.js | 2 + src/services/syncSvc.js | 2 +- static/landing/index.html | 2 +- 75 files changed, 626 insertions(+), 626 deletions(-) diff --git a/package.json b/package.json index 80ddac9b..0433b537 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.15.2", + "version": "5.15.5", "description": "Free, open-source, full-featured Markdown editor", "author": "Benoit Schweblin", "license": "Apache-2.0", diff --git a/src/components/ButtonBar.vue b/src/components/ButtonBar.vue index 85564891..b4ca7e83 100644 --- a/src/components/ButtonBar.vue +++ b/src/components/ButtonBar.vue @@ -4,10 +4,10 @@ - - diff --git a/src/components/FindReplace.vue b/src/components/FindReplace.vue index 837aa3a8..760f9e71 100644 --- a/src/components/FindReplace.vue +++ b/src/components/FindReplace.vue @@ -1,6 +1,6 @@ @@ -40,9 +40,7 @@ import defaultSettings from '../../data/defaults/defaultSettings.yml'; import store from '../../store'; import badgeSvc from '../../services/badgeSvc'; -const emptySettings = `# Add your custom settings here to override the -# default settings. -`; +const emptySettings = '# 增加您的自定义配置覆盖默认配置'; export default { components: { diff --git a/src/components/modals/SponsorModal.vue b/src/components/modals/SponsorModal.vue index ed700161..db648fd3 100644 --- a/src/components/modals/SponsorModal.vue +++ b/src/components/modals/SponsorModal.vue @@ -10,7 +10,7 @@ diff --git a/src/components/modals/SyncManagementModal.vue b/src/components/modals/SyncManagementModal.vue index cfac0dae..41ce5855 100644 --- a/src/components/modals/SyncManagementModal.vue +++ b/src/components/modals/SyncManagementModal.vue @@ -16,7 +16,7 @@ {{location.description}}
-
@@ -26,10 +26,10 @@ {{location.url || 'Google Drive app data'}}
- - +
diff --git a/src/components/modals/TemplatesModal.vue b/src/components/modals/TemplatesModal.vue index 3e25768e..71dd44a1 100644 --- a/src/components/modals/TemplatesModal.vue +++ b/src/components/modals/TemplatesModal.vue @@ -1,8 +1,8 @@ diff --git a/src/components/modals/WorkspaceManagementModal.vue b/src/components/modals/WorkspaceManagementModal.vue index 04b6aa53..49ede22d 100644 --- a/src/components/modals/WorkspaceManagementModal.vue +++ b/src/components/modals/WorkspaceManagementModal.vue @@ -1,5 +1,5 @@ diff --git a/src/components/modals/PandocExportModal.vue b/src/components/modals/PandocExportModal.vue index 4374fca6..84ea4d14 100644 --- a/src/components/modals/PandocExportModal.vue +++ b/src/components/modals/PandocExportModal.vue @@ -29,7 +29,6 @@ import FileSaver from 'file-saver'; import networkSvc from '../../services/networkSvc'; import editorSvc from '../../services/editorSvc'; -import googleHelper from '../../services/providers/helpers/googleHelper'; import modalTemplate from './common/modalTemplate'; import store from '../../store'; import badgeSvc from '../../services/badgeSvc'; @@ -45,15 +44,11 @@ export default modalTemplate({ const currentContent = store.getters['content/current']; const { selectedFormat } = this; store.dispatch('queue/enqueue', async () => { - const tokenToRefresh = store.getters['workspace/sponsorToken']; - const sponsorToken = tokenToRefresh && await googleHelper.refreshToken(tokenToRefresh); - try { const { body } = await networkSvc.request({ method: 'POST', url: 'pandocExport', params: { - idToken: sponsorToken && sponsorToken.idToken, format: selectedFormat, options: JSON.stringify(store.getters['data/computedSettings'].pandoc), metadata: JSON.stringify(currentContent.properties), @@ -65,12 +60,8 @@ export default modalTemplate({ FileSaver.saveAs(body, `${currentFile.name}.${selectedFormat}`); badgeSvc.addBadge('exportPandoc'); } catch (err) { - if (err.status === 401) { - store.dispatch('modal/open', 'sponsorOnly'); - } else { - console.error(err); // eslint-disable-line no-console - store.dispatch('notification/error', err); - } + console.error(err); // eslint-disable-line no-console + store.dispatch('notification/error', err); } }); }, diff --git a/src/components/modals/PdfExportModal.vue b/src/components/modals/PdfExportModal.vue index fad5ba51..971c01f1 100644 --- a/src/components/modals/PdfExportModal.vue +++ b/src/components/modals/PdfExportModal.vue @@ -24,7 +24,6 @@ import FileSaver from 'file-saver'; import exportSvc from '../../services/exportSvc'; import networkSvc from '../../services/networkSvc'; -import googleHelper from '../../services/providers/helpers/googleHelper'; import modalTemplate from './common/modalTemplate'; import store from '../../store'; import badgeSvc from '../../services/badgeSvc'; @@ -38,24 +37,17 @@ export default modalTemplate({ this.config.resolve(); const currentFile = store.getters['file/current']; store.dispatch('queue/enqueue', async () => { - const [sponsorToken, html] = await Promise.all([ - Promise.resolve().then(() => { - const tokenToRefresh = store.getters['workspace/sponsorToken']; - return tokenToRefresh && googleHelper.refreshToken(tokenToRefresh); - }), - exportSvc.applyTemplate( - currentFile.id, - this.allTemplatesById[this.selectedTemplate], - true, - ), - ]); + const html = await exportSvc.applyTemplate( + currentFile.id, + this.allTemplatesById[this.selectedTemplate], + true, + ); try { const { body } = await networkSvc.request({ method: 'POST', url: 'pdfExport', params: { - idToken: sponsorToken && sponsorToken.idToken, options: JSON.stringify(store.getters['data/computedSettings'].wkhtmltopdf), }, body: html, @@ -65,12 +57,8 @@ export default modalTemplate({ FileSaver.saveAs(body, `${currentFile.name}.pdf`); badgeSvc.addBadge('exportPdf'); } catch (err) { - if (err.status === 401) { - store.dispatch('modal/open', 'sponsorOnly'); - } else { - console.error(err); // eslint-disable-line no-console - store.dispatch('notification/error', err); - } + console.error(err); // eslint-disable-line no-console + store.dispatch('notification/error', err); } }); }, diff --git a/src/components/modals/SyncManagementModal.vue b/src/components/modals/SyncManagementModal.vue index 41ce5855..38d0f120 100644 --- a/src/components/modals/SyncManagementModal.vue +++ b/src/components/modals/SyncManagementModal.vue @@ -4,8 +4,8 @@ -

{{currentFileName}} is synchronized with the following location(s):

-

{{currentFileName}} is not synchronized yet.

+

{{currentFileName}} 与以下位置同步:

+

{{currentFileName}}尚未同步。

@@ -23,7 +23,7 @@
- {{location.url || 'Google Drive app data'}} + {{location.url || 'Gitee app data'}}
diff --git a/src/components/modals/WorkspaceManagementModal.vue b/src/components/modals/WorkspaceManagementModal.vue index 49ede22d..4a0906ea 100644 --- a/src/components/modals/WorkspaceManagementModal.vue +++ b/src/components/modals/WorkspaceManagementModal.vue @@ -1,10 +1,10 @@