resolve merge conflict -> master

This commit is contained in:
Felix Wu 2018-08-21 16:23:11 +02:00
commit 0b3600c0b4
4 changed files with 3461 additions and 3437 deletions

6783
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "stackedit", "name": "stackedit",
"version": "5.12.0", "version": "5.12.1",
"description": "Free, open-source, full-featured Markdown editor", "description": "Free, open-source, full-featured Markdown editor",
"author": "Benoit Schweblin", "author": "Benoit Schweblin",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -43,13 +43,15 @@ export default modalTemplate({
const currentFile = this.$store.getters['file/current']; const currentFile = this.$store.getters['file/current'];
const currentContent = this.$store.getters['content/current']; const currentContent = this.$store.getters['content/current'];
const { selectedFormat } = this; const { selectedFormat } = this;
const [sponsorToken, token] = await this.$store.dispatch('queue/enqueue', () => Promise.all([ this.$store.dispatch('queue/enqueue', async () => {
const [sponsorToken, token] = await Promise.all([
Promise.resolve().then(() => { Promise.resolve().then(() => {
const tokenToRefresh = this.$store.getters['workspace/sponsorToken']; const tokenToRefresh = this.$store.getters['workspace/sponsorToken'];
return tokenToRefresh && googleHelper.refreshToken(tokenToRefresh); return tokenToRefresh && googleHelper.refreshToken(tokenToRefresh);
}), }),
sponsorSvc.getToken(), sponsorSvc.getToken(),
])); ]);
try { try {
const { body } = await networkSvc.request({ const { body } = await networkSvc.request({
method: 'POST', method: 'POST',
@ -74,6 +76,7 @@ export default modalTemplate({
this.$store.dispatch('notification/error', err); this.$store.dispatch('notification/error', err);
} }
} }
});
}, },
}, },
}); });

View File

@ -36,8 +36,8 @@ export default modalTemplate({
async resolve() { async resolve() {
this.config.resolve(); this.config.resolve();
const currentFile = this.$store.getters['file/current']; const currentFile = this.$store.getters['file/current'];
const [sponsorToken, token, html] = await this.$store this.$store.dispatch('queue/enqueue', async () => {
.dispatch('queue/enqueue', () => Promise.all([ const [sponsorToken, token, html] = await Promise.all([
Promise.resolve().then(() => { Promise.resolve().then(() => {
const tokenToRefresh = this.$store.getters['workspace/sponsorToken']; const tokenToRefresh = this.$store.getters['workspace/sponsorToken'];
return tokenToRefresh && googleHelper.refreshToken(tokenToRefresh); return tokenToRefresh && googleHelper.refreshToken(tokenToRefresh);
@ -48,7 +48,8 @@ export default modalTemplate({
this.allTemplatesById[this.selectedTemplate], this.allTemplatesById[this.selectedTemplate],
true, true,
), ),
])); ]);
try { try {
const { body } = await networkSvc.request({ const { body } = await networkSvc.request({
method: 'POST', method: 'POST',
@ -71,6 +72,7 @@ export default modalTemplate({
this.$store.dispatch('notification/error', err); this.$store.dispatch('notification/error', err);
} }
} }
});
}, },
}, },
}); });