feat(theme): apply new color palette and polish UI
- Add theme variables and restyle popup/options using Primary 3 as background and Primary 2 as surfaces; accents use Primary 1.\n- Move Save to a footer section on the options page; add responsive layout and button variants.\n- Update icon build defaults to use Primary 2 for add-on and Primary 1 for toolbar icons.\n- Add build-and-commit helper to run build, stage generated assets, commit, and optionally push.\n- Add npm scripts: build:commit and build:commit:push.
This commit is contained in:
parent
699ff9fa7b
commit
982a16d86e
6 changed files with 285 additions and 26 deletions
|
|
@ -19,12 +19,7 @@
|
|||
<label>Secret <input id="rpc-secret" type="password" placeholder="your-token" /></label>
|
||||
</div>
|
||||
<div class="row actions">
|
||||
<button id="btn-save">Save</button>
|
||||
<button id="btn-reset">Reset</button>
|
||||
<button id="btn-test">Test Connection</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<output id="status"></output>
|
||||
<button id="btn-test" class="btn-outline">Test Connection</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -48,6 +43,16 @@
|
|||
<label>Base directory <input id="per-page-dir-base" placeholder="/aria2/data" /></label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="footer-actions">
|
||||
<div class="row actions">
|
||||
<button id="btn-save" class="btn-primary">Save</button>
|
||||
<button id="btn-reset" class="btn-danger">Reset</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<output id="status"></output>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script type="module" src="index.js"></script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,67 @@
|
|||
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; margin: 16px; }
|
||||
header h1 { margin: 0 0 12px; font-size: 18px; }
|
||||
section { margin: 12px 0; }
|
||||
:root {
|
||||
--c-primary-1: #5AC3D6;
|
||||
--c-primary-2: #223544;
|
||||
--c-primary-3: #4E6D84;
|
||||
--c-emph-1: #F5A623;
|
||||
--c-emph-2: #D94E87;
|
||||
--c-emph-3: #49C46D;
|
||||
|
||||
--bg: var(--c-primary-3);
|
||||
--surface: var(--c-primary-2);
|
||||
--text: #EAF2F7;
|
||||
--muted: rgba(255,255,255,0.75);
|
||||
--border: rgba(255,255,255,0.18);
|
||||
--input-bg: rgba(255,255,255,0.06);
|
||||
--input-border: rgba(255,255,255,0.22);
|
||||
--link: var(--c-primary-1);
|
||||
--focus: var(--c-primary-1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
||||
margin: 16px;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
header h1 { margin: 0 0 12px; font-size: 18px; color: var(--text); }
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@media (min-width: 820px) {
|
||||
main { grid-template-columns: 1fr 1fr; }
|
||||
.footer-actions { grid-column: 1 / -1; }
|
||||
}
|
||||
|
||||
section {
|
||||
margin: 0;
|
||||
background: var(--surface);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
|
||||
label { font-size: 14px; }
|
||||
label input { margin-left: 6px; min-width: 360px; }
|
||||
button { font-size: 13px; padding: 6px 12px; }
|
||||
#status { font-size: 13px; white-space: pre-wrap; }
|
||||
|
||||
input, select {
|
||||
background: var(--input-bg);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
input::placeholder { color: var(--muted); }
|
||||
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
|
||||
button { font-size: 13px; padding: 8px 14px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
|
||||
button:hover { filter: brightness(1.05); }
|
||||
.btn-primary { background: var(--c-primary-1); color: #11343C; }
|
||||
.btn-outline { background: transparent; color: var(--text); border-color: var(--input-border); }
|
||||
.btn-danger { background: var(--c-emph-2); color: #fff; }
|
||||
|
||||
#status { font-size: 13px; white-space: pre-wrap; color: var(--muted); }
|
||||
|
|
|
|||
|
|
@ -1,14 +1,103 @@
|
|||
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; margin: 10px; }
|
||||
header h1 { font-size: 14px; margin: 0 0 8px; }
|
||||
section { margin-bottom: 10px; }
|
||||
.row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
|
||||
label { font-size: 12px; }
|
||||
:root {
|
||||
--c-primary-1: #5AC3D6; /* accent light */
|
||||
--c-primary-2: #223544; /* deep surface */
|
||||
--c-primary-3: #4E6D84; /* app background */
|
||||
--c-emph-1: #F5A623; /* amber */
|
||||
--c-emph-2: #D94E87; /* pink */
|
||||
--c-emph-3: #49C46D; /* green */
|
||||
|
||||
--bg: var(--c-primary-3);
|
||||
--surface: var(--c-primary-2);
|
||||
--text: #EAF2F7;
|
||||
--muted: rgba(255,255,255,0.75);
|
||||
--border: rgba(255,255,255,0.18);
|
||||
--input-bg: rgba(255,255,255,0.06);
|
||||
--input-border: rgba(255,255,255,0.22);
|
||||
--link: var(--c-primary-1);
|
||||
--focus: var(--c-primary-1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
||||
margin: 10px;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 14px;
|
||||
margin: 0 0 8px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 10px;
|
||||
background: var(--surface);
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 6px 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
label { font-size: 12px; color: var(--text); }
|
||||
label input { margin-left: 6px; }
|
||||
|
||||
.chk { align-items: center; }
|
||||
button { font-size: 12px; padding: 4px 10px; }
|
||||
|
||||
input, select {
|
||||
background: var(--input-bg);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 6px;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
input::placeholder { color: var(--muted); }
|
||||
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
|
||||
button {
|
||||
font-size: 12px;
|
||||
padding: 6px 12px;
|
||||
background: var(--c-primary-1);
|
||||
color: #11343C;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover { filter: brightness(1.05); }
|
||||
button:active { transform: translateY(0.5px); }
|
||||
|
||||
#count { font-weight: bold; margin: 0 4px; }
|
||||
#status { font-size: 12px; white-space: pre-wrap; }
|
||||
.link { font-size: 12px; margin-left: auto; text-decoration: underline; cursor: pointer; }
|
||||
.preview ul, #preview { list-style: none; padding: 0; margin: 6px 0; max-height: 160px; overflow: auto; border: 1px solid #ddd; border-radius: 4px; }
|
||||
#preview li { font-size: 12px; padding: 4px 6px; border-bottom: 1px solid #eee; }
|
||||
#status { font-size: 12px; white-space: pre-wrap; color: var(--muted); }
|
||||
|
||||
.link {
|
||||
font-size: 12px;
|
||||
margin-left: auto;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
.preview ul, #preview {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 6px 0;
|
||||
max-height: 160px;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: var(--input-bg);
|
||||
}
|
||||
|
||||
#preview li {
|
||||
font-size: 12px;
|
||||
padding: 4px 6px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.08);
|
||||
}
|
||||
#preview li:last-child { border-bottom: 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue