Files
classroomio/apps/dashboard/src/routes/+page.svelte
T
Rotimi Best d5b07d356e feat: HLS streaming, transcripts, agent course generation & landing-page course previews (#663)
New features:
- HLS video encoding/streaming (hls routes, hls-encoder) and a media
  transcripts pipeline (transcripts route + media-transcript queries)
- AI assistant chat vs. run model: agent-course-generation worker/queue,
  run-monitor pane, chat-changes card, content ask-ai bar
- Per-theme course-page previews across org landing-page themes (bold,
  classic, corporate, editorial, etc.) with a shared course token/component set
- View-as-student mode and login-link / link-invite invite flows

Refactor:
- Extract packages/core consolidating config (env, storage, dashboard-url),
  services and utils previously duplicated under apps/api/src/config
- Remove legacy agent service modules (chat-tools, chat-context,
  context-window, document, fetch-url, lesson-content)
- Relax Cross-Origin-Resource-Policy to allow cross-origin media embedding
- Add format script to tenant-router so turbo run format covers it
2026-06-07 18:43:05 +01:00

91 lines
2.8 KiB
Svelte

<script lang="ts">
import { onMount } from 'svelte';
import { resolve } from '$app/paths';
import { appInitApi } from '$features/app/init.svelte';
import { Spinner } from '@cio/ui/base/spinner';
import { Button } from '@cio/ui/base/button';
import FrownIcon from '@lucide/svelte/icons/frown';
import { Empty } from '@cio/ui/custom/empty';
import { SimpleLogoNav } from '@cio/ui/custom/simple-logo-nav';
import { buildOrgLandingPageProps, normalizeLandingPageSettings } from '$features/org/utils/landing-page';
import { basePath } from '$lib/utils/store/app';
import { t } from '$lib/utils/functions/translations';
import { user } from '$lib/utils/store/user';
let { data } = $props();
const hasSetupError = $derived(!appInitApi.loading && !!appInitApi.error);
const pageTitle = $derived(
data.isOrgSite && data.org
? data.org.name
: 'ClassroomIO - The Most Customizable Platform for Customer, Partner, and Employee Education'
);
const authAction = $derived(
$user.isLoggedIn
? {
label: t.get($basePath === '/lms' || $basePath === '#' ? 'navigation.goto_lms' : 'navigation.goto_dashboard'),
href: resolve($basePath !== '#' ? $basePath : '/lms', {})
}
: {
label: t.get('navigation.login'),
href: '/login'
}
);
const landingPageProps = $derived.by(() => {
if (!data.isOrgSite || !data.org) return null;
return buildOrgLandingPageProps(
data.org,
normalizeLandingPageSettings(data.org.landingpage),
data.courses,
data.hasMoreCourses,
authAction
);
});
onMount(() => {
if (!data.isOrgSite || !data.org) {
if (!appInitApi.loading) {
appInitApi.setupApp(data.locals, {
isOrgSite: data.isOrgSite,
orgSiteName: data.orgSiteName
});
}
}
});
</script>
<svelte:head>
<title>{pageTitle}</title>
</svelte:head>
{#if data.isOrgSite && data.org}
{#if data.ThemeComponent && landingPageProps}
<svelte:component this={data.ThemeComponent} {...landingPageProps} />
{/if}
{:else if hasSetupError}
<Empty
title="Something Went Wrong"
description="We encountered an unexpected error. Please reload the page or contact us for support."
icon={FrownIcon}
variant="page"
layout="full-page"
showLogo={true}
>
<p class="my-2 text-red-500">{appInitApi.error}</p>
<div class="flex gap-2">
<Button variant="secondary" onclick={() => window.location.reload()}>Reload Page</Button>
<Button variant="default" href="https://classroomio.com/contact">Contact Us</Button>
</div>
</Empty>
{:else}
<div class="m-2 flex h-screen w-screen flex-col items-center justify-center font-sans sm:m-0">
<SimpleLogoNav />
<Spinner class="size-14! text-blue-700!" />
</div>
{/if}