Refactor frontend views
All checks were successful
Build and push image / build-containers (push) Successful in 10m14s

This commit is contained in:
2025-06-14 21:56:17 +02:00
parent b3debd3ed2
commit bce372a1d1
32 changed files with 1230 additions and 458 deletions

View File

@ -126,41 +126,6 @@
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const tree = document.querySelector('sl-tree');
if (!tree) return;
tree.addEventListener('sl-selection-change', (event) => {
const selectedEl = event.detail.selection[0];
if (!selectedEl) return;
const type = selectedEl.dataset.type;
const name = selectedEl.dataset.name;
const groupPath = selectedEl.dataset.groupPath;
console.log(`Event on ${type} ${name} path: ${groupPath}`);
if (!type || !name) return;
let url = '';
if (type === 'entry') {
url = `/secrets/secret/${encodeURIComponent(name)}`;
} else if (type === 'group') {
//url = `/secrets/partial/group/${encodeURIComponent(name)}`;
url = `/secrets/group/${encodeURIComponent(groupPath)}`;
} else if (type == 'root') {
url = `/secrets/group/`;
}
if (url) {
htmx.ajax('GET', url, {
target: '#secretdetails',
swap: 'OuterHTML',
indicator: '.secret-spinner'
});
}
});
});
{% include '/secrets/partials/tree_event.js' %}
</script>
{% endblock %}