show popup that address is copied on click
This commit is contained in:
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
@@ -58,6 +58,13 @@
|
||||
<h1>WildDuck Aliases</h1>
|
||||
</div>
|
||||
<div id="container"></div>
|
||||
<div class="toast-container position-fixed top-0 end-0 p-3">
|
||||
<div id="copyToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-body">
|
||||
Copied!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
@@ -37,7 +37,11 @@ function deleteAlias(id) {
|
||||
}
|
||||
|
||||
function copyToClipboard(text) {
|
||||
navigator.clipboard.writeText(text)
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
const toastElement = document.getElementById('copyToast');
|
||||
const toast = new bootstrap.Toast(toastElement);
|
||||
toast.show();
|
||||
});
|
||||
}
|
||||
|
||||
const defaultTemplate = `
|
||||
|
||||
Reference in New Issue
Block a user