Skip to content

Commit 4f52972

Browse files
committed
Update name to title on new list page
1 parent 34b0137 commit 4f52972

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/listr/src/routes/(app)/new/+page.svelte

+8-8
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
tags: $form.publicItems as NDKTag[],
5353
});
5454
55-
list.title = $form.title;
56-
list.description = $form.description;
55+
list.title = $form.title.trim();
56+
list.description = $form.description?.trim();
5757
5858
// Only add a "d" tag if needed
5959
if (list.kind! >= 30000 && list.kind! <= 40000) {
@@ -108,8 +108,8 @@
108108
109109
$: nameInputDisabled = parseInt($form.kind) < 30000;
110110
111-
$: if ($form.kind === "10000") $form.name = "Mute";
112-
$: if ($form.kind === "10001") $form.name = "Pin";
111+
$: if ($form.kind === "10000") $form.title = "Mute";
112+
$: if ($form.kind === "10001") $form.title = "Pin";
113113
</script>
114114

115115
<svelte:head>
@@ -162,7 +162,7 @@
162162
>
163163
<AlertTriangle strokeWidth="1.5" size="24" class="shrink-0 w-6 h-6" />
164164
<span>
165-
Creating a new {$form.name} list will overwrite your current {$form.name}
165+
Creating a new {$form.title} list will overwrite your current {$form.title}
166166
list
167167
</span>
168168
</div>
@@ -178,7 +178,7 @@
178178
id="name"
179179
tabindex="0"
180180
class="border-gray-400 bg-transparent rounded-md grow w-full disabled:border-gray-600 disabled:text-gray-500"
181-
bind:value={$form.name}
181+
bind:value={$form.title}
182182
disabled={nameInputDisabled}
183183
/>
184184
<div class="" tabindex="-1">
@@ -191,8 +191,8 @@
191191
</Tooltip>
192192
</div>
193193
</div>
194-
{#if $errors.name}
195-
<span class="text-sm text-red-600 italic">{$errors.name}</span>
194+
{#if $errors.title}
195+
<span class="text-sm text-red-600 italic">{$errors.title}</span>
196196
{/if}
197197
</div>
198198
<div class="flex flex-col gap-0">

0 commit comments

Comments
 (0)