diff --git a/thrimbletrimmer/src/thumbnails/ThumbnailManager.module.scss b/thrimbletrimmer/src/thumbnails/ThumbnailManager.module.scss index 2391be1..d941b5b 100644 --- a/thrimbletrimmer/src/thumbnails/ThumbnailManager.module.scss +++ b/thrimbletrimmer/src/thumbnails/ThumbnailManager.module.scss @@ -30,4 +30,18 @@ .templateUpdateErrors { color: #c00; +} + +.newTemplateFormFields { + display: grid; + grid-template-columns: max-content max-content; + gap: 1px; +} + +.newTemplateFieldLabelContainer { + display: contents; +} + +.newTemplateMidText { + margin: 2px; } \ No newline at end of file diff --git a/thrimbletrimmer/src/thumbnails/ThumbnailManager.tsx b/thrimbletrimmer/src/thumbnails/ThumbnailManager.tsx index b2d779b..9c7f783 100644 --- a/thrimbletrimmer/src/thumbnails/ThumbnailManager.tsx +++ b/thrimbletrimmer/src/thumbnails/ThumbnailManager.tsx @@ -1,4 +1,4 @@ -import { Accessor, Component, createSignal, For, Index, onMount, Show } from "solid-js"; +import { Accessor, Component, createSignal, For, Index, onMount, Setter, Show } from "solid-js"; import { GoogleSignIn, googleUser } from "../common/googleAuth"; import styles from "./ThumbnailManager.module.scss"; @@ -19,6 +19,7 @@ class Template { const ThumbnailManager: Component = () => { const [templates, setTemplates] = createSignal([]); + const [newTemplateErrors, setNewTemplateErrors] = createSignal([]); onMount(async () => { const templateDataResponse = await fetch("/thrimshim/templates"); @@ -46,6 +47,95 @@ const ThumbnailManager: Component = () => { setTemplates(templateList); }); + const submitHandler = async (origName: string, noImageIsError: boolean, errorList: Accessor, setErrorList: Setter, event: SubmitEvent): Promise