Adds live-class session scheduling on lessons (join link, date/time, timezone) with automatic 24h and 1h reminder emails plus a calendar invite (.ics), a time-change notification with an updated invite, a teacher-authored welcome email and session invite on enrollment, and a "Notify students" quiz nudge. LMS gets an upcoming live-sessions card and Join buttons, plus a reusable live-session card component (3 states) in @cio/ui with a Storybook story. The sidebar content tree now reflects sequential progression locking like the content list, and the course-completion confetti regression is fixed. Org-based emails no longer reference ClassroomIO by name. Docs add live-class, welcome-email, and course-progression guides, expand the certificates guide (design, signatures, corrected labels), move plan-required callouts to the top, flatten how-to-guides to the docs root with redirects, and add screenshots. Includes an add-docs-image skill.
91 lines
2.8 KiB
Svelte
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 - One Platform for Customer, Partner, and Employee Training'
|
|
);
|
|
|
|
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}
|