mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-19 03:16:49 +02:00
Add notifications to give feedback after some actions
This commit is contained in:
parent
ca910e159f
commit
95554a7034
@ -450,6 +450,7 @@
|
|||||||
ids.forEach(function(id) {
|
ids.forEach(function(id) {
|
||||||
that.accounts = that.accounts.filter(a => a.id !== id)
|
that.accounts = that.accounts.filter(a => a.id !== id)
|
||||||
})
|
})
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('twofaccounts.accounts_deleted') })
|
||||||
})
|
})
|
||||||
|
|
||||||
// we fetch the accounts again to prevent the js collection being
|
// we fetch the accounts again to prevent the js collection being
|
||||||
@ -478,6 +479,8 @@
|
|||||||
this.fetchAccounts(true)
|
this.fetchAccounts(true)
|
||||||
this.showGroupSelector = false
|
this.showGroupSelector = false
|
||||||
|
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('twofaccounts.accounts_moved') })
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,6 +105,7 @@
|
|||||||
|
|
||||||
// Remove the deleted group from the collection
|
// Remove the deleted group from the collection
|
||||||
this.groups = this.groups.filter(a => a.id !== id)
|
this.groups = this.groups.filter(a => a.id !== id)
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('groups.group_successfully_deleted') })
|
||||||
|
|
||||||
// Reset persisted group filter to 'All' (groupId=0)
|
// Reset persisted group filter to 'All' (groupId=0)
|
||||||
// (backend will save to change automatically)
|
// (backend will save to change automatically)
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
await this.form.post('/api/v1/groups')
|
await this.form.post('/api/v1/groups')
|
||||||
|
|
||||||
if( this.form.errors.any() === false ) {
|
if( this.form.errors.any() === false ) {
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('groups.group_successfully_created') })
|
||||||
this.$router.push({ name: 'groups' });
|
this.$router.push({ name: 'groups' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
await this.form.put('/api/v1/groups/' + this.id)
|
await this.form.put('/api/v1/groups/' + this.id)
|
||||||
|
|
||||||
if( this.form.errors.any() === false ) {
|
if( this.form.errors.any() === false ) {
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('groups.group_name_saved') })
|
||||||
this.$router.push({ name: 'groups' })
|
this.$router.push({ name: 'groups' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
await this.form.patch('/webauthn/credentials/' + this.id + '/name')
|
await this.form.patch('/webauthn/credentials/' + this.id + '/name')
|
||||||
|
|
||||||
if( this.form.errors.any() === false ) {
|
if( this.form.errors.any() === false ) {
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('auth.webauthn.device_successfully_registered') })
|
||||||
this.$router.push({name: 'settings.webauthn.devices', params: { toRefresh: true }})
|
this.$router.push({name: 'settings.webauthn.devices', params: { toRefresh: true }})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,6 @@
|
|||||||
const publicKeyCredential = this.parseOutgoingCredentials(bufferedCredentials);
|
const publicKeyCredential = this.parseOutgoingCredentials(bufferedCredentials);
|
||||||
|
|
||||||
this.axios.post('/webauthn/register', publicKeyCredential).then(response => {
|
this.axios.post('/webauthn/register', publicKeyCredential).then(response => {
|
||||||
this.$notify({ type: 'is-success', text: this.$t('auth.webauthn.device_successfully_registered') })
|
|
||||||
this.$router.push({ name: 'settings.webauthn.editCredential', params: { id: publicKeyCredential.id, name: this.$t('auth.webauthn.my_device') } })
|
this.$router.push({ name: 'settings.webauthn.editCredential', params: { id: publicKeyCredential.id, name: this.$t('auth.webauthn.my_device') } })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -319,6 +319,7 @@
|
|||||||
await this.form.post('/api/v1/twofaccounts')
|
await this.form.post('/api/v1/twofaccounts')
|
||||||
|
|
||||||
if( this.form.errors.any() === false ) {
|
if( this.form.errors.any() === false ) {
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('twofaccounts.account_created') })
|
||||||
this.$router.push({name: 'accounts', params: { toRefresh: true }});
|
this.$router.push({name: 'accounts', params: { toRefresh: true }});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@
|
|||||||
await this.form.put('/api/v1/twofaccounts/' + this.$route.params.twofaccountId)
|
await this.form.put('/api/v1/twofaccounts/' + this.$route.params.twofaccountId)
|
||||||
|
|
||||||
if( this.form.errors.any() === false ) {
|
if( this.form.errors.any() === false ) {
|
||||||
|
this.$notify({ type: 'is-success', text: this.$t('twofaccounts.account_updated') })
|
||||||
this.$router.push({name: 'accounts', params: { initialEditMode: true, toRefresh: true }})
|
this.$router.push({name: 'accounts', params: { initialEditMode: true, toRefresh: true }})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,9 @@ return [
|
|||||||
'move_selected_to' => 'Move selected to',
|
'move_selected_to' => 'Move selected to',
|
||||||
'no_group' => 'No group',
|
'no_group' => 'No group',
|
||||||
'change_group' => 'Change group',
|
'change_group' => 'Change group',
|
||||||
|
'group_successfully_created' => 'Group successfully created',
|
||||||
|
'group_name_saved' => 'Group name saved',
|
||||||
|
'group_successfully_deleted' => 'Group successfully deleted',
|
||||||
'forms' => [
|
'forms' => [
|
||||||
'new_group' => 'New group',
|
'new_group' => 'New group',
|
||||||
'new_name' => 'New name',
|
'new_name' => 'New name',
|
||||||
|
@ -26,6 +26,10 @@ return [
|
|||||||
'add_one' => 'Add one',
|
'add_one' => 'Add one',
|
||||||
'show_qrcode' => 'Show QR code',
|
'show_qrcode' => 'Show QR code',
|
||||||
'no_service' => '- no service -',
|
'no_service' => '- no service -',
|
||||||
|
'account_created' => 'Account successfully created',
|
||||||
|
'account_updated' => 'Account successfully updated',
|
||||||
|
'accounts_deleted' => 'Account(s) successfully deleted',
|
||||||
|
'accounts_moved' => 'Account(s) successfully moved',
|
||||||
'forms' => [
|
'forms' => [
|
||||||
'service' => [
|
'service' => [
|
||||||
'placeholder' => 'Google, Twitter, Apple',
|
'placeholder' => 'Google, Twitter, Apple',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user