mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-11-13 17:08:20 +00:00
fix: add text to no param tools
This commit is contained in:
+3
-3
@@ -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,40 +85,44 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each layoutGroups as group (group.key)}
|
{#if isEmpty}
|
||||||
{#if group.title}
|
<p class="no-params">{t("paramsCard.noParams")}</p>
|
||||||
<span class="group-title">{groupLabel(group.title)}</span>
|
{:else}
|
||||||
{/if}
|
{#each layoutGroups as group (group.key)}
|
||||||
<div
|
{#if group.title}
|
||||||
class="group-fields"
|
<span class="group-title">{groupLabel(group.title)}</span>
|
||||||
style:grid-template-columns={group.cols > 1
|
{/if}
|
||||||
? `repeat(${group.cols}, minmax(0, 1fr))`
|
<div
|
||||||
: undefined}
|
class="group-fields"
|
||||||
>
|
style:grid-template-columns={group.cols > 1
|
||||||
{#each group.fields as id (id)}
|
? `repeat(${group.cols}, minmax(0, 1fr))`
|
||||||
{@const Control = FIELDS[schema.fields[id].spec.kind]}
|
: undefined}
|
||||||
<Control
|
>
|
||||||
label={fieldLabel(schema.fields[id], id)}
|
{#each group.fields as id (id)}
|
||||||
value={values[id]}
|
{@const Control = FIELDS[schema.fields[id].spec.kind]}
|
||||||
spec={effectiveSpec(schema.fields[id].spec)}
|
<Control
|
||||||
{toolId}
|
label={fieldLabel(schema.fields[id], id)}
|
||||||
fieldId={id}
|
value={values[id]}
|
||||||
{sourceDims}
|
spec={effectiveSpec(schema.fields[id].spec)}
|
||||||
onchange={(v, axis) => onchange(id, v, axis)}
|
{toolId}
|
||||||
/>
|
fieldId={id}
|
||||||
{/each}
|
{sourceDims}
|
||||||
</div>
|
onchange={(v, axis) => onchange(id, v, axis)}
|
||||||
{/each}
|
/>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
|
||||||
<div class="panel-foot">
|
<div class="panel-foot">
|
||||||
<Button
|
<Button
|
||||||
icon={RotateCcw}
|
icon={RotateCcw}
|
||||||
label={t("ui.reset")}
|
label={t("ui.reset")}
|
||||||
variant="clear"
|
variant="clear"
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user