Formatting
This commit is contained in:
parent
4b6f25656b
commit
2dbd724622
@ -27,7 +27,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function loadNames(keyword: String) {
|
async function loadNames(keyword: String) {
|
||||||
const url = "./names";
|
const url = './names';
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
@ -54,14 +54,14 @@
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="name" class="label">Name</label>
|
<label for="name" class="label">Name</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<AutoComplete
|
<AutoComplete
|
||||||
id="name"
|
id="name"
|
||||||
name="name"
|
name="name"
|
||||||
create={true}
|
create={true}
|
||||||
bind:selectedItem={selectedName}
|
bind:selectedItem={selectedName}
|
||||||
bind:text={selectedName}
|
bind:text={selectedName}
|
||||||
createText=""
|
createText=""
|
||||||
searchFunction={loadNames}
|
searchFunction={loadNames}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if form?.field === 'name'}
|
{#if form?.field === 'name'}
|
||||||
|
@ -6,7 +6,7 @@ export function GET() {
|
|||||||
const names = readdirSync(storagePath).filter((f) =>
|
const names = readdirSync(storagePath).filter((f) =>
|
||||||
statSync(`${storagePath}/${f}`).isDirectory()
|
statSync(`${storagePath}/${f}`).isDirectory()
|
||||||
);
|
);
|
||||||
names.sort()
|
names.sort();
|
||||||
|
|
||||||
return json(names);
|
return json(names);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user