diff --git a/Plugin/unraid/css/varaverk.css b/Plugin/unraid/css/varaverk.css index 61f0532..685bc0d 100644 --- a/Plugin/unraid/css/varaverk.css +++ b/Plugin/unraid/css/varaverk.css @@ -513,6 +513,58 @@ body.vv-fullscreen #displaybox { padding-left: 1rem !important; padding-top: .5r .vv-cf-none { color: #9a8f6a; font-size: 12px; margin: 0; padding: 8px 10px; background: #1c1a12; border: 1px solid #33301f; border-left: 3px solid #7a6a3a; border-radius: 3px; } + +/* ── Typed settings controls ────────────────────────────────────────────────── + The controls the conf's own comments ask for: a switch for a boolean, a bounded number for a + number, a list for a documented set of choices. Everything above renders a conf field as a + text box, which is the honest default for a file of shell assignments and the wrong one for + the seventy-two of them that hold true or false. + + Extensions of vv-cf-*, not a new family. The nine page-private settings vocabularies in this + plugin exist because each page needed one control the shared set did not have and started a + set of its own; adding the control here is what stops the tenth. + + Note vv-cf-num is already taken — it is the row-number gutter, not a number input. */ +.vv-cf-ctl { display: flex; align-items: center; gap: 8px; } +.vv-cf-ctl .vv-cf-scalar { flex: 1 1 auto; min-width: 0; } +/* Bounded, so it does not stretch to the width of a path field and invite a paragraph. */ +.vv-cf-int { max-width: 150px; flex: 0 0 auto !important; } +.vv-cf-unit { font-size: 11px; color: #5a5a5a; flex-shrink: 0; } + +/* Sliding switch, lifted from the settings page — the nicest of the six this plugin had grown, + and the only one that reads as on or off from across a room rather than up close. */ +.vv-cf-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; + user-select: none; } +.vv-cf-track { width: 32px; height: 18px; border-radius: 9px; background: #222; border: 1px solid #333; + position: relative; transition: background .15s, border-color .15s; flex-shrink: 0; } +.vv-cf-track.on { background: #1a3a1a; border-color: #2d5a2d; } +.vv-cf-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; + border-radius: 50%; background: #555; transition: left .15s, background .15s; } +.vv-cf-track.on::after { left: 16px; background: #4caf50; } +/* States the value, not the setting's name — the key is already printed above it. Without this a + switch mid-travel is the only thing saying which way it is pointing. */ +.vv-cf-state { font-size: 11px; color: #5a5a5a; font-family: monospace; } + +.vv-cf-sel { background: #111; border: 1px solid #333; color: #ddd; padding: 4px 8px; + border-radius: 4px; font-family: monospace; font-size: 12px; max-width: 280px; } +.vv-cf-sel:focus { border-color: #555; outline: none; } +/* What the selected choice means, taken from the comment line that declared it. The confs + already explain each option; repeating that in the page would be a second copy to drift. */ +.vv-cf-opthint { font-size: 10px; color: #5a5a5a; font-style: italic; margin-top: 4px; } + +/* A credential is editable and not readable. Masked rather than omitted, because a settings page + that silently drops the fields it disapproves of is one you cannot trust to be complete. */ +.vv-cf-secret { letter-spacing: .12em; } +.vv-cf-reveal { background: none; border: 1px solid #2e2e2e; color: #5a5a5a; font-size: 10px; + padding: 3px 8px; border-radius: 3px; cursor: pointer; flex-shrink: 0; } +.vv-cf-reveal:hover { color: #aaa; border-color: #4a4a4a; } + +/* Touched but not yet saved. The row says so itself rather than relying on a Save button + somewhere else having become enabled. */ +.vv-cf-field.dirty { border-left-color: #6a5228; background: #14110a; } +.vv-cf-dot { width: 5px; height: 5px; border-radius: 50%; background: #ffb74d; flex-shrink: 0; + display: none; } +.vv-cf-field.dirty .vv-cf-dot { display: block; } .vv-custom-empty { color: #666; font-size: 13px; padding: 8px 4px; margin: 0; font-style: italic; } .vv-custom-count { font-size: 12px; color: #666; margin-left: 8px; flex-shrink: 0; } .vv-section-sep { font-size: 11px; font-weight: bold; color: #666; text-transform: uppercase; diff --git a/Plugin/unraid/include/confui.php b/Plugin/unraid/include/confui.php new file mode 100644 index 0000000..c0e7f37 --- /dev/null +++ b/Plugin/unraid/include/confui.php @@ -0,0 +1,275 @@ + + + - +