wip
This commit is contained in:
parent
138c9868e8
commit
deb3df1536
67 changed files with 229 additions and 229 deletions
|
|
@ -89,7 +89,7 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
register() {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
title: this.$t('password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -105,7 +105,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
unregister() {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
title: this.$t('password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -118,7 +118,7 @@ export default defineComponent({
|
|||
this.usePasswordLessLogin = false;
|
||||
this.updatePasswordLessLogin();
|
||||
}).then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
|
|
@ -131,13 +131,13 @@ export default defineComponent({
|
|||
this.$root.api('i/2fa/done', {
|
||||
token: this.token
|
||||
}).then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
this.$store.state.i.twoFactorEnabled = true;
|
||||
}).catch(e => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
|
|
@ -156,7 +156,7 @@ export default defineComponent({
|
|||
}).then(key => {
|
||||
this.registration = null;
|
||||
key.lastUsed = new Date();
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
|
|
@ -164,7 +164,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
unregisterKey(key) {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
title: this.$t('password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -178,7 +178,7 @@ export default defineComponent({
|
|||
this.usePasswordLessLogin = false;
|
||||
this.updatePasswordLessLogin();
|
||||
}).then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
|
|
@ -187,7 +187,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
addSecurityKey() {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
title: this.$t('password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default defineComponent({
|
|||
permission: permissions,
|
||||
});
|
||||
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
title: this.$t('token'),
|
||||
text: token
|
||||
|
|
@ -41,7 +41,7 @@ export default defineComponent({
|
|||
});
|
||||
},
|
||||
regenerateToken() {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
title: this.$t('password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default defineComponent({
|
|||
chooseUploadFolder() {
|
||||
selectDriveFolder(this.$root, false).then(async folder => {
|
||||
await this.$store.dispatch('settings/set', { key: 'uploadFolder', value: folder ? folder.id : null });
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ export default defineComponent({
|
|||
this.exportTarget == 'user-lists' ? 'i/export-user-lists' :
|
||||
null, {})
|
||||
.then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'info',
|
||||
text: this.$t('exportRequested')
|
||||
});
|
||||
}).catch((e: any) => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: e.message
|
||||
});
|
||||
|
|
@ -68,7 +68,7 @@ export default defineComponent({
|
|||
data.append('file', file);
|
||||
data.append('i', this.$store.state.i.token);
|
||||
|
||||
const dialog = this.$root.showDialog({
|
||||
const dialog = this.$store.dispatch('showDialog', {
|
||||
type: 'waiting',
|
||||
text: this.$t('uploading') + '...',
|
||||
showOkButton: false,
|
||||
|
|
@ -85,7 +85,7 @@ export default defineComponent({
|
|||
this.reqImport(f);
|
||||
})
|
||||
.catch(e => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
|
|
@ -102,12 +102,12 @@ export default defineComponent({
|
|||
null, {
|
||||
fileId: file.id
|
||||
}).then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'info',
|
||||
text: this.$t('importRequested')
|
||||
});
|
||||
}).catch((e: any) => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: e.message
|
||||
});
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ export default defineComponent({
|
|||
}).then(i => {
|
||||
this.$store.state.i.includingNotificationTypes = i.includingNotificationTypes;
|
||||
}).catch(err => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: err.message
|
||||
});
|
||||
|
|
|
|||
|
|
@ -160,14 +160,14 @@ export default defineComponent({
|
|||
this.$store.state.i.bannerUrl = i.bannerUrl;
|
||||
|
||||
if (notify) {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
}
|
||||
}).catch(err => {
|
||||
this.saving = false;
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: err.id
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default defineComponent({
|
|||
|
||||
methods: {
|
||||
async change() {
|
||||
const { canceled: canceled1, result: currentPassword } = await this.$root.showDialog({
|
||||
const { canceled: canceled1, result: currentPassword } = await this.$store.dispatch('showDialog', {
|
||||
title: this.$t('currentPassword'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -33,7 +33,7 @@ export default defineComponent({
|
|||
});
|
||||
if (canceled1) return;
|
||||
|
||||
const { canceled: canceled2, result: newPassword } = await this.$root.showDialog({
|
||||
const { canceled: canceled2, result: newPassword } = await this.$store.dispatch('showDialog', {
|
||||
title: this.$t('newPassword'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -41,7 +41,7 @@ export default defineComponent({
|
|||
});
|
||||
if (canceled2) return;
|
||||
|
||||
const { canceled: canceled3, result: newPassword2 } = await this.$root.showDialog({
|
||||
const { canceled: canceled3, result: newPassword2 } = await this.$store.dispatch('showDialog', {
|
||||
title: this.$t('newPasswordRetype'),
|
||||
input: {
|
||||
type: 'password'
|
||||
|
|
@ -50,14 +50,14 @@ export default defineComponent({
|
|||
if (canceled3) return;
|
||||
|
||||
if (newPassword !== newPassword2) {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: this.$t('retypedNotMatch')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const dialog = this.$root.showDialog({
|
||||
const dialog = this.$store.dispatch('showDialog', {
|
||||
type: 'waiting',
|
||||
iconOnly: true
|
||||
});
|
||||
|
|
@ -66,12 +66,12 @@ export default defineComponent({
|
|||
currentPassword,
|
||||
newPassword
|
||||
}).then(() => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
}).catch(e => {
|
||||
this.$root.showDialog({
|
||||
this.$store.dispatch('showDialog', {
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue