feat: user logout and data clear
This commit is contained in:
parent
da00113666
commit
97cc7a3e17
4 changed files with 77 additions and 19 deletions
|
|
@ -2,15 +2,27 @@ async function userConfig(path) {
|
|||
const template = await loadTemplateAsync(path)
|
||||
Vue.component('user-config', {
|
||||
name: 'user-config',
|
||||
props: ['user',],
|
||||
props: ['account'],
|
||||
template,
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
clearAllData: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
logout: async function () {
|
||||
LNbits.utils
|
||||
.confirmDialog(
|
||||
'Please make sure you save your private key! You will not be able to recover it later!'
|
||||
)
|
||||
.onOk(async () => {
|
||||
this.$emit('logout', { clearAllData: this.clearAllData })
|
||||
})
|
||||
},
|
||||
copyText(text) {
|
||||
this.$emit('copy-text', text)
|
||||
}
|
||||
},
|
||||
created: async function () {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue