diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-07 01:33:52 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-07 01:34:48 +0200 |
| commit | a8b44b09a404aee477e735501b828d1b14aad311 (patch) | |
| tree | 41b8e21f7484a3f93867a137826da255081fb0ab /apps/portal | |
| parent | 591f1c5fd81bd2b92e91a90847ea06438211078d (diff) | |
| download | greatoffice-a8b44b09a404aee477e735501b828d1b14aad311.tar.xz greatoffice-a8b44b09a404aee477e735501b828d1b14aad311.zip | |
feat: Add inital translation support
Diffstat (limited to 'apps/portal')
| -rw-r--r-- | apps/portal/src/app/pages/_layout.svelte | 12 | ||||
| -rw-r--r-- | apps/portal/src/app/pages/_layout@loggedin.svelte | 11 | ||||
| -rw-r--r-- | apps/portal/src/app/pages/home.svelte | 36 | ||||
| -rw-r--r-- | apps/portal/src/app/pages/login.svelte | 2 | ||||
| -rw-r--r-- | apps/portal/src/app/pages/sign-up.svelte | 3 |
5 files changed, 48 insertions, 16 deletions
diff --git a/apps/portal/src/app/pages/_layout.svelte b/apps/portal/src/app/pages/_layout.svelte index 7cb7b2a..8c75cb9 100644 --- a/apps/portal/src/app/pages/_layout.svelte +++ b/apps/portal/src/app/pages/_layout.svelte @@ -1,6 +1,5 @@ <script> - import ThemeSwitcher from "$shared/components/theme-switcher.svelte"; - import {frontpage_base} from "$shared/lib/configuration"; + import BlowoutToolbelt from "$shared/components/blowout-toolbelt.svelte"; </script> <style> @@ -27,18 +26,15 @@ height: auto; } </style> - +<BlowoutToolbelt/> + <main class="container-fluid padding-x-xs padding-x-xxl@xs padding-y-md padding-y-lg@md max-width-sm"> - <a href="{frontpage_base()}" class="block margin-bottom-xs">Go to {frontpage_base()}</a> <div class="z-index-2 position-relative"> <slot/> </div> - - <div class="position-fixed right-0 top-0 margin-md z-index-2"> - <ThemeSwitcher/> - </div> <figure id="decoration" + class="z-index-1" aria-hidden="true"> <svg class="color-contrast-higher opacity-10%" viewBox="0 0 1920 450" diff --git a/apps/portal/src/app/pages/_layout@loggedin.svelte b/apps/portal/src/app/pages/_layout@loggedin.svelte index eb092a1..ea56f73 100644 --- a/apps/portal/src/app/pages/_layout@loggedin.svelte +++ b/apps/portal/src/app/pages/_layout@loggedin.svelte @@ -1,5 +1,5 @@ <script> - import ThemeSwitcher from "$shared/components/theme-switcher.svelte"; + import BlowoutToolbelt from "$shared/components/blowout-toolbelt.svelte"; import UserMenu from "$app/components/user-menu.svelte"; import {get_session_data} from "$shared/lib/session"; @@ -30,18 +30,19 @@ height: auto; } </style> - + +<BlowoutToolbelt/> <main class="container max-width-xl padding-x-xs padding-x-xxl@xs padding-y-md padding-y-lg@md"> <div class="z-index-2 position-relative"> <slot/> </div> - + <div class="flex flex-row gap-xs position-fixed right-0 top-0 margin-md z-index-2"> - <UserMenu name="{session.profile?.username}"/> - <ThemeSwitcher/> + <UserMenu name="{session?.profile?.username}"/> </div> <figure id="decoration" + class="z-index-1" aria-hidden="true"> <svg class="color-contrast-higher opacity-10%" viewBox="0 0 1920 450" diff --git a/apps/portal/src/app/pages/home.svelte b/apps/portal/src/app/pages/home.svelte index b9b9829..b1859d2 100644 --- a/apps/portal/src/app/pages/home.svelte +++ b/apps/portal/src/app/pages/home.svelte @@ -4,7 +4,7 @@ import {push} from "svelte-spa-router"; import Layout from "./_layout@loggedin.svelte"; import LinkCard from "$shared/components/link-card.svelte"; - import {UserIcon, UsersIcon, WatchIcon} from "svelte-feather-icons"; + import {UserIcon, UsersIcon, WatchIcon, SendIcon, ListIcon} from "svelte-feather-icons"; let showUsers = true; const session = get_session_data(); @@ -21,7 +21,7 @@ <div class="grid-auto-md gap-sm"> <LinkCard name="Projects" description="The home for your projects" - text="Open" + text="Open in a new tab" target="_blank" title="Open Projects in a new tab" href="{projects_base()}"> @@ -33,13 +33,43 @@ </div> </figure> </LinkCard> + <LinkCard name="Tickets" + description="The home for your tickets" + class="c-disabled user-select-none" + text="Coming soon" + target="_blank" + title="Open Tickets in a new tab" + href="{projects_base()}"> + <figure slot="icon"> + <div class="bg-primary bg-opacity-10% padding-xs border-left border-primary border-2"> + <SendIcon size="42" + class="color-primary" + strokeWidth="1.2"/> + </div> + </figure> + </LinkCard> + <LinkCard name="Todo" + description="The home for your todos" + class="c-disabled user-select-none" + text="Coming soon" + target="_blank" + title="Open Todo in a new tab" + href="{projects_base()}"> + <figure slot="icon"> + <div class="bg-primary bg-opacity-10% padding-xs border-left border-primary border-2"> + <ListIcon size="42" + class="color-primary" + strokeWidth="1.2"/> + </div> + </figure> + </LinkCard> </div> </div> <div class="row"> <h2 class="margin-bottom-xs">Manage</h2> <div class="grid-auto-md gap-sm"> <LinkCard name="Profile" - description="Manage your profile information" + description="Manage your profile" text="Open" title="Go to your profile management page" on:click={() => push("/profile")}> diff --git a/apps/portal/src/app/pages/login.svelte b/apps/portal/src/app/pages/login.svelte index b842463..900c5ac 100644 --- a/apps/portal/src/app/pages/login.svelte +++ b/apps/portal/src/app/pages/login.svelte @@ -14,6 +14,7 @@ values: { username: "", password: "", + persist: true }, alert: { title: "", @@ -92,6 +93,7 @@ </script> <Layout> + <a href="{frontpage_base()}" class="block margin-bottom-xs">Go to {frontpage_base()}</a> <Tile> <form on:submit|preventDefault={loginForm.submit_form} class="max-width-xxs"> diff --git a/apps/portal/src/app/pages/sign-up.svelte b/apps/portal/src/app/pages/sign-up.svelte index 509d33a..3bcab6d 100644 --- a/apps/portal/src/app/pages/sign-up.svelte +++ b/apps/portal/src/app/pages/sign-up.svelte @@ -1,5 +1,6 @@ <script> import {create_account} from "$shared/lib/api/user"; + import {frontpage_base} from "$shared/lib/configuration"; import {is_email} from "$shared/lib/helpers"; import Alert from "$shared/components/alert.svelte"; import Button from "$shared/components/button.svelte"; @@ -79,6 +80,8 @@ </script> <Layout> + <a href="{frontpage_base()}" + class="block margin-bottom-xs">Go to {frontpage_base()}</a> <Tile> <form on:submit|preventDefault={signupForm.submit_form} class="max-width-xxs"> |
