mobile
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
@@ -34,6 +34,7 @@
|
|
34 |
|
35 |
let hfToken = "";
|
36 |
let viewCode = false;
|
|
|
37 |
let showTokenModal = false;
|
38 |
let loading = false;
|
39 |
let latency = 0;
|
@@ -167,7 +168,7 @@
|
|
167 |
|
168 |
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
169 |
<div
|
170 |
-
class="w-dvh grid divide-gray-200 overflow-hidden bg-gray-100/50 max-md:divide-y
|
171 |
>
|
172 |
<div class=" flex flex-col overflow-y-auto py-3 pr-3">
|
173 |
<div
|
@@ -202,6 +203,15 @@
|
|
202 |
<div
|
203 |
class="fixed inset-x-0 bottom-0 flex h-20 items-center gap-2 overflow-hidden whitespace-nowrap px-3 md:absolute"
|
204 |
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
<button
|
206 |
type="button"
|
207 |
on:click={reset}
|
@@ -254,9 +264,9 @@
|
|
254 |
</button>
|
255 |
</div>
|
256 |
</div>
|
257 |
-
<div class="flex flex-col p-3">
|
258 |
<div
|
259 |
-
class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
|
260 |
>
|
261 |
<ModelSelector {models} bind:conversation />
|
262 |
|
|
|
34 |
|
35 |
let hfToken = "";
|
36 |
let viewCode = false;
|
37 |
+
let viewSettings = false;
|
38 |
let showTokenModal = false;
|
39 |
let loading = false;
|
40 |
let latency = 0;
|
|
|
168 |
|
169 |
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
170 |
<div
|
171 |
+
class="w-dvh grid divide-gray-200 overflow-hidden bg-gray-100/50 max-md:divide-y h-dvh md:grid-cols-[clamp(220px,20%,350px),minmax(0,1fr),clamp(270px,25%,300px)] dark:divide-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:[color-scheme:dark]"
|
172 |
>
|
173 |
<div class=" flex flex-col overflow-y-auto py-3 pr-3">
|
174 |
<div
|
|
|
203 |
<div
|
204 |
class="fixed inset-x-0 bottom-0 flex h-20 items-center gap-2 overflow-hidden whitespace-nowrap px-3 md:absolute"
|
205 |
>
|
206 |
+
<button
|
207 |
+
type="button"
|
208 |
+
on:click={() => (viewSettings = !viewSettings)}
|
209 |
+
class="md:hidden flex h-[39px] items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
|
210 |
+
>
|
211 |
+
<IconCode />
|
212 |
+
{!viewSettings ? "Settings" : "Hide Settings"}
|
213 |
+
</button
|
214 |
+
>
|
215 |
<button
|
216 |
type="button"
|
217 |
on:click={reset}
|
|
|
264 |
</button>
|
265 |
</div>
|
266 |
</div>
|
267 |
+
<div class="flex flex-col p-3 {viewSettings ? 'max-md:fixed' : 'max-md:hidden'} max-md:inset-x-0 max-md:bottom-20 ">
|
268 |
<div
|
269 |
+
class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border bg-white border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
|
270 |
>
|
271 |
<ModelSelector {models} bind:conversation />
|
272 |
|