diff --git a/css/styles.css b/css/styles.css index e8434bd..0e5bfc2 100644 --- a/css/styles.css +++ b/css/styles.css @@ -339,9 +339,33 @@ body { } .toggle-label input[type="checkbox"] { - accent-color: var(--text); + appearance: none; + width: 0.875rem; + height: 0.875rem; + border: 1px solid var(--border); + border-radius: 3px; + background: var(--bg-editor); margin: 0; cursor: pointer; + position: relative; +} + +.toggle-label input[type="checkbox"]:checked { + background: var(--text); + border-color: var(--text); +} + +.toggle-label input[type="checkbox"]:checked::after { + content: ""; + position: absolute; + inset: 1px; + border-bottom: 1.5px solid var(--bg); + border-right: 1.5px solid var(--bg); + width: 4px; + height: 7px; + transform: rotate(45deg); + top: 0; + left: 3px; } /* Output */ diff --git a/index.html b/index.html index 18d2808..eed3b34 100644 --- a/index.html +++ b/index.html @@ -86,9 +86,6 @@

Firegen

diff --git a/js/app.mjs b/js/app.mjs index 6bfd6d4..8146b59 100644 --- a/js/app.mjs +++ b/js/app.mjs @@ -82,7 +82,6 @@ function init() { btnImport: document.getElementById("bash-import-submit"), btnCancel: document.getElementById("bash-import-cancel"), status: document.getElementById("bash-import-status"), - mergeCheckbox: document.getElementById("bash-import-merge"), }, (yaml) => { editor.setValue(yaml); diff --git a/js/import-export.mjs b/js/import-export.mjs index 6be95f6..e47c846 100644 --- a/js/import-export.mjs +++ b/js/import-export.mjs @@ -208,10 +208,9 @@ export function setupImport(fileInput, onLoad) { * @param {function} getEditorYaml - returns current editor YAML string (for merge mode) */ export function setupBashImport(elements, onImport, getEditorYaml) { - const { btnOpen, modal, textarea, btnImport, btnCancel, status, mergeCheckbox } = elements; + const { btnOpen, modal, textarea, btnImport, btnCancel, status } = elements; function openModal() { - textarea.value = ""; status.hidden = true; status.textContent = ""; modal.hidden = false; @@ -268,10 +267,9 @@ export function setupBashImport(elements, onImport, getEditorYaml) { return; } + // Always merge with existing editor content let finalConfig = config; - - // Merge mode: combine with existing editor content - if (mergeCheckbox && mergeCheckbox.checked && getEditorYaml) { + if (getEditorYaml) { const existingYaml = getEditorYaml(); if (existingYaml && existingYaml.trim()) { try { @@ -280,7 +278,7 @@ export function setupBashImport(elements, onImport, getEditorYaml) { finalConfig = mergeConfigs(existing, config); } } catch { - // Existing YAML is invalid — fall through to replace mode + // Existing YAML is invalid — replace instead } } }