WIP: Vendoo 1.44.0 – UX Foundation & Guided Workspaces #29

Draft
Masterluke77 wants to merge 284 commits from release/1.44.0-ux-foundation-production-update-v1 into main
Showing only changes of commit bb42622cba - Show all commits
+18 -11
View File
@@ -83,6 +83,7 @@
platformLabel.append(createNode('span', '', 'Plattform'));
const platform = createNode('select');
platform.dataset.uxTemplatePlatform = 'true';
platform.dataset.uxTemplateInitial = stored.platform || 'all';
platform.append(new Option('Alle Plattformen', 'all'));
platformLabel.append(platform);
@@ -132,7 +133,8 @@
function syncPlatformOptions(root) {
const select = root.querySelector('[data-ux-template-platform]');
if (!select) return;
const current = select.value || readStoredFilters().platform || 'all';
const initial = select.dataset.uxTemplateInitial;
const current = initial || select.value || readStoredFilters().platform || 'all';
const platforms = [...new Set([...root.querySelectorAll('#template-list .template-item')]
.map(item => parseTemplateMeta(item).platform)
.filter(Boolean))]
@@ -145,6 +147,7 @@
platforms.forEach(value => select.append(new Option(value, value)));
}
select.value = expected.includes(current) ? current : 'all';
delete select.dataset.uxTemplateInitial;
}
function enhanceTemplateCards(root) {
@@ -230,6 +233,16 @@
updateMetrics(root);
}
function updateEditorStatus(root) {
const status = root.querySelector('.ux-template-editor-status');
if (!status) return;
const name = root.querySelector('#tpl-name')?.value.trim();
const platform = root.querySelector('#tpl-platform')?.selectedOptions?.[0]?.textContent || 'Alle Plattformen';
const language = root.querySelector('#tpl-language')?.selectedOptions?.[0]?.textContent || 'Deutsch';
status.textContent = name ? `${name} · ${platform} · ${language}` : 'Name fehlt noch';
status.classList.toggle('is-incomplete', !name);
}
function structureEditor(root) {
const form = root.querySelector('#template-form');
if (!form || form.dataset.uxTemplateStructured === 'true') return;
@@ -264,18 +277,11 @@
form.replaceChildren(head, layout, actions);
form.dataset.uxTemplateStructured = 'true';
const syncStatus = () => {
const name = root.querySelector('#tpl-name')?.value.trim();
const platform = root.querySelector('#tpl-platform')?.selectedOptions?.[0]?.textContent || 'Alle Plattformen';
const language = root.querySelector('#tpl-language')?.selectedOptions?.[0]?.textContent || 'Deutsch';
status.textContent = name ? `${name} · ${platform} · ${language}` : 'Name fehlt noch';
status.classList.toggle('is-incomplete', !name);
};
['tpl-name', 'tpl-platform', 'tpl-language', 'tpl-tags'].forEach(id => {
root.querySelector(`#${id}`)?.addEventListener('input', syncStatus);
root.querySelector(`#${id}`)?.addEventListener('change', syncStatus);
root.querySelector(`#${id}`)?.addEventListener('input', () => updateEditorStatus(root));
root.querySelector(`#${id}`)?.addEventListener('change', () => updateEditorStatus(root));
});
syncStatus();
updateEditorStatus(root);
}
function syncMode(root) {
@@ -284,6 +290,7 @@
root.classList.toggle('ux-template-editor-open', open);
root.classList.toggle('ux-template-list-open', !open);
if (open) {
updateEditorStatus(root);
requestAnimationFrame(() => form.scrollIntoView({ behavior: 'smooth', block: 'start' }));
}
}