Skip to content

Commit

Permalink
Implement API call to user reset on UI, updated clipboardJS, refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Forceu committed Jan 5, 2025
1 parent ec922da commit 092a320
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 31 deletions.
4 changes: 2 additions & 2 deletions internal/webserver/web/static/assets/dist/js/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions internal/webserver/web/static/js/admin_ui_allPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// All files named admin_*.js will be merged together and minimised by calling
// go generate ./...


var clipboard = new ClipboardJS('.btn');

function showToast(timeout, text) {
let notification = document.getElementById("toastnotification");
if (typeof text !== 'undefined')
Expand All @@ -13,3 +16,9 @@ function showToast(timeout, text) {
notification.classList.remove("show");
}, timeout);
}

// For some reason ClipboardJs is not working on the user PW reset modal, even when initilising again. Manually writing to clipboard
function copyToClipboard(text, timeout, toastText) {
navigator.clipboard.writeText(text);
showToast(timeout, toastText);
}
1 change: 0 additions & 1 deletion internal/webserver/web/static/js/admin_ui_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// All files named admin_*.js will be merged together and minimised by calling
// go generate ./...

var clipboard = new ClipboardJS('.btn');

var dropzoneObject;
var isE2EEnabled = false;
Expand Down
Loading

0 comments on commit 092a320

Please sign in to comment.