fix(web): align the upload queue settings fields
ci / ts / ts (packages + web) (push) Successful in 1m53s

Labels that wrapped to two lines pushed their inputs down, the storage
select had its own label style, and the checkbox sat in the middle of its
cell. The section now lays label, input and hint rows out with subgrid, and
the select no longer stretches past its column.

Also add a web-fake launch config that runs the web app on the fake API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Opus 5.5 committed 2026-10-21 10:44:20 +03:00
1 parent 4d2c6ce22f
commit 7b7ce78de8
3 files changed
+79 -6

No files matched your search

+31 -2
View File
@@ -4,14 +4,43 @@
{ {
"name": "design", "name": "design",
"runtimeExecutable": "python", "runtimeExecutable": "python",
"runtimeArgs": ["-m", "http.server", "8765", "--bind", "127.0.0.1", "--directory", "docs"], "runtimeArgs": [
"-m",
"http.server",
"8765",
"--bind",
"127.0.0.1",
"--directory",
"docs"
],
"port": 8765 "port": 8765
}, },
{ {
"name": "web", "name": "web",
"runtimeExecutable": "pnpm", "runtimeExecutable": "pnpm",
"runtimeArgs": ["--filter", "@pipu/web", "dev"], "runtimeArgs": [
"--filter",
"@pipu/web",
"dev"
],
"port": 5173 "port": 5173
},
{
"name": "web-fake",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"--filter",
"@pipu/web",
"exec",
"vite",
"--port",
"4173",
"--strictPort"
],
"env": {
"VITE_E2E": "1"
},
"port": 4173
} }
] ]
} }
+6 -4
View File
@@ -585,7 +585,7 @@ export function UploadSettingsSection() {
return ( return (
<section className={s.section}> <section className={s.section}>
<h2>{t('uploads.settings_title')}</h2> <h2>{t('uploads.settings_title')}</h2>
<div className={u.grid}> <div className={u.settingsGrid}>
<Field label={t('uploads.set_queue')} value={form.queue} onChange={(v) => setForm({ ...form, queue: v })} inputMode="decimal" /> <Field label={t('uploads.set_queue')} value={form.queue} onChange={(v) => setForm({ ...form, queue: v })} inputMode="decimal" />
<Field <Field
label={t('uploads.set_per_user')} label={t('uploads.set_per_user')}
@@ -595,8 +595,8 @@ export function UploadSettingsSection() {
inputMode="decimal" inputMode="decimal"
/> />
<Field label={t('uploads.set_max_file')} value={form.maxFile} onChange={(v) => setForm({ ...form, maxFile: v })} inputMode="decimal" /> <Field label={t('uploads.set_max_file')} value={form.maxFile} onChange={(v) => setForm({ ...form, maxFile: v })} inputMode="decimal" />
<label className={s.sessions}> <label>
<span>{t('uploads.set_source')}</span> <span className={u.settingsLabel}>{t('uploads.set_source')}</span>
<select className={s.select} value={form.source} onChange={(e) => setForm({ ...form, source: e.target.value })}> <select className={s.select} value={form.source} onChange={(e) => setForm({ ...form, source: e.target.value })}>
<option value="">{t('uploads.set_source_auto')}</option> <option value="">{t('uploads.set_source_auto')}</option>
{sources.data {sources.data
@@ -608,11 +608,13 @@ export function UploadSettingsSection() {
))} ))}
</select> </select>
</label> </label>
<label className={s.sessions} style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}> <div>
<label className={u.settingsCheck}>
<input type="checkbox" checked={form.upgrade} onChange={(e) => setForm({ ...form, upgrade: e.target.checked })} /> <input type="checkbox" checked={form.upgrade} onChange={(e) => setForm({ ...form, upgrade: e.target.checked })} />
<span>{t('uploads.set_upgrade')}</span> <span>{t('uploads.set_upgrade')}</span>
</label> </label>
</div> </div>
</div>
<p className={s.note}>{t('uploads.set_note')}</p> <p className={s.note}>{t('uploads.set_note')}</p>
<div className={s.toolbar}> <div className={s.toolbar}>
<span style={{ flex: 1 }} /> <span style={{ flex: 1 }} />
@@ -239,6 +239,48 @@
gap: 12px; gap: 12px;
} }
/* Настройки очереди: подпись, поле и подсказка каждой ячейки — в общих строках, чтобы поля стояли на одном
уровне, даже когда подпись переносится. */
.settingsGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
column-gap: 12px;
row-gap: 6px;
}
.settingsGrid > * {
display: grid;
grid-row: span 3;
grid-template-rows: subgrid;
gap: 6px;
min-width: 0;
margin-bottom: 10px;
}
.settingsGrid select {
width: 100%;
min-width: 0;
}
.settingsGrid > * > :first-child {
align-self: end;
}
.settingsLabel {
font-size: 13px;
font-weight: 600;
color: var(--text2);
}
.settingsCheck {
grid-row: 2;
display: flex;
align-items: center;
gap: 8px;
min-height: 48px;
font-size: 14px;
}
.textarea { .textarea {
width: 100%; width: 100%;
min-height: 72px; min-height: 72px;