mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-12-22 14:05:32 +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
|
@ -134,9 +134,14 @@ export default {
|
||||||
paste: function () {
|
paste: function () {
|
||||||
window.document.getElementById('token').focus()
|
window.document.getElementById('token').focus()
|
||||||
const that = this
|
const that = this
|
||||||
window.navigator.clipboard.readText().then(function (v) {
|
if ('readText' in (window.navigator.clipboard ?? {})) {
|
||||||
that.combined_token = v.trim()
|
window.navigator.clipboard.readText().then(function (v) {
|
||||||
}).catch(function () {})
|
that.combined_token = v.trim()
|
||||||
|
}).catch(() => {})
|
||||||
|
} else {
|
||||||
|
this.combined_token = ''
|
||||||
|
document.execCommand('paste')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
launch_browser: function (url) {
|
launch_browser: function (url) {
|
||||||
const that = this
|
const that = this
|
||||||
|
|
Loading…
Reference in a new issue