Spaces:
Running
Running
responsive stuffs
Browse files
src/lib/components/flow/actions/InstructionsModal.svelte
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
import * as Dialog from '$lib/components/ui/sheet/index.js';
|
| 6 |
import Code from '$lib/components/chat/markdown/Code.svelte';
|
| 7 |
import { useSvelteFlow } from '@xyflow/svelte';
|
|
|
|
| 8 |
|
| 9 |
type Instruction = {
|
| 10 |
library: string;
|
|
@@ -188,9 +189,11 @@ for chunk in chunks:
|
|
| 188 |
|
| 189 |
<Dialog.Root bind:open>
|
| 190 |
<Dialog.Trigger class="">
|
| 191 |
-
<Button variant="outline">
|
| 192 |
<CodeXml />
|
| 193 |
-
|
|
|
|
|
|
|
| 194 |
</Button>
|
| 195 |
</Dialog.Trigger>
|
| 196 |
|
|
|
|
| 5 |
import * as Dialog from '$lib/components/ui/sheet/index.js';
|
| 6 |
import Code from '$lib/components/chat/markdown/Code.svelte';
|
| 7 |
import { useSvelteFlow } from '@xyflow/svelte';
|
| 8 |
+
import { breakpointsState } from '$lib/state/breakpoints.svelte';
|
| 9 |
|
| 10 |
type Instruction = {
|
| 11 |
library: string;
|
|
|
|
| 189 |
|
| 190 |
<Dialog.Root bind:open>
|
| 191 |
<Dialog.Trigger class="">
|
| 192 |
+
<Button variant="outline" size={breakpointsState.isMobile ? 'icon-sm' : 'default'}>
|
| 193 |
<CodeXml />
|
| 194 |
+
{#if !breakpointsState.isMobile}
|
| 195 |
+
How to use the API
|
| 196 |
+
{/if}
|
| 197 |
</Button>
|
| 198 |
</Dialog.Trigger>
|
| 199 |
|
src/lib/components/flow/actions/PanelRightActions.svelte
CHANGED
|
@@ -10,6 +10,7 @@
|
|
| 10 |
import defaultAvatar from '$lib/assets/default-avatar.svg';
|
| 11 |
import BillingManagementModal from '$lib/components/billing/BillingManagementModal.svelte';
|
| 12 |
import InstructionsModal from './InstructionsModal.svelte';
|
|
|
|
| 13 |
|
| 14 |
let { canReset }: { canReset: boolean } = $props();
|
| 15 |
|
|
@@ -27,16 +28,23 @@
|
|
| 27 |
|
| 28 |
<Panel position="top-right" class="flex items-center justify-end gap-2 p-1 lg:p-2">
|
| 29 |
{#if showResetButton}
|
| 30 |
-
<Button
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
<RefreshCcw />
|
| 32 |
-
|
|
|
|
|
|
|
| 33 |
</Button>
|
| 34 |
{/if}
|
| 35 |
<InstructionsModal />
|
| 36 |
<DropdownMenu.Root>
|
| 37 |
<DropdownMenu.Trigger>
|
| 38 |
{#snippet child({ props })}
|
| 39 |
-
<Button {...props} variant="outline">
|
| 40 |
{#if authState.loading}
|
| 41 |
<div class="h-2 w-12 animate-pulse rounded-full bg-accent-foreground/20"></div>
|
| 42 |
{:else if authState.user}
|
|
|
|
| 10 |
import defaultAvatar from '$lib/assets/default-avatar.svg';
|
| 11 |
import BillingManagementModal from '$lib/components/billing/BillingManagementModal.svelte';
|
| 12 |
import InstructionsModal from './InstructionsModal.svelte';
|
| 13 |
+
import { breakpointsState } from '$lib/state/breakpoints.svelte';
|
| 14 |
|
| 15 |
let { canReset }: { canReset: boolean } = $props();
|
| 16 |
|
|
|
|
| 28 |
|
| 29 |
<Panel position="top-right" class="flex items-center justify-end gap-2 p-1 lg:p-2">
|
| 30 |
{#if showResetButton}
|
| 31 |
+
<Button
|
| 32 |
+
variant="outline"
|
| 33 |
+
size={breakpointsState.isMobile ? 'icon-sm' : 'default'}
|
| 34 |
+
class=""
|
| 35 |
+
onclick={handleReset}
|
| 36 |
+
>
|
| 37 |
<RefreshCcw />
|
| 38 |
+
{#if !breakpointsState.isMobile}
|
| 39 |
+
Start new chat
|
| 40 |
+
{/if}
|
| 41 |
</Button>
|
| 42 |
{/if}
|
| 43 |
<InstructionsModal />
|
| 44 |
<DropdownMenu.Root>
|
| 45 |
<DropdownMenu.Trigger>
|
| 46 |
{#snippet child({ props })}
|
| 47 |
+
<Button {...props} variant="outline" size={breakpointsState.isMobile ? 'sm' : 'default'}>
|
| 48 |
{#if authState.loading}
|
| 49 |
<div class="h-2 w-12 animate-pulse rounded-full bg-accent-foreground/20"></div>
|
| 50 |
{:else if authState.user}
|