mirror of
https://github.com/yuzu-emu/liftinstall
synced 2024-11-22 16:13:47 +00:00
ui/authenticationview: fix token pasting ...
... on certain platforms where current context does not include Clipboard API in the navigator namespace
This commit is contained in:
parent
d28b19c25a
commit
fec5587b87
1 changed files with 8 additions and 3 deletions
|
@ -134,9 +134,14 @@ export default {
|
|||
paste: function () {
|
||||
window.document.getElementById('token').focus()
|
||||
const that = this
|
||||
if ('readText' in (window.navigator.clipboard ?? {})) {
|
||||
window.navigator.clipboard.readText().then(function (v) {
|
||||
that.combined_token = v.trim()
|
||||
}).catch(function () {})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.combined_token = ''
|
||||
document.execCommand('paste')
|
||||
}
|
||||
},
|
||||
launch_browser: function (url) {
|
||||
const that = this
|
||||
|
|
Loading…
Reference in a new issue