nsarrazin HF staff commited on
Commit
df27d77
1 Parent(s): 55af70d

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
- </div>
576
-
577
- <div class="fixed bottom-6 right-6 ml-auto mt-6 flex w-fit justify-end gap-2 sm:absolute">
578
- <a
579
- href={assistant ? `${base}/settings/assistants/${assistant?._id}` : `${base}/settings`}
580
- class="flex items-center justify-center rounded-full bg-gray-200 px-5 py-2 font-semibold text-gray-600"
581
- >
582
- Cancel
583
- </a>
584
- <button
585
- type="submit"
586
- disabled={loading}
587
- aria-disabled={loading}
588
- class="flex items-center justify-center rounded-full bg-black px-8 py-2 font-semibold"
589
- class:bg-gray-200={loading}
590
- class:text-gray-600={loading}
591
- class:text-white={!loading}
592
- >
593
- {assistant ? "Save" : "Create"}
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>