diff --git a/src/lib/ListTextInput/ListTextInputElement.svelte b/src/lib/ListTextInput/ListTextInputElement.svelte new file mode 100644 index 0000000..e595ba5 --- /dev/null +++ b/src/lib/ListTextInput/ListTextInputElement.svelte @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/src/lib/ListTextInput/NewListTextInput.svelte b/src/lib/ListTextInput/NewListTextInput.svelte new file mode 100644 index 0000000..5151eed --- /dev/null +++ b/src/lib/ListTextInput/NewListTextInput.svelte @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/src/lib/MetadataInput.svelte b/src/lib/MetadataInput.svelte index 4e898a7..466598c 100644 --- a/src/lib/MetadataInput.svelte +++ b/src/lib/MetadataInput.svelte @@ -3,6 +3,8 @@ import type {Writable} from "svelte/store"; import IntegerInput from "./IntegerInput.svelte"; import TextInput from "./TextInput.svelte"; + import NewListTextInput from "./ListTextInput/NewListTextInput.svelte"; + import ListTextInputElement from "./ListTextInput/ListTextInputElement.svelte"; let seriesTitle = ""; let volumeTitle = ""; @@ -19,10 +21,25 @@ let editor: string; let translator: string; let publisher: string; - let tags: Vec; + let tags: Array = []; let genre = "Hentai"; let lang = "en"; let ageRating = "18+"; + + $: { + if (releaseYear < 0) { + releaseMonth = -1; + } + if (releaseMonth < 0) { + releaseDay = -1; + } + } + + function deleteTag(event: any) { + console.log("deleted") + tags.splice(event.detail.tagId, 1); + tags = tags; + }
@@ -49,26 +66,36 @@ - -
+ {#if releaseYear > 0} + + {#if releaseMonth > 0} + + {/if} + {/if} +
+ - +
- +

- - + +
- +
- -
+ + + {#each tags as tag, id} + + {/each} +