mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
#gzip #extract-inline-js enable gzip in nginx + move ~730 lines of inline JS to 15 external files
This commit is contained in:
@@ -179,40 +179,7 @@
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<script>
|
||||
document.getElementById('open-create-dialog').addEventListener('click', () => {
|
||||
document.getElementById('create-dialog').showModal();
|
||||
});
|
||||
|
||||
let _pendingDeleteLinkId = null;
|
||||
function openDeleteLinkDialog(id) {
|
||||
_pendingDeleteLinkId = id;
|
||||
document.getElementById('delete-link-dialog').showModal();
|
||||
}
|
||||
function _executeDeleteLink() {
|
||||
const form = document.getElementById('delete-link-form-' + _pendingDeleteLinkId);
|
||||
if (form) form.submit();
|
||||
}
|
||||
|
||||
function copyUrl(id) {
|
||||
const input = document.getElementById('url-' + id);
|
||||
navigator.clipboard.writeText(input.value).then(() => {
|
||||
const btn = event.target.closest('button');
|
||||
const orig = btn.textContent;
|
||||
btn.textContent = '✓ Copié';
|
||||
setTimeout(() => { btn.textContent = orig; }, 1200);
|
||||
});
|
||||
}
|
||||
|
||||
function openPasswordDialog(id, hasPassword) {
|
||||
document.getElementById('password-link-id').value = id;
|
||||
const info = document.getElementById('password-current-info');
|
||||
info.textContent = hasPassword
|
||||
? 'Un mot de passe est actuellement configuré. Entrez-en un nouveau ou laissez vide pour le supprimer.'
|
||||
: 'Aucun mot de passe configuré.';
|
||||
document.getElementById('password-dialog').showModal();
|
||||
}
|
||||
</script>
|
||||
<script src="<?= App::assetV('/assets/js/app/admin-acces-sharelink.js') ?>"></script>
|
||||
|
||||
<!-- Delete link confirm -->
|
||||
<dialog id="delete-link-dialog" class="admin-dialog admin-dialog--sm" aria-labelledby="delete-link-title">
|
||||
|
||||
Reference in New Issue
Block a user