恢复部分修改
This commit is contained in:
parent
72f9fea42e
commit
ce91307a9c
@ -56,6 +56,7 @@ import GithubWorkspaceModal from './modals/providers/GithubWorkspaceModal';
|
|||||||
import GithubPublishModal from './modals/providers/GithubPublishModal';
|
import GithubPublishModal from './modals/providers/GithubPublishModal';
|
||||||
import GistSyncModal from './modals/providers/GistSyncModal';
|
import GistSyncModal from './modals/providers/GistSyncModal';
|
||||||
import GistPublishModal from './modals/providers/GistPublishModal';
|
import GistPublishModal from './modals/providers/GistPublishModal';
|
||||||
|
import GiteeAccountModal from './modals/providers/GiteeAccountModal';
|
||||||
import GiteeOpenModal from './modals/providers/GiteeOpenModal';
|
import GiteeOpenModal from './modals/providers/GiteeOpenModal';
|
||||||
import GiteeSaveModal from './modals/providers/GiteeSaveModal';
|
import GiteeSaveModal from './modals/providers/GiteeSaveModal';
|
||||||
import GiteeWorkspaceModal from './modals/providers/GiteeWorkspaceModal';
|
import GiteeWorkspaceModal from './modals/providers/GiteeWorkspaceModal';
|
||||||
@ -119,6 +120,7 @@ export default {
|
|||||||
GithubPublishModal,
|
GithubPublishModal,
|
||||||
GistSyncModal,
|
GistSyncModal,
|
||||||
GistPublishModal,
|
GistPublishModal,
|
||||||
|
GiteeAccountModal,
|
||||||
GiteeOpenModal,
|
GiteeOpenModal,
|
||||||
GiteeSaveModal,
|
GiteeSaveModal,
|
||||||
GiteeWorkspaceModal,
|
GiteeWorkspaceModal,
|
||||||
|
@ -252,6 +252,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async addGiteeAccount() {
|
async addGiteeAccount() {
|
||||||
try {
|
try {
|
||||||
|
await store.dispatch('modal/open', { type: 'giteeAccount' });
|
||||||
await giteeHelper.addAccount();
|
await giteeHelper.addAccount();
|
||||||
} catch (e) { /* cancel */ }
|
} catch (e) { /* cancel */ }
|
||||||
},
|
},
|
||||||
|
21
src/components/modals/providers/GiteeAccountModal.vue
Normal file
21
src/components/modals/providers/GiteeAccountModal.vue
Normal 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>
|
@ -70,6 +70,7 @@ export default new Provider({
|
|||||||
token = store.getters['data/giteeTokensBySub'][workspace.sub];
|
token = store.getters['data/giteeTokensBySub'][workspace.sub];
|
||||||
}
|
}
|
||||||
if (!token) {
|
if (!token) {
|
||||||
|
await store.dispatch('modal/open', { type: 'giteeAccount' });
|
||||||
token = await giteeHelper.addAccount();
|
token = await giteeHelper.addAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user