tamaina 2021-04-24 00:36:43 +09:00
parent 524c213ba2
commit d24fedc018

View file

@ -94,7 +94,9 @@ export default defineComponent({
if (localOnly === '0') this.localOnly = false;
else if (localOnly === '1') this.localOnly = true;
await Promise.all([(async () => {
try {
//#region Reply
const replyId = urlParams.get('replyId');
const replyUri = urlParams.get('replyUri');
if (replyId) {
@ -109,7 +111,9 @@ export default defineComponent({
this.reply = obj.object;
}
}
})(),(async () => {
//#endregion
//#region Renote
const renoteId = urlParams.get('renoteId');
const renoteUri = urlParams.get('renoteUri');
if (renoteId) {
@ -124,18 +128,23 @@ export default defineComponent({
this.renote = obj.object;
}
}
})(),(async () => {
//#endregion
//#region Drive files
const fileIds = urlParams.get('fileIds');
if (fileIds) {
const promises = Promise.all(fileIds.split(',')
.map(fileId => os.api('drive/files/show', { fileId }).catch(() => Error(`invalid fileId: ${fileId}`))));
await promises.then(files => this.files = files);
}
})(),]).catch(e => os.dialog({
//#endregion
} catch (e) {
os.dialog({
type: 'error',
title: e.message,
text: e.name
}));
});
}
this.state = 'writing';
},