File tree Expand file tree Collapse file tree
frontend/src/pages/account/Security/dialogs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
22 <ff-dialog ref =" dialog" data-el =" add-token-confirmation" header =" Token Created" >
33 <template #default >
4- <p >Your token is <code >{{ token.token }}</code ></p >
4+ <p >Your token is <code >{{ token? .token }}</code ></p >
55 <p >This is the only time it will be shown, so please ensure you make a note</p >
66 </template >
77 <template #actions >
@@ -18,14 +18,6 @@ import Alerts from '../../../../services/alerts.js'
1818export default {
1919 name: ' TokenCreated' ,
2020 mixins: [clipboardMixin],
21- setup () {
22- return {
23- showToken (token ) {
24- this .token = token
25- this .$refs .dialog .show ()
26- }
27- }
28- },
2921 data () {
3022 return {
3123 token: null
@@ -34,7 +26,7 @@ export default {
3426 methods: {
3527 close () {
3628 this .$refs .dialog .close ()
37- this .token = undefined
29+ this .token = null
3830 },
3931 copy () {
4032 this .copyToClipboard (this .token .token ).then (() => {
@@ -43,6 +35,10 @@ export default {
4335 console .warn (' Clipboard write permission denied: ' , err)
4436 Alerts .emit (' Clipboard write permission denied.' , ' warning' )
4537 })
38+ },
39+ showToken (token ) {
40+ this .token = token
41+ this .$refs .dialog .show ()
4642 }
4743 }
4844}
You can’t perform that action at this time.
0 commit comments