Implement non-destructive Remove & Archive lifecycle system across assets, locations, tags, and shortlinks
This commit is contained in:
1 parent
3391257f6c
commit
960c375557
20 files changed
+1751
-185
No files matched your search
@@ -100,5 +100,42 @@
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<!-- QR Code Preview Modal -->
|
||||
<div id="qr-modal-overlay" style="display:none; position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,0.55); backdrop-filter:blur(4px); justify-content:center; align-items:center;">
|
||||
<div id="qr-modal-card" style="background:var(--color-bg-surface, #fff); border-radius:16px; padding:2.5rem 2rem 2rem; max-width:380px; width:90%; box-shadow:0 24px 48px -12px rgba(0,0,0,0.25); display:flex; flex-direction:column; align-items:center; gap:1.25rem; position:relative; animation:qrModalIn 0.25s cubic-bezier(0.16,1,0.3,1);">
|
||||
<button onclick="closeQRModal()" style="position:absolute; top:0.75rem; right:0.75rem; background:none; border:none; font-size:1.5rem; cursor:pointer; color:var(--color-text-light); line-height:1;" aria-label="Close">×</button>
|
||||
<h3 style="font-weight:700; font-size:1.15rem; color:var(--color-text-main); margin:0;">QR Code Preview</h3>
|
||||
<img id="qr-modal-image" src="" alt="QR Code" style="width:220px; height:220px; border:1px solid var(--color-border); border-radius:8px; background:#fff; padding:8px;">
|
||||
<code id="qr-modal-link" style="font-family:monospace; background:var(--color-bg-base, #f5f5f5); padding:0.4rem 0.85rem; border-radius:6px; border:1px solid var(--color-border); font-weight:600; font-size:0.95rem; word-break:break-all; text-align:center;"></code>
|
||||
<a id="qr-modal-download" download="" href="" class="btn btn-primary" style="width:100%; font-size:0.9rem; text-align:center;">Download QR Image</a>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
@keyframes qrModalIn {
|
||||
from { opacity:0; transform:scale(0.92) translateY(12px); }
|
||||
to { opacity:1; transform:scale(1) translateY(0); }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function openQRModal(slug, name) {
|
||||
var overlay = document.getElementById('qr-modal-overlay');
|
||||
document.getElementById('qr-modal-image').src = '/admin/qr/' + slug;
|
||||
document.getElementById('qr-modal-link').textContent = '/s/' + slug;
|
||||
var dl = document.getElementById('qr-modal-download');
|
||||
dl.href = '/admin/qr/' + slug;
|
||||
dl.download = (name || slug) + '_QR.png';
|
||||
overlay.style.display = 'flex';
|
||||
}
|
||||
function closeQRModal() {
|
||||
document.getElementById('qr-modal-overlay').style.display = 'none';
|
||||
}
|
||||
document.addEventListener('click', function(e) {
|
||||
if (e.target && e.target.id === 'qr-modal-overlay') closeQRModal();
|
||||
});
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape') closeQRModal();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user