wip: local portal changes (backup before disk cleanup)

This commit is contained in:
Ondřej Glaser
2026-07-07 13:16:26 +02:00
parent 48cef99257
commit 79b17be817
774 changed files with 8592 additions and 245 deletions

View File

@@ -0,0 +1,15 @@
// Auth check endpoint called by Caddy's forward_auth in front of /apps/* routes.
// Returns 204 when the caller has a valid portal session, 302 to /login otherwise.
// Caddy passes the original URI in X-Forwarded-Uri so we can round-trip it as
// callbackUrl, so the user lands back on the app after logging in.
import { auth } from "@/auth";
export const GET = auth((req) => {
if (req.auth) {
return new Response(null, { status: 204 });
}
const callback = req.headers.get("x-forwarded-uri") || "/";
const loginUrl = new URL("/login", req.url);
loginUrl.searchParams.set("callbackUrl", callback);
return Response.redirect(loginUrl, 302);
});

View File

@@ -47,6 +47,7 @@
--color-accent-amber: #f79009;
--color-accent-rose: #f04438;
--color-accent-gray: #475467;
--color-accent-teal: #15b79e;
--color-destructive: #d92d20;
--color-destructive-bg: #fef3f2;
@@ -75,6 +76,7 @@
--color-accent-amber: #f79009;
--color-accent-rose: #f04438;
--color-accent-gray: #475467;
--color-accent-teal: #15b79e;
}
.dark {

View File

@@ -125,7 +125,7 @@ export function Tile({ app }: { app: AppTile }) {
)}
{!isDisabled && app.featured && (
<div className="px-[14px] pb-[14px]">
<div className="mt-auto px-[14px] pb-[14px]">
<span
className="system-2xs-medium-uppercase inline-flex items-center rounded-full px-2 py-1 text-[var(--color-primary-foreground)]"
style={{ background: accentVar(app.accent) }}

View File

@@ -7,9 +7,18 @@
"icon": "MessageSquare",
"accent": "indigo",
"href": "https://chat.klas.chat",
"featured": true,
"newTab": true
},
{
"id": "knowledge-assistant",
"title": "Firemní asistent",
"description": "Zeptejte se na firemní směrnice, návody a dokumenty z intranetu. Asistent odpoví s odkazem na zdroj.",
"category": "Chat",
"icon": "BookOpenText",
"accent": "teal",
"href": "/apps/asistent/",
"featured": true
},
{
"id": "legal-notice",
"title": "Kontrola smluvních podmínek",
@@ -17,7 +26,7 @@
"category": "Právo",
"icon": "Scale",
"accent": "rose",
"href": "https://smlouvy.klas.chat"
"href": "/apps/smlouvy/"
},
{
"id": "document-summarizer",
@@ -35,7 +44,7 @@
"category": "Komunikace",
"icon": "Mail",
"accent": "emerald",
"href": "https://email.klas.chat"
"href": "/apps/email/"
},
{
"id": "invoice-extractor",
@@ -44,7 +53,16 @@
"category": "Provoz",
"icon": "Receipt",
"accent": "amber",
"href": "https://faktury.klas.chat"
"href": "/apps/faktury/"
},
{
"id": "offer-to-order",
"title": "Nabídka → Excel",
"description": "Nahrajte dodavatelskou nabídku (PDF nebo Excel) a získáte jednotný Excel s údaji dodavatele a položkami.",
"category": "Provoz",
"icon": "FileSpreadsheet",
"accent": "emerald",
"href": "/apps/nabidky/"
},
{
"id": "translator",
@@ -53,7 +71,7 @@
"category": "Komunikace",
"icon": "Languages",
"accent": "cyan",
"href": "https://prekladac.klas.chat"
"href": "/apps/prekladac/"
},
{
"id": "dwg-rooms",
@@ -62,7 +80,7 @@
"category": "Technické",
"icon": "Building2",
"accent": "violet",
"href": "https://dwg.klas.chat"
"href": "/apps/dwg/"
},
{
"id": "dwg-counting",
@@ -71,7 +89,7 @@
"category": "Technické",
"icon": "ScanSearch",
"accent": "cyan",
"href": "https://dwg-counting.klas.chat"
"href": "/apps/dwg-counting/"
},
{
"id": "vv-check",
@@ -80,7 +98,7 @@
"category": "Technické",
"icon": "ScaleHorizontal",
"accent": "amber",
"href": "https://kontrola-vv.klas.chat"
"href": "/apps/kontrola-vv/"
},
{
"id": "vv-compare",
@@ -89,7 +107,7 @@
"category": "Technické",
"icon": "FileDiff",
"accent": "violet",
"href": "https://porovnani-vv.klas.chat"
"href": "/apps/porovnani-vv/"
},
{
"id": "feature-request",
@@ -98,7 +116,7 @@
"category": "Návrhy",
"icon": "Lightbulb",
"accent": "amber",
"href": "https://navrhy.klas.chat",
"href": "/apps/navrhy/",
"kind": "cta"
}
]