Fix button placement on assistant edit/create form (#962)
Browse files* Fix button placement on assistant edit/create form
* rm unnecessary changes
* Fix alignment
src/lib/components/AssistantSettings.svelte
CHANGED
@@ -526,7 +526,7 @@
|
|
526 |
{/if}
|
527 |
</div>
|
528 |
|
529 |
-
<div class="col-span-1 flex h-full flex-col">
|
530 |
<div class="mb-1 flex justify-between text-sm">
|
531 |
<span class="font-semibold"> Instructions (System Prompt) </span>
|
532 |
{#if dynamicPrompt && templateVariables.length}
|
@@ -572,26 +572,25 @@
|
|
572 |
|
573 |
<p class="text-xs text-red-500">{getError("preprompt", form)}</p>
|
574 |
</div>
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
</button>
|
595 |
</div>
|
596 |
</div>
|
597 |
</form>
|
|
|
526 |
{/if}
|
527 |
</div>
|
528 |
|
529 |
+
<div class="relative col-span-1 flex h-full flex-col">
|
530 |
<div class="mb-1 flex justify-between text-sm">
|
531 |
<span class="font-semibold"> Instructions (System Prompt) </span>
|
532 |
{#if dynamicPrompt && templateVariables.length}
|
|
|
572 |
|
573 |
<p class="text-xs text-red-500">{getError("preprompt", form)}</p>
|
574 |
</div>
|
575 |
+
<div class="absolute bottom-6 flex w-full justify-end gap-2 md:right-0 md:w-fit">
|
576 |
+
<a
|
577 |
+
href={assistant ? `${base}/settings/assistants/${assistant?._id}` : `${base}/settings`}
|
578 |
+
class="flex items-center justify-center rounded-full bg-gray-200 px-5 py-2 font-semibold text-gray-600"
|
579 |
+
>
|
580 |
+
Cancel
|
581 |
+
</a>
|
582 |
+
<button
|
583 |
+
type="submit"
|
584 |
+
disabled={loading}
|
585 |
+
aria-disabled={loading}
|
586 |
+
class="flex items-center justify-center rounded-full bg-black px-8 py-2 font-semibold"
|
587 |
+
class:bg-gray-200={loading}
|
588 |
+
class:text-gray-600={loading}
|
589 |
+
class:text-white={!loading}
|
590 |
+
>
|
591 |
+
{assistant ? "Save" : "Create"}
|
592 |
+
</button>
|
593 |
+
</div>
|
|
|
594 |
</div>
|
595 |
</div>
|
596 |
</form>
|