Spaces:
Running
Running
feat(settings): add indicator when custom instructions are active (#1438)
Browse files* feat(settings): add indicator when custom instructions are active
* fix: use icon visual indicator, reorder icons
src/routes/settings/(nav)/+layout.svelte
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
import CarbonClose from "~icons/carbon/close";
|
8 |
import CarbonArrowUpRight from "~icons/carbon/ArrowUpRight";
|
9 |
import CarbonAdd from "~icons/carbon/add";
|
|
|
10 |
|
11 |
import UserIcon from "~icons/carbon/user";
|
12 |
import type { LayoutData } from "../$types";
|
@@ -56,10 +57,16 @@
|
|
56 |
class="group flex h-10 flex-none items-center gap-2 pl-3 pr-2 text-sm text-gray-500 hover:bg-gray-100 md:rounded-xl
|
57 |
{model.id === $page.params.model ? '!bg-gray-100 !text-gray-800' : ''}"
|
58 |
>
|
59 |
-
<div class="truncate">{model.displayName}</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
{#if model.id === $settings.activeModel}
|
61 |
<div
|
62 |
-
class="
|
63 |
>
|
64 |
Active
|
65 |
</div>
|
|
|
7 |
import CarbonClose from "~icons/carbon/close";
|
8 |
import CarbonArrowUpRight from "~icons/carbon/ArrowUpRight";
|
9 |
import CarbonAdd from "~icons/carbon/add";
|
10 |
+
import CarbonTextLongParagraph from "~icons/carbon/text-long-paragraph";
|
11 |
|
12 |
import UserIcon from "~icons/carbon/user";
|
13 |
import type { LayoutData } from "../$types";
|
|
|
57 |
class="group flex h-10 flex-none items-center gap-2 pl-3 pr-2 text-sm text-gray-500 hover:bg-gray-100 md:rounded-xl
|
58 |
{model.id === $page.params.model ? '!bg-gray-100 !text-gray-800' : ''}"
|
59 |
>
|
60 |
+
<div class="mr-auto truncate">{model.displayName}</div>
|
61 |
+
|
62 |
+
{#if $settings.customPrompts?.[model.id]}
|
63 |
+
<CarbonTextLongParagraph
|
64 |
+
class="size-6 rounded-md border border-gray-300 p-1 text-gray-800"
|
65 |
+
/>
|
66 |
+
{/if}
|
67 |
{#if model.id === $settings.activeModel}
|
68 |
<div
|
69 |
+
class="rounded-lg bg-black px-2 py-1.5 text-xs font-semibold leading-none text-white"
|
70 |
>
|
71 |
Active
|
72 |
</div>
|