Storage list full width; version list title keeps its spaces
This commit is contained in:
1 parent
31030b170a
commit
fef5dfec03
3 files changed
+3
-3
No files matched your search
@@ -98,7 +98,7 @@ export function SettingsStorage() {
|
||||
{tr(notice ? <p className="small storage-directory__notice" role="status"><Icon name="check" size={15}/>{tr(notice)}</p> : null)}
|
||||
{tr(directoryError ? <ErrorNotice message={directoryError}/> : null)}
|
||||
</section>
|
||||
<Field label={tr("Downloaded models")} hint={tr("{0} on this computer. Choose a version to delete its files.", [sizeGb(totalGb)])}>
|
||||
<Field wide label={tr("Downloaded models")} hint={tr("{0} on this computer. Choose a version to delete its files.", [sizeGb(totalGb)])}>
|
||||
{tr(rows ? <ul className="storage-models" aria-label={tr("Downloaded models")}>
|
||||
{tr(nativeModels.map(m => <li className="storage-model" key={m.model}><span className="storage-model__name" title={m.model_name || m.model}><strong>{nativeShortName(m.model)}</strong>{tr(native?.instances.some(i => i.model === m.model) ? <small className="muted">{tr('Loaded')}</small> : null)}</span><span className="storage-model__size muted">{tr(sizeGb(m.diskGb ?? 0))}</span><Btn size="sm" variant="danger" disabled={!!native?.jobs.some(j => j.state === 'running')} onClick={() => setNativeDeleting(m.model)}>{tr("Delete")}</Btn></li>))}
|
||||
{tr(versions.map(v => <li className="storage-model" key={v.id}><span className="storage-model__name" title={`${v.family} · ${v.quant}`}><strong>{`${v.local ? v.name : v.family} · ${v.quant}`}</strong>{tr(v.local ? <small className="muted">{tr('Local')}</small> : null)}{tr(v.id === library?.loaded ? <small className="muted">{tr('Loaded')}</small> : null)}</span><span className="storage-model__size muted">{tr(sizeGb(v.diskGb))}</span><Btn size="sm" variant="danger" disabled={pickerVersionState(v, library?.loaded ?? null).busy || pending || directoryPending} onClick={() => { setError(''); setSelected(v.id); }}>{tr("Delete")}</Btn></li>))}
|
||||
|
||||
@@ -7027,7 +7027,7 @@ textarea {
|
||||
.version-row.is-on { background: var(--st-surface-2); }
|
||||
.version-row__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.version-row__name svg { color: var(--st-accent-text); margin-right: 6px; vertical-align: -2px; }
|
||||
.version-row__title { display: inline-flex; align-items: baseline; gap: 0; max-width: 100%; }
|
||||
.version-row__title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||
.version-row__note { display: block; margin-top: 1px; font-size: var(--st-fs-xs); white-space: normal; line-height: 1.35; }
|
||||
.version-row__have, .version-trigger .version-row__have { margin-left: 8px; padding: 1px 8px; border-radius: var(--st-r-pill); background: var(--st-accent-tint); color: var(--st-accent-text); font-size: var(--st-fs-xs); font-weight: 700; white-space: nowrap; }
|
||||
.version-row__ssd { margin-left: 10px; font-size: var(--st-fs-xs); color: var(--st-warn-text); }
|
||||
|
||||
@@ -27,7 +27,7 @@ test('O01: the route uses that plan and the screen asks for an unload only when
|
||||
|
||||
test('F02: Settings -> Storage has ONE Downloaded models list and one total, with the shared files as a line of their own', async () => {
|
||||
const screen = await readFile(new URL('../src/components/SettingsStorage.tsx', import.meta.url), 'utf8');
|
||||
assert.equal((screen.match(/<Field label=\{tr\("Downloaded models"\)\}/g) ?? []).length, 1, 'no second section that contradicts the first');
|
||||
assert.equal((screen.match(/<Field wide label=\{tr\("Downloaded models"\)\}/g) ?? []).length, 1, 'no second section that contradicts the first');
|
||||
assert.match(screen, /totalGb/);
|
||||
assert.match(screen, /Shared files/);
|
||||
assert.match(screen, /No downloaded models/);
|
||||
|
||||
Reference in new issue
Block a user