Refactor
This commit is contained in:
@ -248,8 +248,8 @@ export default defineComponent({
|
||||
os.contextMenu([{
|
||||
text: this.$t('openInWindow'),
|
||||
icon: faWindowRestore,
|
||||
action: async () => {
|
||||
os.popup(await import('./drive-window.vue'), {
|
||||
action: () => {
|
||||
os.popup(import('./drive-window.vue'), {
|
||||
initialFolder: this.folder
|
||||
}, {
|
||||
}, 'closed');
|
||||
|
@ -46,7 +46,7 @@ export default defineComponent({
|
||||
if (!document.body.contains(this.$el)) return;
|
||||
if (this.close) return;
|
||||
|
||||
const { dispose } = os.popup(await import('@/components/url-preview-popup.vue'), {
|
||||
const { dispose } = await os.popup(import('@/components/url-preview-popup.vue'), {
|
||||
url: this.url,
|
||||
source: this.$el
|
||||
});
|
||||
|
@ -498,7 +498,7 @@ export default defineComponent({
|
||||
react(viaKeyboard = false) {
|
||||
pleaseLogin();
|
||||
this.blur();
|
||||
os.popup(defineAsyncComponent(() => import('@/components/reaction-picker.vue')), {
|
||||
os.popup(import('@/components/reaction-picker.vue'), {
|
||||
showFocus: viaKeyboard,
|
||||
src: this.$refs.reactButton,
|
||||
}, {
|
||||
@ -644,7 +644,7 @@ export default defineComponent({
|
||||
text: this.$t('reportAbuse'),
|
||||
action: () => {
|
||||
const u = `${url}/notes/${this.appearNote.id}`;
|
||||
os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), {
|
||||
os.popup(import('@/components/abuse-report-window.vue'), {
|
||||
user: this.appearNote.user,
|
||||
initialComment: `Note: ${u}\n-----\n`
|
||||
}, {}, 'closed');
|
||||
|
@ -378,13 +378,13 @@ export default defineComponent({
|
||||
this.saveDraft();
|
||||
},
|
||||
|
||||
async setVisibility() {
|
||||
setVisibility() {
|
||||
if (this.channel) {
|
||||
// TODO: information dialog
|
||||
return;
|
||||
}
|
||||
|
||||
os.popup(await import('./visibility-picker.vue'), {
|
||||
os.popup(import('./visibility-picker.vue'), {
|
||||
currentVisibility: this.visibility,
|
||||
currentLocalOnly: this.localOnly,
|
||||
src: this.$refs.visibilityButton
|
||||
|
@ -257,8 +257,8 @@ export default defineComponent({
|
||||
}], ev.currentTarget || ev.target);
|
||||
},
|
||||
|
||||
async addAcount() {
|
||||
os.popup(await import('./signin-dialog.vue'), {}, {
|
||||
addAcount() {
|
||||
os.popup(import('./signin-dialog.vue'), {}, {
|
||||
done: res => {
|
||||
this.$store.dispatch('addAcount', res);
|
||||
os.success();
|
||||
@ -266,8 +266,8 @@ export default defineComponent({
|
||||
}, 'closed');
|
||||
},
|
||||
|
||||
async createAccount() {
|
||||
os.popup(await import('./signup-dialog.vue'), {}, {
|
||||
createAccount() {
|
||||
os.popup(import('./signup-dialog.vue'), {}, {
|
||||
done: res => {
|
||||
this.$store.dispatch('addAcount', res);
|
||||
this.switchAccountWithToken(res.i);
|
||||
@ -275,7 +275,7 @@ export default defineComponent({
|
||||
}, 'closed');
|
||||
},
|
||||
|
||||
async switchAccount(account: any) {
|
||||
switchAccount(account: any) {
|
||||
const token = this.$store.state.device.accounts.find((x: any) => x.id === account.id).token;
|
||||
this.switchAccountWithToken(token);
|
||||
},
|
||||
|
@ -119,8 +119,8 @@ export default defineComponent({
|
||||
os.popups.value = os.popups.value.filter(x => x !== p);
|
||||
};
|
||||
|
||||
const showReq = async req => {
|
||||
os.popup(await import('./taskmanager.api-window.vue'), {
|
||||
const showReq = req => {
|
||||
os.popup(import('./taskmanager.api-window.vue'), {
|
||||
req: req
|
||||
}, {
|
||||
}, 'closed');
|
||||
|
@ -71,7 +71,7 @@ export default defineComponent({
|
||||
if (!document.body.contains(this.$el)) return;
|
||||
if (this.close) return;
|
||||
|
||||
const { dispose } = os.popup(await import('@/components/url-preview-popup.vue'), {
|
||||
const { dispose } = await os.popup(import('@/components/url-preview-popup.vue'), {
|
||||
url: this.url,
|
||||
source: this.$el
|
||||
});
|
||||
|
Reference in New Issue
Block a user