ui: refine auth and account screens
This commit is contained in:
19
static/js/auth.js
Normal file
19
static/js/auth.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function copyRecoveryKey(keyElementId, feedbackElementId) {
|
||||
var keyElement = document.getElementById(keyElementId)
|
||||
var feedbackElement = document.getElementById(feedbackElementId)
|
||||
|
||||
if (!keyElement || !feedbackElement) {
|
||||
return
|
||||
}
|
||||
|
||||
var key = keyElement.textContent || ''
|
||||
navigator.clipboard.writeText(key).then(function () {
|
||||
feedbackElement.textContent = 'Recovery key copied.'
|
||||
}).catch(function () {
|
||||
feedbackElement.textContent = 'Copy failed. Select and copy manually.'
|
||||
})
|
||||
}
|
||||
|
||||
function confirmDangerAction(message) {
|
||||
return window.confirm(message)
|
||||
}
|
||||
Reference in New Issue
Block a user