fix: add text to no param tools

This commit is contained in:
2026-10-06 18:40:17 +05:00
parent 83e75b5589
commit e7d3925eb2
2 changed files with 46 additions and 36 deletions
+3 -3
View File
@@ -68,6 +68,9 @@
## Инструменты ## Инструменты
- [ ] remove-alpha-channel - дубль инструмента с выбором цвета на замену, что с
такими делать вообще? оставить как seo? можно ли под капотом использовать
другой инструмент с хардкодед настройками?
- [ ] qr code to text, text to qr code - [ ] qr code to text, text to qr code
- [ ] bar code to text, text to bar code - [ ] bar code to text, text to bar code
- [ ] split-into-parts-png — режим «по размеру тайла»: указываешь размер тайла - [ ] split-into-parts-png — режим «по размеру тайла»: указываешь размер тайла
@@ -144,9 +147,6 @@
## UI и качество ## UI и качество
- [ ] мёртвый i18n-ключ `noParams` («нет параметров — результат готов»): его
ничем не читают. Либо показывать подсказку для инструментов с пустой
схемой (FA-E1), либо удалить ключ из обеих локалей
- [ ] неудобно настраивать ползунками, некоторые инструменты удобнее настроить - [ ] неудобно настраивать ползунками, некоторые инструменты удобнее настроить
через drag-n-drop. звучит сложно, но надо придумать процесс через drag-n-drop. звучит сложно, но надо придумать процесс
- [ ] просмотр картинки в оригинальном размере, и возможно с зумом отдельных - [ ] просмотр картинки в оригинальном размере, и возможно с зумом отдельных
@@ -75,6 +75,7 @@
}: Props = $props(); }: Props = $props();
const layoutGroups = $derived(resolveLayoutGroups(schema)); const layoutGroups = $derived(resolveLayoutGroups(schema));
const isEmpty = $derived(Object.keys(schema.fields).length === 0);
function effectiveSpec(spec: FieldSpec): FieldSpec { function effectiveSpec(spec: FieldSpec): FieldSpec {
if (sourceDims && spec.kind === "number" && spec.maxFromSource) { if (sourceDims && spec.kind === "number" && spec.maxFromSource) {
@@ -84,7 +85,10 @@
} }
</script> </script>
{#each layoutGroups as group (group.key)} {#if isEmpty}
<p class="no-params">{t("paramsCard.noParams")}</p>
{:else}
{#each layoutGroups as group (group.key)}
{#if group.title} {#if group.title}
<span class="group-title">{groupLabel(group.title)}</span> <span class="group-title">{groupLabel(group.title)}</span>
{/if} {/if}
@@ -107,9 +111,9 @@
/> />
{/each} {/each}
</div> </div>
{/each} {/each}
<div class="panel-foot"> <div class="panel-foot">
<Button <Button
icon={RotateCcw} icon={RotateCcw}
label={t("ui.reset")} label={t("ui.reset")}
@@ -117,7 +121,8 @@
size="s" size="s"
onclick={onreset} onclick={onreset}
/> />
</div> </div>
{/if}
<style> <style>
.group-title { .group-title {
@@ -132,6 +137,11 @@
.group-title:first-child { .group-title:first-child {
margin-top: 0; margin-top: 0;
} }
.no-params {
margin: 0;
color: var(--color-text-muted);
font: var(--font-size-s) var(--font-mono);
}
.group-fields { .group-fields {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;