diff --git a/src/lib/appList.ts b/src/lib/appList.ts new file mode 100644 index 00000000000..f112e77b051 --- /dev/null +++ b/src/lib/appList.ts @@ -0,0 +1,46 @@ +import { PUBLIC_TITAN_BASE_URL } from "$env/static/public"; + +// 1. Define only the specific model constants you need +const tvViewership = "tv-viewership-2"; +const revenueAgent = "revenue-agent"; +const policyChatbot = "policy-chatbot"; + +// 2. Create a Union Type from these specific values +export type AppModel = + | typeof policyChatbot + | typeof tvViewership + | typeof revenueAgent; + +export type AppItem = { + label: string; + href: string; + icon: string; + model?: AppModel; + access?: boolean; + tag?: string; +}; + +// 3. Flattened array containing only the three requested apps +export const apps: AppItem[] = [ + { + label: "TV Viewership Agent", + href: `${PUBLIC_TITAN_BASE_URL}/?model=${tvViewership}`, + icon: "/static/suite/tv-viewership-2.svg", + model: tvViewership, + access: false, + }, + { + label: "TV Revenue Agent", + href: `${PUBLIC_TITAN_BASE_URL}/?model=${revenueAgent}`, + icon: "/static/suite/revenue-agent.svg", + model: revenueAgent, + access: false, + }, + { + label: "Policy Chatbot", + href: `${PUBLIC_TITAN_BASE_URL}/?model=${policyChatbot}`, + icon: "/static/suite/policy-chatbot.svg", + model: policyChatbot, + access: false, + } +]; \ No newline at end of file diff --git a/src/lib/components/NavbarApps.svelte b/src/lib/components/NavbarApps.svelte new file mode 100644 index 00000000000..6fe545cde04 --- /dev/null +++ b/src/lib/components/NavbarApps.svelte @@ -0,0 +1,138 @@ + + +
+ + + Apps + + + + + + + {#each displayApps as app} + + handleAppClick(e, app)} + class="px-4 py-3 flex items-center gap-3 text-gray-900 dark:text-white hover:bg-slate-50 dark:hover:bg-gray-800 transition-colors {!app.access ? 'opacity-60 cursor-not-allowed' : ''}" + > + {app.label} + + {app.label} + {#if app.tag} + {app.tag} + {/if} + + + {#if !app.access} + + + + {/if} + + + {/each} + + +
+ + + + + + + + +
+
+ +
+
+ Restricted Access + + + For access, kindly contact + titan.support@jiostar.com. + + +
+
+ +
+
+
+
+
+
\ No newline at end of file diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index ff2dd64cc05..87239d84ca7 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -39,8 +39,7 @@ import ChatCheck from '../icons/ChatCheck.svelte'; import Knobs from '../icons/Knobs.svelte'; import { WEBUI_API_BASE_URL } from '$lib/constants'; - - import AppDropdown from '$lib/components/app-dropdown.svelte'; + import NavbarApps from '$lib/components/NavbarApps.svelte' import TitanSupport from '$lib/components/TitanSupport.svelte'; const i18n = getContext('i18n'); @@ -118,9 +117,9 @@ {/if} - +
+ +