|
203 | 203 | {#if envPublic.PUBLIC_APPLE_APP_ID} |
204 | 204 | <meta name="apple-itunes-app" content={`app-id=${envPublic.PUBLIC_APPLE_APP_ID}`} /> |
205 | 205 | {/if} |
| 206 | + <!-- TODO: remove --> |
| 207 | + {#if !$page.data.embeddedAssistantId} |
| 208 | + <script |
| 209 | + src="http://localhost:5173/chat/api/assistant/{$page.data.assistants.at(-1) |
| 210 | + ._id}/embed-snippet" |
| 211 | + defer |
| 212 | + ></script> |
| 213 | + {/if} |
206 | 214 | </svelte:head> |
207 | 215 |
|
208 | 216 | {#if !$settings.ethicsModalAccepted && $page.url.pathname !== `${base}/privacy` && PUBLIC_APP_DISCLAIMER === "1"} |
209 | 217 | <DisclaimerModal /> |
210 | 218 | {/if} |
211 | 219 |
|
212 | | -<ExpandNavigation |
213 | | - isCollapsed={isNavCollapsed} |
214 | | - on:click={() => (isNavCollapsed = !isNavCollapsed)} |
215 | | - classNames="absolute inset-y-0 z-10 my-auto {!isNavCollapsed |
216 | | - ? 'left-[280px]' |
217 | | - : 'left-0'} *:transition-transform" |
218 | | -/> |
219 | | - |
220 | | -<div |
221 | | - class="grid h-full w-screen grid-cols-1 grid-rows-[auto,1fr] overflow-hidden text-smd {!isNavCollapsed |
222 | | - ? 'md:grid-cols-[280px,1fr]' |
223 | | - : 'md:grid-cols-[0px,1fr]'} transition-[300ms] [transition-property:grid-template-columns] dark:text-gray-300 md:grid-rows-[1fr]" |
224 | | -> |
225 | | - <MobileNav isOpen={isNavOpen} on:toggle={(ev) => (isNavOpen = ev.detail)} title={mobileNavTitle}> |
226 | | - <NavMenu |
227 | | - conversations={data.conversations} |
228 | | - user={data.user} |
229 | | - canLogin={data.user === undefined && data.loginEnabled} |
230 | | - on:shareConversation={(ev) => shareConversation(ev.detail.id, ev.detail.title)} |
231 | | - on:deleteConversation={(ev) => deleteConversation(ev.detail)} |
232 | | - on:editConversationTitle={(ev) => editConversationTitle(ev.detail.id, ev.detail.title)} |
233 | | - /> |
234 | | - </MobileNav> |
235 | | - <nav |
236 | | - class=" grid max-h-screen grid-cols-1 grid-rows-[auto,1fr,auto] overflow-hidden *:w-[280px] max-md:hidden" |
| 220 | +{#if !$page.data.embeddedAssistantId} |
| 221 | + <ExpandNavigation |
| 222 | + isCollapsed={isNavCollapsed} |
| 223 | + on:click={() => (isNavCollapsed = !isNavCollapsed)} |
| 224 | + classNames="absolute inset-y-0 z-10 my-auto {!isNavCollapsed |
| 225 | + ? 'left-[280px]' |
| 226 | + : 'left-0'} *:transition-transform" |
| 227 | + /> |
| 228 | + |
| 229 | + <div |
| 230 | + class="grid h-full w-screen grid-cols-1 grid-rows-[auto,1fr] overflow-hidden text-smd {!isNavCollapsed |
| 231 | + ? 'md:grid-cols-[280px,1fr]' |
| 232 | + : 'md:grid-cols-[0px,1fr]'} transition-[300ms] [transition-property:grid-template-columns] dark:text-gray-300 md:grid-rows-[1fr]" |
237 | 233 | > |
238 | | - <NavMenu |
239 | | - conversations={data.conversations} |
240 | | - user={data.user} |
241 | | - canLogin={data.user === undefined && data.loginEnabled} |
242 | | - on:shareConversation={(ev) => shareConversation(ev.detail.id, ev.detail.title)} |
243 | | - on:deleteConversation={(ev) => deleteConversation(ev.detail)} |
244 | | - on:editConversationTitle={(ev) => editConversationTitle(ev.detail.id, ev.detail.title)} |
245 | | - /> |
246 | | - </nav> |
247 | | - {#if currentError} |
248 | | - <Toast message={currentError} /> |
249 | | - {/if} |
250 | | - <slot /> |
251 | | -</div> |
| 234 | + <MobileNav |
| 235 | + isOpen={isNavOpen} |
| 236 | + on:toggle={(ev) => (isNavOpen = ev.detail)} |
| 237 | + title={mobileNavTitle} |
| 238 | + > |
| 239 | + <NavMenu |
| 240 | + conversations={data.conversations} |
| 241 | + user={data.user} |
| 242 | + canLogin={data.user === undefined && data.loginEnabled} |
| 243 | + on:shareConversation={(ev) => shareConversation(ev.detail.id, ev.detail.title)} |
| 244 | + on:deleteConversation={(ev) => deleteConversation(ev.detail)} |
| 245 | + on:editConversationTitle={(ev) => editConversationTitle(ev.detail.id, ev.detail.title)} |
| 246 | + /> |
| 247 | + </MobileNav> |
| 248 | + <nav |
| 249 | + class=" grid max-h-screen grid-cols-1 grid-rows-[auto,1fr,auto] overflow-hidden *:w-[280px] max-md:hidden" |
| 250 | + > |
| 251 | + <NavMenu |
| 252 | + conversations={data.conversations} |
| 253 | + user={data.user} |
| 254 | + canLogin={data.user === undefined && data.loginEnabled} |
| 255 | + on:shareConversation={(ev) => shareConversation(ev.detail.id, ev.detail.title)} |
| 256 | + on:deleteConversation={(ev) => deleteConversation(ev.detail)} |
| 257 | + on:editConversationTitle={(ev) => editConversationTitle(ev.detail.id, ev.detail.title)} |
| 258 | + /> |
| 259 | + </nav> |
| 260 | + {#if currentError} |
| 261 | + <Toast message={currentError} /> |
| 262 | + {/if} |
| 263 | + <slot /> |
| 264 | + </div> |
| 265 | +{:else} |
| 266 | + <div |
| 267 | + class="grid h-full w-screen grid-cols-1 grid-rows-[auto,1fr] overflow-hidden text-smd dark:text-gray-300" |
| 268 | + > |
| 269 | + <slot /> |
| 270 | + </div> |
| 271 | +{/if} |
0 commit comments