nsarrazin HF Staff commited on
Commit
2a618ac
·
unverified ·
1 Parent(s): 10b8070

fix(huggingchat): remove app banners (#1426)

Browse files
chart/env/prod.yaml CHANGED
@@ -280,7 +280,6 @@ envVars:
280
  PUBLIC_APP_DATA_SHARING: 0
281
  PUBLIC_APP_DISCLAIMER: 1
282
  PUBLIC_PLAUSIBLE_SCRIPT_URL: "/js/script.js"
283
- PUBLIC_APPLE_APP_ID: "6476778843"
284
  REQUIRE_FEATURED_ASSISTANTS: "true"
285
  TASK_MODEL: "llhf/Meta-Llama-3.1-8B-Instruct"
286
  TEXT_EMBEDDING_MODELS: >
 
280
  PUBLIC_APP_DATA_SHARING: 0
281
  PUBLIC_APP_DISCLAIMER: 1
282
  PUBLIC_PLAUSIBLE_SCRIPT_URL: "/js/script.js"
 
283
  REQUIRE_FEATURED_ASSISTANTS: "true"
284
  TASK_MODEL: "llhf/Meta-Llama-3.1-8B-Instruct"
285
  TEXT_EMBEDDING_MODELS: >
src/routes/+layout.svelte CHANGED
@@ -5,7 +5,6 @@
5
  import { goto, invalidate } from "$app/navigation";
6
  import { base } from "$app/paths";
7
  import { page } from "$app/stores";
8
- import { browser } from "$app/environment";
9
 
10
  import { env as envPublic } from "$env/dynamic/public";
11
 
@@ -21,9 +20,6 @@
21
  import titleUpdate from "$lib/stores/titleUpdate";
22
  import DisclaimerModal from "$lib/components/DisclaimerModal.svelte";
23
  import ExpandNavigation from "$lib/components/ExpandNavigation.svelte";
24
- import Logo from "$lib/components/icons/Logo.svelte";
25
- import { isHuggingChat } from "$lib/utils/isHuggingChat";
26
- import CarbonClose from "~icons/carbon/close";
27
  import { PUBLIC_APP_DISCLAIMER } from "$env/static/public";
28
 
29
  export let data;
@@ -152,12 +148,6 @@
152
  $: mobileNavTitle = ["/models", "/assistants", "/privacy"].includes($page.route.id ?? "")
153
  ? ""
154
  : data.conversations.find((conv) => conv.id === $page.params.id)?.title;
155
-
156
- let showAndroidModal =
157
- browser && // only show on browser
158
- isHuggingChat && // only show on huggingchat
159
- navigator.userAgent.toLowerCase().includes("android") && // if it's android
160
- !navigator.userAgent.includes("co.huggingface.chat_ui_android"); // but not the android app
161
  </script>
162
 
163
  <svelte:head>
@@ -259,35 +249,3 @@
259
  {/if}
260
  <slot />
261
  </div>
262
-
263
- {#if showAndroidModal}
264
- <a
265
- href="https://play.google.com/store/apps/details?id=co.huggingface.chat_ui_android"
266
- class="fixed left-0 right-0 top-0 mx-auto flex h-fit min-h-12 w-screen flex-nowrap items-center justify-evenly gap-4 bg-gray-200 px-4 py-4 text-gray-900 shadow-lg backdrop-blur-md
267
- hover:bg-gray-100
268
- dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 sm:top-5
269
- sm:max-w-fit sm:gap-4 sm:rounded-lg"
270
- >
271
- <button
272
- class="border-r-2 border-black/20 pr-4 text-2xl"
273
- on:click|stopPropagation|preventDefault={() => {
274
- showAndroidModal = false;
275
- }}
276
- >
277
- <CarbonClose />
278
- </button>
279
-
280
- <Logo classNames="mx-2.5 scale-150" />
281
-
282
- <div class="flex flex-col sm:mr-4">
283
- <span class="text-lg font-semibold">HuggingChat</span>
284
- <span class="text-sm">View on Google Play</span>
285
- </div>
286
-
287
- <span
288
- class="ml-auto mr-2 text-center text-lg font-medium text-gray-700 underline underline-offset-4 dark:text-gray-300"
289
- >
290
- Open
291
- </span>
292
- </a>
293
- {/if}
 
5
  import { goto, invalidate } from "$app/navigation";
6
  import { base } from "$app/paths";
7
  import { page } from "$app/stores";
 
8
 
9
  import { env as envPublic } from "$env/dynamic/public";
10
 
 
20
  import titleUpdate from "$lib/stores/titleUpdate";
21
  import DisclaimerModal from "$lib/components/DisclaimerModal.svelte";
22
  import ExpandNavigation from "$lib/components/ExpandNavigation.svelte";
 
 
 
23
  import { PUBLIC_APP_DISCLAIMER } from "$env/static/public";
24
 
25
  export let data;
 
148
  $: mobileNavTitle = ["/models", "/assistants", "/privacy"].includes($page.route.id ?? "")
149
  ? ""
150
  : data.conversations.find((conv) => conv.id === $page.params.id)?.title;
 
 
 
 
 
 
151
  </script>
152
 
153
  <svelte:head>
 
249
  {/if}
250
  <slot />
251
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/huggingchat/manifest.json CHANGED
@@ -50,12 +50,5 @@
50
  "sizes": "512x512",
51
  "type": "image/png"
52
  }
53
- ],
54
- "prefer_related_applications": true,
55
- "related_applications": [
56
- {
57
- "platform": "play",
58
- "id": "co.huggingface.chat_ui_android"
59
- }
60
  ]
61
  }
 
50
  "sizes": "512x512",
51
  "type": "image/png"
52
  }
 
 
 
 
 
 
 
53
  ]
54
  }