恢复部分修改

This commit is contained in:
xiaoqi.cxq 2022-07-14 23:24:32 +08:00
parent 72f9fea42e
commit ce91307a9c
4 changed files with 25 additions and 0 deletions

View File

@ -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,

View File

@ -252,6 +252,7 @@ export default {
},
async addGiteeAccount() {
try {
await store.dispatch('modal/open', { type: 'giteeAccount' });
await giteeHelper.addAccount();
} catch (e) { /* cancel */ }
},

View File

@ -0,0 +1,21 @@
<template>
<modal-inner aria-label="链接Gitee账号">
<div class="modal__content">
<div class="modal__image">
<icon-provider provider-id="gitee"></icon-provider>
</div>
<p>将您的<b>Gitee</b>账号链接到<b>StackEdit中文版</b></p>
</div>
<div class="modal__button-bar">
<button class="button" @click="config.reject()">取消</button>
<button class="button button--resolve" @click="config.resolve()">确认</button>
</div>
</modal-inner>
</template>
<script>
import modalTemplate from '../common/modalTemplate';
export default modalTemplate({
});
</script>

View File

@ -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();
}