Show disk profile panel via Settings button

Profile panel is now hidden by default; a gear Settings button in
the disk card toggles it open/closed. Reduces visual clutter for
the common case when no profile changes are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 21:09:52 +03:00
parent 70d301f78f
commit e885e49647

View File

@@ -130,6 +130,7 @@ function renderDisk() {
<button class="button-danger" data-action="start-copy" data-mode="replace" ${activeTask ? 'disabled' : ''}>Replace media</button>
<button class="button-primary" data-action="start-copy" data-mode="add" ${activeTask ? 'disabled' : ''}>Add media</button>
<button class="button-danger ${activeTask ? '' : 'hidden'}" data-action="cancel-copy">Cancel</button>
<button class="button-secondary" data-action="disk-settings" style="margin-left:auto">⚙ Settings</button>
` : ''}
${isForeign ? `
<button class="button-secondary" data-action="init-disk">Initialize disk</button>
@@ -192,7 +193,7 @@ function renderProfile(disk) {
`;
return `
<section class="panel" id="profilePanel">
<section class="panel" id="profilePanel" style="display:none">
<h2>Профиль диска</h2>
<div class="panel-body">
<h3>Параметры копирования</h3>
@@ -406,6 +407,13 @@ document.getElementById('diskState').addEventListener('click', (event) => {
if (action === 'start-copy') startCopy(button.dataset.mode || 'add');
if (action === 'cancel-copy') cancelCopy();
if (action === 'init-disk') initDisk();
if (action === 'disk-settings') {
const panel = document.getElementById('profilePanel');
if (!panel) return;
const open = panel.style.display !== 'none';
panel.style.display = open ? 'none' : '';
button.textContent = open ? '⚙ Settings' : '⚙ Settings ✕';
}
});
const savedMountPath = localStorage.getItem('jukebox.selectedMountPath');