diff --git a/src/components/Modal.vue b/src/components/Modal.vue index 0574ba30..00d9a242 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -56,6 +56,7 @@ import GithubWorkspaceModal from './modals/providers/GithubWorkspaceModal'; import GithubPublishModal from './modals/providers/GithubPublishModal'; import GistSyncModal from './modals/providers/GistSyncModal'; import GistPublishModal from './modals/providers/GistPublishModal'; +import GiteeAccountModal from './modals/providers/GiteeAccountModal'; import GiteeOpenModal from './modals/providers/GiteeOpenModal'; import GiteeSaveModal from './modals/providers/GiteeSaveModal'; import GiteeWorkspaceModal from './modals/providers/GiteeWorkspaceModal'; @@ -119,6 +120,7 @@ export default { GithubPublishModal, GistSyncModal, GistPublishModal, + GiteeAccountModal, GiteeOpenModal, GiteeSaveModal, GiteeWorkspaceModal, diff --git a/src/components/menus/PublishMenu.vue b/src/components/menus/PublishMenu.vue index 653c9f69..b17ca1f7 100644 --- a/src/components/menus/PublishMenu.vue +++ b/src/components/menus/PublishMenu.vue @@ -252,6 +252,7 @@ export default { }, async addGiteeAccount() { try { + await store.dispatch('modal/open', { type: 'giteeAccount' }); await giteeHelper.addAccount(); } catch (e) { /* cancel */ } }, diff --git a/src/components/modals/providers/GiteeAccountModal.vue b/src/components/modals/providers/GiteeAccountModal.vue new file mode 100644 index 00000000..72dab6b2 --- /dev/null +++ b/src/components/modals/providers/GiteeAccountModal.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/services/providers/giteeWorkspaceProvider.js b/src/services/providers/giteeWorkspaceProvider.js index ab9c76fb..08a88d40 100644 --- a/src/services/providers/giteeWorkspaceProvider.js +++ b/src/services/providers/giteeWorkspaceProvider.js @@ -70,6 +70,7 @@ export default new Provider({ token = store.getters['data/giteeTokensBySub'][workspace.sub]; } if (!token) { + await store.dispatch('modal/open', { type: 'giteeAccount' }); token = await giteeHelper.addAccount(); }