From 492958702a3cca1cb8c3334700ae26310ee9dcf8 Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Tue, 26 Jul 2022 17:14:49 +0800 Subject: [PATCH] =?UTF-8?q?gitea=E6=94=AF=E6=8C=81http?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menus/PublishMenu.vue | 4 +-- src/components/menus/SyncMenu.vue | 4 +-- src/components/menus/WorkspacesMenu.vue | 4 +-- .../modals/AccountManagementModal.vue | 4 +-- src/components/modals/ImageModal.vue | 4 +-- .../modals/providers/CustomAccountModal.vue | 2 +- .../modals/providers/GiteaAccountModal.vue | 12 +++++++-- .../modals/providers/SmmsAccountModal.vue | 2 +- src/data/welcomeFile.md | 25 ------------------- .../providers/giteaWorkspaceProvider.js | 4 +-- src/services/providers/helpers/giteaHelper.js | 13 ++++++++-- static/landing/index.html | 2 +- 12 files changed, 36 insertions(+), 44 deletions(-) diff --git a/src/components/menus/PublishMenu.vue b/src/components/menus/PublishMenu.vue index b17ca1f7..48a4167a 100644 --- a/src/components/menus/PublishMenu.vue +++ b/src/components/menus/PublishMenu.vue @@ -264,8 +264,8 @@ export default { }, async addGiteaAccount() { try { - const { serverUrl, applicationId, applicationSecret } = await store.dispatch('modal/open', { type: 'giteaAccount' }); - await giteaHelper.addAccount(serverUrl, applicationId, applicationSecret); + const applicationInfo = await store.dispatch('modal/open', { type: 'giteaAccount' }); + await giteaHelper.addAccount(applicationInfo); } catch (e) { /* cancel */ } }, async addGoogleDriveAccount() { diff --git a/src/components/menus/SyncMenu.vue b/src/components/menus/SyncMenu.vue index da4fb1c7..2cef7982 100644 --- a/src/components/menus/SyncMenu.vue +++ b/src/components/menus/SyncMenu.vue @@ -240,8 +240,8 @@ export default { }, async addGiteaAccount() { try { - const { serverUrl, applicationId, applicationSecret } = await store.dispatch('modal/open', { type: 'giteaAccount' }); - await giteaHelper.addAccount(serverUrl, applicationId, applicationSecret); + const applicationInfo = await store.dispatch('modal/open', { type: 'giteaAccount' }); + await giteaHelper.addAccount(applicationInfo); } catch (e) { /* cancel */ } }, async addGoogleDriveAccount() { diff --git a/src/components/menus/WorkspacesMenu.vue b/src/components/menus/WorkspacesMenu.vue index c8ef2328..693acd04 100644 --- a/src/components/menus/WorkspacesMenu.vue +++ b/src/components/menus/WorkspacesMenu.vue @@ -95,8 +95,8 @@ export default { }, async addGiteaWorkspace() { try { - const { serverUrl, applicationId, applicationSecret } = await store.dispatch('modal/open', { type: 'giteaAccount' }); - const token = await giteaHelper.addAccount(serverUrl, applicationId, applicationSecret); + const applicationInfo = await store.dispatch('modal/open', { type: 'giteaAccount' }); + const token = await giteaHelper.addAccount(applicationInfo); store.dispatch('modal/open', { type: 'giteaWorkspace', token, diff --git a/src/components/modals/AccountManagementModal.vue b/src/components/modals/AccountManagementModal.vue index feafd212..68464a0a 100644 --- a/src/components/modals/AccountManagementModal.vue +++ b/src/components/modals/AccountManagementModal.vue @@ -254,8 +254,8 @@ export default { }, async addGiteaAccount() { try { - const { serverUrl, applicationId, applicationSecret } = await store.dispatch('modal/open', { type: 'giteaAccount' }); - await giteaHelper.addAccount(serverUrl, applicationId, applicationSecret); + const applicationInfo = await store.dispatch('modal/open', { type: 'giteaAccount' }); + await giteaHelper.addAccount(applicationInfo); } catch (e) { /* cancel */ } }, async addGoogleDriveAccount() { diff --git a/src/components/modals/ImageModal.vue b/src/components/modals/ImageModal.vue index 4c3beac0..0c3bfb5b 100644 --- a/src/components/modals/ImageModal.vue +++ b/src/components/modals/ImageModal.vue @@ -233,8 +233,8 @@ export default modalTemplate({ }, async addGiteaImgStorage() { try { - const { serverUrl, applicationId, applicationSecret } = await store.dispatch('modal/open', { type: 'giteaAccount' }); - const token = await giteaHelper.addAccount(serverUrl, applicationId, applicationSecret); + const applicationInfo = await store.dispatch('modal/open', { type: 'giteaAccount' }); + const token = await giteaHelper.addAccount(applicationInfo); const imgStorageInfo = await store.dispatch('modal/open', { type: 'giteaImgStorage', token, diff --git a/src/components/modals/providers/CustomAccountModal.vue b/src/components/modals/providers/CustomAccountModal.vue index 497a78e4..e1d1e7c1 100644 --- a/src/components/modals/providers/CustomAccountModal.vue +++ b/src/components/modals/providers/CustomAccountModal.vue @@ -4,7 +4,7 @@ -

将您的自定义图床账号链接到StackEdit

+

将您的自定义图床账号链接到StackEdit中文版