[ui] add "rescan vault" button
parent
c596da7514
commit
ab95457768
|
@ -27,6 +27,10 @@
|
||||||
addEmitter.emit("files", Array.from(fileInput.files));
|
addEmitter.emit("files", Array.from(fileInput.files));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rescan() {
|
||||||
|
fetch("/api/refresh", { method: "POST" });
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
@ -45,7 +49,7 @@
|
||||||
<Icon name="search" slot="prefix" />
|
<Icon name="search" slot="prefix" />
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
<button class="add-button" on:click={() => fileInput.click()}>
|
<button class="button" on:click={() => fileInput.click()}>
|
||||||
<Icon name="plus-circle" />
|
<Icon name="plus-circle" />
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
|
@ -54,12 +58,16 @@
|
||||||
on:change={onFileChange}
|
on:change={onFileChange}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="button" on:click={() => rescan()} title="Rescan vault">
|
||||||
|
<Icon name="refresh" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: .5rem;
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
height: 3.5rem;
|
height: 3.5rem;
|
||||||
border-bottom: 1px solid var(--foreground);
|
border-bottom: 1px solid var(--foreground);
|
||||||
|
@ -91,16 +99,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
margin-left: 1em;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-button {
|
.button {
|
||||||
border: 1px solid var(--foreground);
|
border: 1px solid var(--foreground);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: var(--background-lighter);
|
background: var(--background-lighter);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
margin: 0 0.5em;
|
|
||||||
padding: 0.25em 1em;
|
padding: 0.25em 1em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
Loading…
Reference in New Issue