Skip to content

Commit

Permalink
bug fix of issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
marfantyk committed Sep 29, 2024
1 parent f912f02 commit c38c6b8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
export let createdByName: string | undefined;
export let avatar: string | undefined;
import logo from "../../../../../static/huggingchat/logo.png?raw";
import { page } from "$app/stores";
import { env as envPublic } from "$env/dynamic/public";
import { base } from "$app/paths";
</script>

<div class="flex h-full w-full flex-col items-center justify-center bg-black p-2">
Expand All @@ -16,7 +18,24 @@
<p class="mb-2 mt-0 text-3xl font-normal text-gray-400">
<span class="mr-1.5 h-8 w-8">
<!-- eslint-disable-next-line -->
{@html logo}
{#if envPublic.PUBLIC_APP_ASSETS === "chatui"}
<svg
height="30"
width="30"
viewBox="0 0 30 30"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4.06151 14.1464C4.06151 11.8818 4.9611 9.71004 6.56237 8.10877C8.16364 6.5075 10.3354 5.60791 12.6 5.60791H16.5231C18.6254 5.60791 20.6416 6.44307 22.1282 7.92965C23.6148 9.41624 24.45 11.4325 24.45 13.5348C24.45 15.6372 23.6148 17.6534 22.1282 19.14C20.6416 20.6266 18.6254 21.4618 16.5231 21.4618H7.08459L4.63844 23.8387C4.59547 23.8942 4.53557 23.9343 4.4678 23.9527C4.40004 23.9712 4.32811 23.9671 4.2629 23.941C4.1977 23.9149 4.14276 23.8683 4.10643 23.8082C4.07009 23.7481 4.05432 23.6778 4.06151 23.6079V14.1464Z"
class="fill-primary-500"
/>
</svg>
{:else}
<img
alt="{envPublic.PUBLIC_APP_NAME} logo"
src="{envPublic.PUBLIC_ORIGIN || $page.url.origin}{base}/{envPublic.PUBLIC_APP_ASSETS}/logo.png"
/>
{/if}
</span>
AI assistant
</p>
Expand Down
22 changes: 20 additions & 2 deletions src/routes/models/[...model]/thumbnail.png/ModelThumbnail.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<script lang="ts">
import { env as envPublic } from "$env/dynamic/public";
import { page } from "$app/stores";
import { isHuggingChat } from "$lib/utils/isHuggingChat";
import { base } from "$app/paths";
export let name: string;
export let logoUrl: string | undefined;
import logo from "../../../../../static/huggingchat/logo.png?raw";
</script>

<div class=" flex h-[648px] w-full flex-col items-center bg-white">
Expand All @@ -31,7 +32,24 @@
<div class="flex flex-row pt-3 text-5xl font-bold text-black">
<div class="mr-5 flex items-center justify-center" id="logo">
<!-- eslint-disable-next-line -->
{@html logo}
{#if envPublic.PUBLIC_APP_ASSETS === "chatui"}
<svg
height="30"
width="30"
viewBox="0 0 30 30"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4.06151 14.1464C4.06151 11.8818 4.9611 9.71004 6.56237 8.10877C8.16364 6.5075 10.3354 5.60791 12.6 5.60791H16.5231C18.6254 5.60791 20.6416 6.44307 22.1282 7.92965C23.6148 9.41624 24.45 11.4325 24.45 13.5348C24.45 15.6372 23.6148 17.6534 22.1282 19.14C20.6416 20.6266 18.6254 21.4618 16.5231 21.4618H7.08459L4.63844 23.8387C4.59547 23.8942 4.53557 23.9343 4.4678 23.9527C4.40004 23.9712 4.32811 23.9671 4.2629 23.941C4.1977 23.9149 4.14276 23.8683 4.10643 23.8082C4.07009 23.7481 4.05432 23.6778 4.06151 23.6079V14.1464Z"
class="fill-primary-500"
/>
</svg>
{:else}
<img
alt="{envPublic.PUBLIC_APP_NAME} logo"
src="{envPublic.PUBLIC_ORIGIN || $page.url.origin}{base}/{envPublic.PUBLIC_APP_ASSETS}/logo.png"
/>
{/if}
</div>
<span>HuggingChat</span>
</div>
Expand Down

0 comments on commit c38c6b8

Please sign in to comment.