Update Website
SteamWar CI / Build (push) Successful in 1m55s
SteamWar CI / Deploy (push) Successful in 10s

This commit is contained in:
2026-05-18 23:24:15 +02:00
parent a9260b1ca0
commit 038c2768e6
145 changed files with 3280 additions and 3967 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ jobs:
- name: Write production environment
run: echo "PUBLIC_API_SERVER=${PUBLIC_API_SERVER}" > .env
- name: Generate i18n files
run: pnpm run i18n:sync
- name: Compile i18n files
run: pnpm run i18n:compile
- name: Build website
run: pnpm run build
+1 -2
View File
@@ -19,10 +19,9 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store
/.astro-i18n/
/bun.lockb
/src/pages/de/
/src/pages/en/
/steamwar-website.zip
/src/env.d.ts
/src/pages/en/
/.idea
+4 -4
View File
@@ -7,7 +7,7 @@
- [Tailwind CSS](https://tailwindcss.com/)
- [Day.js](https://day.js.org/)
- [Chart.js](https://www.chartjs.org/)
- [astro-i18n](https://github.com/Alexandre-Fernandez/astro-i18n)
- [Paraglide JS](https://inlang.com/m/gerre34r/library-inlang-paraglideJs)
- [Flowbite Svelte](https://flowbite-svelte.com/)
## Building
@@ -28,8 +28,8 @@ pnpm run dev
pnpm run build
```
### i18n-sync
### i18n Compile
```bash
pnpm run i18n:sync
```
pnpm run i18n:compile
```
-40
View File
@@ -1,40 +0,0 @@
import type { AstroIntegration } from "astro";
import { mkdir, access, constants, copyFile, rename } from "node:fs/promises";
const locales = [
"en",
"de",
];
export default function configureI18n(): AstroIntegration {
return {
name: "astro-i18n-renamer",
hooks: {
"astro:build:done": async ({pages, dir, logger, routes}) => {
for (const page of pages) {
const [locale, ...rest] = page.pathname.split("/");
if (locales.includes(locale)) {
const path = rest.join("/");
const oldPath = `${dir.pathname}${page.pathname}`;
const newPath = `${dir.pathname}${path}`;
try {
await access(cutPrefix(newPath), constants.R_OK | constants.W_OK);
} catch (e) {
await mkdir(cutPrefix(newPath), {recursive: true});
}
await copyFile(`${cutPrefix(oldPath)}index.html`, `${cutPrefix(newPath)}index.html.${locale}`);
logger.info(`Copied ${oldPath}index.html to ${newPath}index.html.${locale}`);
} else {
const oldPath = cutPrefix(`${dir.pathname}${page.pathname}`);
await rename(`${oldPath}index.html`, `${oldPath}index.html.de`);
}
}
},
},
};
}
function cutPrefix(path: string): string {
return process.platform === "win32" ? path.substring(1) : path;
}
-27
View File
@@ -1,27 +0,0 @@
import { defineAstroI18nConfig } from "astro-i18n";
export default defineAstroI18nConfig({
primaryLocale: "de",
secondaryLocales: ["en"],
fallbackLocale: "de",
trailingSlash: "never",
run: "client+server",
showPrimaryLocale: false,
translationLoadingRules: [],
translationDirectory: {},
translations: {},
routes: {
en: {
"jetzt-spielen": "join",
impressum: "imprint",
verhaltensrichtlinien: "code-of-conduct",
regeln: "rules",
rangliste: "ranked",
"haeufige-fragen": "faq",
statistiken: "stats",
ankuendigungen: "announcements",
datenschutzerklaerung: "privacy-policy",
"passwort-setzen": "set-password",
},
},
});
+74 -8
View File
@@ -1,8 +1,8 @@
import { defineConfig, sharpImageService } from "astro/config";
import { defineConfig, fontProviders, sharpImageService } from "astro/config";
import svelte from "@astrojs/svelte";
import tailwind from "@astrojs/tailwind";
import configureI18n from "./astro-i18n.adapter";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";
import { paraglideVitePlugin } from "@inlang/paraglide-js";
import robotsTxt from "astro-robots-txt";
import path from "node:path";
@@ -12,7 +12,68 @@ import starlight from "@astrojs/starlight";
// https://astro.build/config
export default defineConfig({
fonts: [{
provider: fontProviders.google(),
name: "Roboto",
cssVariable: "--font-roboto",
}, {
provider: fontProviders.local(),
name: "Barlow Condensed",
cssVariable: "--font-barlow-condensed",
options: {
variants: [
{
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-regular.woff2"],
weight: "400",
style: "normal",
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-medium.woff2"],
weight: "500",
style: "normal"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-bold.woff2"],
weight: "700",
style: "normal"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-italic.woff2"],
weight: "400",
style: "italic"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-medium-italic.woff2"],
weight: "500",
style: "italic"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-bold-italic.woff2"],
weight: "700",
style: "italic"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-black.woff2"],
weight: "900",
style: "normal"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-black-italic.woff2"],
weight: "900",
style: "italic"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-light.woff2"],
weight: "300",
style: "normal"
}, {
src: ["./src/assets/fonts/barlow-condensed/barlow-condensed-light-italic.woff2"],
weight: "300",
style: "italic"
}
]
}
}],
output: "static",
i18n: {
defaultLocale: "de",
locales: ["de", "en"],
routing: {
prefixDefaultLocale: false,
},
},
image: {
service: sharpImageService(),
},
@@ -43,13 +104,9 @@ export default defineConfig({
baseUrl: "https://git.steamwar.de/SteamWar/Website/src/branch/master/",
},
}),
tailwind({
configFile: "./tailwind.config.js",
applyBaseStyles: false,
}),
sitemap({
i18n: {
defaultLocale: "en",
defaultLocale: "de",
locales: {
en: "en-US",
de: "de-DE",
@@ -82,6 +139,15 @@ export default defineConfig({
mdx(),
],
vite: {
plugins: [
paraglideVitePlugin({
project: "./project.inlang",
outdir: "./src/paraglide",
strategy: ["url", "globalVariable", "baseLocale"],
emitTsDeclarations: true,
}),
tailwindcss(),
],
resolve: {
alias: {
"@components": path.resolve("./src/components"),
+58 -65
View File
@@ -3,87 +3,80 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"dev": "pnpm run i18n:generate:pages && astro dev",
"start": "pnpm run dev",
"build": "pnpm run i18n:generate:pages && astro build",
"preview": "astro preview",
"astro": "astro",
"i18n:extract": "astro-i18n extract",
"i18n:generate:pages": "astro-i18n generate:pages --purge",
"i18n:generate:types": "astro-i18n generate:types",
"i18n:sync": "pnpm run i18n:generate:pages && pnpm run i18n:generate:types",
"i18n:generate:pages": "node scripts/generate-en-pages.mjs",
"i18n:compile": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide --strategy url globalVariable baseLocale --emit-ts-declarations && pnpm run i18n:generate:pages",
"clean:dist": "rm -rf dist",
"clean:node_modules": "rm -rf node_modules",
"ci": "pnpm install && pnpm run i18n:sync && pnpm run build"
"ci": "pnpm install && pnpm run build"
},
"devDependencies": {
"@astrojs/svelte": "^7.1.0",
"@astrojs/tailwind": "^5.1.5",
"@astropub/icons": "^0.2.0",
"@internationalized/date": "^3.8.1",
"@lucide/svelte": "^0.488.0",
"@types/color": "^4.2.0",
"@astrojs/svelte": "^8.1.1",
"@internationalized/date": "^3.12.1",
"@lucide/svelte": "^1.16.0",
"@tailwindcss/vite": "^4.3.0",
"@types/color": "^4.2.1",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.15.23",
"@types/three": "^0.170.0",
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.33.0",
"autoprefixer": "^10.4.21",
"bits-ui": "1.3.4",
"@types/node": "^25.9.0",
"@types/three": "^0.184.1",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"autoprefixer": "^10.5.0",
"bits-ui": "2.18.1",
"clsx": "^2.1.1",
"cmdk-sv": "^0.0.18",
"cssnano": "^7.0.7",
"cssnano": "^8.0.1",
"embla-carousel-svelte": "^8.6.0",
"esbuild": "^0.24.2",
"eslint": "^9.27.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-svelte": "^2.46.1",
"formsnap": "1.0.1",
"lucide-svelte": "^0.476.0",
"mode-watcher": "^0.5.1",
"paneforge": "^0.0.6",
"postcss-nesting": "^13.0.1",
"sass": "^1.89.0",
"svelte": "^5.33.4",
"svelte-sonner": "^0.3.28",
"tailwind-merge": "^2.6.0",
"tailwind-variants": "^0.3.1",
"tailwindcss": "^3.4.17",
"three": "^0.170.0",
"typescript": "^5.8.3",
"vaul-svelte": "^0.3.2",
"zod": "^3.25.31"
"esbuild": "^0.28.0",
"eslint": "^10.4.0",
"eslint-plugin-astro": "^1.7.0",
"eslint-plugin-svelte": "^3.17.1",
"formsnap": "2.0.1",
"mode-watcher": "^1.1.0",
"paneforge": "^1.0.2",
"postcss-nesting": "^14.0.0",
"sass": "^1.99.0",
"svelte": "^5.55.8",
"svelte-sonner": "^1.1.1",
"tailwind-merge": "^3.6.0",
"tailwind-variants": "^3.2.2",
"tailwindcss": "^4.3.0",
"three": "^0.184.0",
"typescript": "^6.0.3",
"zod": "^4.4.3"
},
"dependencies": {
"@astrojs/mdx": "^4.3.0",
"@astrojs/sitemap": "^3.4.0",
"@astrojs/starlight": "^0.34.4",
"@astrojs/starlight-tailwind": "^4.0.1",
"@codemirror/commands": "^6.8.1",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/view": "^6.36.8",
"@ddietr/codemirror-themes": "^1.5.1",
"@astrojs/mdx": "^5.0.6",
"@astrojs/sitemap": "^3.7.2",
"@astrojs/starlight": "^0.39.2",
"@astrojs/starlight-tailwind": "^5.0.0",
"@codemirror/commands": "^6.10.3",
"@codemirror/lang-json": "^6.0.2",
"@codemirror/view": "^6.43.0",
"@ddietr/codemirror-themes": "^1.5.2",
"@inlang/paraglide-js": "^2.18.0",
"@tanstack/table-core": "^8.21.3",
"astro": "5.7.14",
"astro-i18n": "^2.2.4",
"astro": "6.3.5",
"astro-robots-txt": "^1.0.0",
"astro-seo": "^0.8.4",
"chart.js": "^4.4.9",
"astro-seo": "^1.1.0",
"chart.js": "^4.5.1",
"chartjs-adapter-dayjs-4": "^1.0.4",
"chartjs-adapter-moment": "^1.0.1",
"codemirror": "^6.0.1",
"color": "^4.2.3",
"dayjs": "^1.11.13",
"easymde": "^2.20.0",
"flowbite": "^2.5.2",
"flowbite-svelte": "^0.47.4",
"flowbite-svelte-icons": "^2.2.0",
"js-yaml": "^4.1.0",
"qs": "^6.14.0",
"sharp": "^0.33.5",
"codemirror": "^6.0.2",
"color": "^5.0.3",
"dayjs": "^1.11.20",
"easymde": "^2.21.0",
"flowbite": "^4.0.2",
"flowbite-svelte": "^1.33.1",
"flowbite-svelte-icons": "^3.1.0",
"js-yaml": "^4.1.1",
"qs": "^6.15.2",
"sharp": "^0.34.5",
"svelte-awesome": "^3.3.5",
"svelte-spa-router": "^4.0.1"
"svelte-spa-router": "^5.1.0"
},
"pnpm": {
"onlyBuiltDependencies": [
+2557 -3289
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,6 +4,6 @@ module.exports = {
plugins: [
require('autoprefixer'),
require('cssnano'),
require("tailwindcss/nesting"),
require("postcss-nesting"),
]
};
+11
View File
@@ -0,0 +1,11 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"baseLocale": "de",
"locales": ["de", "en"],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./src/i18n/common/{locale}.json"
}
}
@@ -1,145 +0,0 @@
/* barlow-condensed-thin */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 100;
src: local("Barlow Condensed Thin"), local("BarlowCondensed-Thin"), url(barlow-condensed-thin.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-thin-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 100;
src: local("Barlow Condensed Thin Italic"), local("BarlowCondensed-ThinItalic"), url(barlow-condensed-thin-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-extralight */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 400;
src: local("Barlow Condensed ExtraLight"), local("BarlowCondensed-ExtraLight"), url(barlow-condensed-extralight.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-extralight-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 400;
src: local("Barlow Condensed ExtraLight Italic"), local("BarlowCondensed-ExtraLightItalic"), url(barlow-condensed-extralight-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-light */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 300;
src: local("Barlow Condensed Light"), local("BarlowCondensed-Light"), url(barlow-condensed-light.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-light-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 300;
src: local("Barlow Condensed Light Italic"), local("BarlowCondensed-LightItalic"), url(barlow-condensed-light-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-regular */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 400;
src: local("Barlow Condensed Regular"), local("BarlowCondensed-Regular"), url(barlow-condensed-regular.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 400;
src: local("Barlow Condensed Italic"), local("BarlowCondensed-Italic"), url(barlow-condensed-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-medium */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 500;
src: local("Barlow Condensed Medium"), local("BarlowCondensed-Medium"), url(barlow-condensed-medium.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-medium-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 500;
src: local("Barlow Condensed Medium Italic"), local("BarlowCondensed-MediumItalic"), url(barlow-condensed-medium-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-semibold */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 400;
src: local("Barlow Condensed SemiBold"), local("BarlowCondensed-SemiBold"), url(barlow-condensed-semibold.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-semibold-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 400;
src: local("Barlow Condensed SemiBold Italic"), local("BarlowCondensed-SemiBoldItalic"), url(barlow-condensed-semibold-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-bold */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 700;
src: local("Barlow Condensed Bold"), local("BarlowCondensed-Bold"), url(barlow-condensed-bold.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-bold-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 700;
src: local("Barlow Condensed Bold Italic"), local("BarlowCondensed-BoldItalic"), url(barlow-condensed-bold-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-extrabold */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 400;
src: local("Barlow Condensed ExtraBold"), local("BarlowCondensed-ExtraBold"), url(barlow-condensed-extrabold.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-extrabold-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 400;
src: local("Barlow Condensed ExtraBold Italic"), local("BarlowCondensed-ExtraBoldItalic"), url(barlow-condensed-extrabold-italic.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-black */
@font-face {
font-family: Barlow Condensed;
font-style: normal;
font-weight: 900;
src: local("Barlow Condensed Black"), local("BarlowCondensed-Black"), url(barlow-condensed-black.woff2) format("woff2");
font-display: swap;
}
/* barlow-condensed-black-italic */
@font-face {
font-family: Barlow Condensed;
font-style: italic;
font-weight: 900;
src: local("Barlow Condensed Black Italic"), local("BarlowCondensed-BlackItalic"), url(barlow-condensed-black-italic.woff2) format("woff2");
font-display: swap;
}
-108
View File
@@ -1,108 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*
This file was generated by font-facer from the font files in the dir:
.
*/
@font-face {
font-family: "Roboto";
font-weight: 100;
font-style: normal;
src: url('./Roboto-Thin.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 100;
font-style: italic;
src: url('./Roboto-ThinItalic.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 300;
font-style: normal;
src: url('./Roboto-Light.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 300;
font-style: italic;
src: url('./Roboto-LightItalic.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 400;
font-style: normal;
src: url('./Roboto-Regular.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 400;
font-style: italic;
src: url('./Roboto-Italic.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 500;
font-style: normal;
src: url('./Roboto-Medium.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 500;
font-style: italic;
src: url('./Roboto-MediumItalic.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 700;
font-style: normal;
src: url('./Roboto-Bold.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 700;
font-style: italic;
src: url('./Roboto-BoldItalic.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 900;
font-style: normal;
src: url('./Roboto-Black.ttf');
}
@font-face {
font-family: "Roboto";
font-weight: 900;
font-style: italic;
src: url('./Roboto-BlackItalic.ttf');
}
+111
View File
@@ -0,0 +1,111 @@
import { mkdir, rm, writeFile, readFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const pagesDir = path.join(root, "src", "pages");
const locale = "en";
const outputDir = path.join(pagesDir, locale);
const routeTranslations = new Map([
["jetzt-spielen", "join"],
["impressum", "imprint"],
["verhaltensrichtlinien", "code-of-conduct"],
["regeln", "rules"],
["rangliste", "ranked"],
["haeufige-fragen", "faq"],
["statistiken", "stats"],
["ankuendigungen", "announcements"],
["datenschutzerklaerung", "privacy-policy"],
["passwort-setzen", "set-password"],
]);
const pages = await collectAstroPages(pagesDir);
await rm(outputDir, { recursive: true, force: true });
for (const page of pages) {
const relativePage = path.relative(pagesDir, page);
const segments = relativePage.split(path.sep);
if (segments[0] === locale || segments[0] === "de") {
continue;
}
const outputSegments = translateSegments(segments);
const outFile = path.join(outputDir, ...outputSegments);
const source = await readFile(page, "utf8");
const hasGetStaticPaths = /\bexport\s+(?:const|async\s+function|function)\s+getStaticPaths\b/.test(source);
await mkdir(path.dirname(outFile), { recursive: true });
await writeFile(outFile, createProxyPage(page, outFile, hasGetStaticPaths));
}
function translateSegments(segments) {
const translated = [...segments];
if (translated[0] !== "index.astro" && !translated[0].startsWith("[")) {
translated[0] = routeTranslations.get(translated[0]) ?? translated[0];
}
const file = translated.pop();
const name = file.slice(0, -".astro".length);
if (name !== "index") {
translated.push(name);
}
translated.push("index.astro");
return translated;
}
function createProxyPage(sourceFile, outFile, hasGetStaticPaths) {
const outDir = path.dirname(outFile);
const importPath = normalizeImportPath(path.relative(outDir, sourceFile));
const lines = [
"---",
`import Page from "${importPath}";`,
];
if (hasGetStaticPaths) {
lines.push(
`import { getStaticPaths as proxyGetStaticPaths } from "${importPath}";`,
`export const getStaticPaths = (props) => proxyGetStaticPaths({ ...props, astroI18n: { locale: "${locale}" } });`,
);
}
lines.push(
"const { props } = Astro;",
"---",
"",
"<Page {...props} />",
"",
);
return lines.join("\n");
}
function normalizeImportPath(importPath) {
const normalized = importPath.split(path.sep).join("/");
return normalized.startsWith(".") ? normalized : `./${normalized}`;
}
async function collectAstroPages(dir) {
const entries = await import("node:fs/promises").then(({ readdir }) => readdir(dir, { withFileTypes: true }));
const files = [];
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
files.push(...await collectAstroPages(fullPath));
continue;
}
if (entry.isFile() && entry.name.endsWith(".astro")) {
files.push(fullPath);
}
}
return files;
}
+9 -2
View File
@@ -66,14 +66,21 @@
transition: scale 300ms cubic-bezier(0.2, 3, 0.67, 0.6);
:global(h1) {
@apply text-xl font-bold mt-4;
margin-top: 1rem;
font-size: 1.25rem;
line-height: 1.75rem;
font-weight: 700;
font-family: "Barlow Condensed", sans-serif;
letter-spacing: 0.06em;
}
:global(svg) {
color: #f59e0b;
@apply transition-transform duration-300 ease-in-out hover:scale-110;
transition: transform 300ms ease-in-out;
}
:global(svg:hover) {
transform: scale(1.1);
}
}
+1 -1
View File
@@ -18,7 +18,7 @@
-->
<script lang="ts">
import {t} from "astro-i18n"
import {t} from "$lib/i18n"
import UserInfo from "./dashboard/UserInfo.svelte";
import {dataRepo} from "@repo/data.ts";
import UploadModal from "@components/dashboard/UploadModal.svelte";
+1 -1
View File
@@ -18,7 +18,7 @@
-->
<script lang="ts">
import {t} from "astro-i18n";
import {t} from "$lib/i18n";
import {statsRepo} from "@repo/stats.ts";
import "@styles/table.css"
+1 -1
View File
@@ -19,7 +19,7 @@
<script lang="ts">
import FightStatsChart from "./FightStatsChart.svelte";
import { t } from "astro-i18n";
import { t } from "$lib/i18n";
import { statsRepo } from "@repo/stats.ts";
let request = getStats();
+1 -1
View File
@@ -20,7 +20,7 @@
<script lang="ts">
import { window } from "./utils.ts";
import { astroI18n, t } from "astro-i18n";
import { astroI18n, t } from "$lib/i18n";
import type { EventFight, ExtendedEvent } from "@type/event";
import "@styles/table.css";
+1 -1
View File
@@ -20,7 +20,7 @@
<script lang="ts">
import { window } from "./utils.ts";
import { t } from "astro-i18n";
import { t } from "$lib/i18n";
import type { ExtendedEvent } from "@type/event.ts";
import "@styles/table.css";
+1 -1
View File
@@ -1,5 +1,5 @@
---
import { t } from "astro-i18n";
import { t } from "$lib/i18n";
---
<div class="border-l-2 border-amber-500 bg-amber-500/5 p-4" role="alert">
+1 -1
View File
@@ -20,7 +20,7 @@
<script lang="ts">
import { preventDefault } from "svelte/legacy";
import { l } from "@utils/util.ts";
import { t } from "astro-i18n";
import { t } from "$lib/i18n";
import { get } from "svelte/store";
import { navigate } from "astro:transitions/client";
import { onMount } from "svelte";
+2 -2
View File
@@ -20,10 +20,10 @@
<script lang="ts">
import "../styles/button.css";
import { CaretDownOutline, GlobeOutline } from "flowbite-svelte-icons";
import { t, l } from "astro-i18n";
import { t, l } from "$lib/i18n";
import { onMount } from "svelte";
import { loggedIn } from "@repo/authv2.ts";
import { astroI18n } from "astro-i18n";
import { astroI18n } from "$lib/i18n";
interface Props {
logo?: import("svelte").Snippet;
}
+2 -2
View File
@@ -1,7 +1,7 @@
---
import type { CollectionEntry } from "astro:content";
import { l } from "../util/util";
import { astroI18n } from "astro-i18n";
import { astroI18n, stripLocaleFromPath } from "$lib/i18n";
import { Image } from "astro:assets";
import TagComponent from "./TagComponent.astro";
import P from "./P.astro";
@@ -19,7 +19,7 @@ const {
slim: boolean;
} = Astro.props as Props;
const postUrl = l(`/announcements/${post.slug.split("/").slice(1).join("/")}`);
const postUrl = l(`/announcements/${stripLocaleFromPath(post.id)}`);
---
<Card extraClasses={`w-full items-start mx-0 ${slim ? "m-0 p-2 backdrop-blur-xl bg-transparent border-0" : "border-t-2 border-t-amber-500/30"}`} hoverEffect={false}>
+1 -1
View File
@@ -18,7 +18,7 @@
-->
<script lang="ts">
import { t } from "astro-i18n"
import { t } from "$lib/i18n"
import {server} from "./stores/stores.ts";
function generateVersionString(version: string): string {
@@ -116,6 +116,6 @@
<style>
li {
@apply py-2;
padding-block: 0.5rem;
}
</style>
@@ -18,7 +18,7 @@
-->
<script lang="ts">
import {astroI18n, t} from "astro-i18n";
import {astroI18n, t} from "$lib/i18n";
import {CheckSolid, XCircleOutline} from "flowbite-svelte-icons";
import type {SchematicInfo} from "@type/schem.ts";
import {createEventDispatcher} from "svelte";
+23 -6
View File
@@ -20,7 +20,7 @@
<script lang="ts">
import { preventDefault } from 'svelte/legacy';
import {t} from "astro-i18n";
import {t} from "$lib/i18n";
import {
ChevronDoubleRightOutline,
FolderOutline,
@@ -143,15 +143,32 @@
<style lang="postcss">
table {
@apply w-full;
width: 100%;
}
tr {
@apply transition-colors cursor-pointer border-b
dark:hover:bg-gray-800 hover:bg-gray-300;
cursor: pointer;
border-bottom: 1px solid #e5e7eb;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
transition-duration: 150ms;
}
tr:hover {
background-color: #d1d5db;
}
:global(.dark) tr:hover {
background-color: #1f2937;
}
th {
@apply text-left py-4 md:px-2;
padding-block: 1rem;
text-align: left;
}
</style>
@media (min-width: 768px) {
th {
padding-inline: 0.5rem;
}
}
</style>
@@ -21,7 +21,7 @@
import { createBubbler, preventDefault } from 'svelte/legacy';
const bubble = createBubbler();
import {astroI18n, t} from "astro-i18n";
import {astroI18n, t} from "$lib/i18n";
import {CheckSolid, FileOutline, FolderOutline, XCircleOutline} from "flowbite-svelte-icons";
import type {Schematic} from "@type/schem.ts";
import type {Player} from "@type/data.ts";
@@ -82,11 +82,32 @@
<style lang="scss">
tr {
@apply transition-colors cursor-pointer border-b border-gray-300
dark:hover:bg-gray-800 hover:bg-gray-300 dark:border-neutral-700;
cursor: pointer;
border-bottom: 1px solid #d1d5db;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
transition-duration: 150ms;
}
tr:hover {
background-color: #d1d5db;
}
:global(.dark) tr {
border-bottom-color: #404040;
}
:global(.dark) tr:hover {
background-color: #1f2937;
}
th {
@apply text-left py-4 md:px-2;
padding-block: 1rem;
text-align: left;
}
</style>
@media (min-width: 768px) {
th {
padding-inline: 0.5rem;
}
}
</style>
+1 -1
View File
@@ -19,7 +19,7 @@
<script lang="ts">
import type {Player} from "@type/data.ts";
import {astroI18n, t} from "astro-i18n"
import {astroI18n, t} from "$lib/i18n"
import {statsRepo} from "@repo/stats.ts";
interface Props {
+1 -1
View File
@@ -21,7 +21,7 @@
import {createEventDispatcher} from "svelte";
import {schemRepo} from "@repo/schem.ts";
import SWModal from "@components/styled/SWModal.svelte";
import {t} from "astro-i18n";
import {t} from "$lib/i18n";
const dispatch = createEventDispatcher();
+1 -1
View File
@@ -18,7 +18,7 @@
-->
<script lang="ts">
import { t } from "astro-i18n";
import { t } from "$lib/i18n";
import type { Player } from "@type/data.ts";
import { l } from "@utils/util.ts";
import Statistics from "./Statistics.svelte";
+1 -1
View File
@@ -3,7 +3,7 @@
import "dayjs/locale/de";
import type { ExtendedEvent } from "../types/event";
import { Button } from "../ui/button";
import { ChevronLeft, ChevronRight } from "lucide-svelte";
import { ChevronLeft, ChevronRight } from "@lucide/svelte";
import * as Card from "../ui/card";
import EventCard from "./EventCard.svelte";
import SWButton from "@components/styled/SWButton.svelte";
+2 -2
View File
@@ -1,8 +1,8 @@
<script lang="ts">
import type { ExtendedEvent } from "../types/event";
import { Button } from "../ui/button";
import { Calendar } from "lucide-svelte";
import { List } from "lucide-svelte";
import { Calendar } from "@lucide/svelte";
import { List } from "@lucide/svelte";
import EventList from "./EventList.svelte";
import CalendarView from "./Calendar.svelte";
@@ -8,7 +8,7 @@
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { gamemodes, maps } from "@components/stores/stores";
import { CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Command } from "@components/ui/command";
import { ChevronsUpDown, Check } from "lucide-svelte";
import { ChevronsUpDown, Check } from "@lucide/svelte";
import { Button } from "@components/ui/button";
import { cn } from "@components/utils";
import { Select, SelectContent, SelectItem, SelectTrigger } from "@components/ui/select";
@@ -2,7 +2,7 @@
import type { GroupUpdateEdit, ResponseGroups, SWEvent } from "@type/event";
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Command } from "@components/ui/command";
import { ChevronsUpDownIcon, PlusIcon, CheckIcon, MinusIcon } from "lucide-svelte";
import { ChevronsUpDownIcon, PlusIcon, CheckIcon, MinusIcon } from "@lucide/svelte";
import { Button } from "@components/ui/button";
import { cn } from "@components/utils";
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@components/ui/dialog";
@@ -7,7 +7,7 @@
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@components/ui/tabs";
import { Tooltip, TooltipContent, TooltipTrigger } from "@components/ui/tooltip";
import { cn } from "@components/utils";
import { Check, ChevronsUpDown, GitPullRequestArrow, Plus } from "lucide-svelte";
import { Check, ChevronsUpDown, GitPullRequestArrow, Plus } from "@lucide/svelte";
import type { EventModel } from "../pages/event/eventmodel.svelte";
import { Select, SelectContent, SelectItem, SelectTrigger } from "@components/ui/select";
import { Label } from "@components/ui/label";
@@ -18,14 +18,14 @@
-->
<script lang="ts">
import { location } from "svelte-spa-router";
import { router } from "svelte-spa-router";
</script>
<nav class="flex items-center space-x-4 lg:space-x-6 mx-6">
<a href="#/" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={$location !== "/"}> Dashboard </a>
<a href="#/events" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={!$location.startsWith("/event")}> Events </a>
<a href="#/players" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={$location !== "/players"}> Players </a>
<a href="#/pages" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={$location !== "/pages"}> Pages </a>
<a href="#/schematics" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={$location !== "/schematics"}> Schematics </a>
<a href="#/logs" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={$location !== "/logs"}> Logs </a>
<a href="#/" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={router.location !== "/"}> Dashboard </a>
<a href="#/events" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={!router.location.startsWith("/event")}> Events </a>
<a href="#/players" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={router.location !== "/players"}> Players </a>
<a href="#/pages" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={router.location !== "/pages"}> Pages </a>
<a href="#/schematics" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={router.location !== "/schematics"}> Schematics </a>
<a href="#/logs" class="hover:text-primary text-sm font-medium transition-colors" class:text-muted-foreground={router.location !== "/logs"}> Logs </a>
</nav>
@@ -25,10 +25,10 @@
import DateTimePicker from "@components/ui/datetime-picker/DateTimePicker.svelte";
import { fromAbsolute } from "@internationalized/date";
import { Button, buttonVariants } from "@components/ui/button";
import { ChevronsUpDown } from "lucide-svelte";
import { ChevronsUpDown } from "@lucide/svelte";
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { schemTypes } from "@stores/stores.ts";
import Check from "lucide-svelte/icons/check";
import Check from "@lucide/svelte/icons/check";
import { cn } from "@components/utils.ts";
import { Switch } from "@components/ui/switch";
import { eventRepo } from "@repo/event.ts";
@@ -34,7 +34,7 @@
import GroupEditDialog from "./GroupEditDialog.svelte";
import GroupResultsDialog from "./GroupResultsDialog.svelte";
import type { ResponseGroups } from "@type/event";
import { EditIcon, GroupIcon, LinkIcon } from "lucide-svelte";
import { EditIcon, GroupIcon, LinkIcon } from "@lucide/svelte";
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@components/ui/dropdown-menu";
import GroupSelector from "@components/moderator/components/GroupSelector.svelte";
import { fightRepo } from "@components/repo/fight";
@@ -1,7 +1,7 @@
<script lang="ts">
import type { EventFight, EventFightEdit, ResponseGroups, ResponseRelation, SWEvent } from "@type/event";
import { Button } from "@components/ui/button";
import { EditIcon, CopyIcon } from "lucide-svelte";
import { EditIcon, CopyIcon } from "@lucide/svelte";
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@components/ui/dialog";
import FightEdit from "@components/moderator/components/FightEdit.svelte";
import type { Team } from "@components/types/team";
@@ -25,7 +25,7 @@
import { Input } from "@components/ui/input/index.js";
import { Label } from "@components/ui/label/index.js";
import DateTimePicker from "@components/ui/datetime-picker/DateTimePicker.svelte";
import { PlusIcon } from "lucide-svelte";
import { PlusIcon } from "@lucide/svelte";
import dayjs from "dayjs";
import { fromAbsolute, now, ZonedDateTime } from "@internationalized/date";
@@ -12,7 +12,7 @@
import { Slider } from "@components/ui/slider";
import { fromAbsolute } from "@internationalized/date";
import dayjs from "dayjs";
import { Plus, Shuffle } from "lucide-svelte";
import { Plus, Shuffle } from "@lucide/svelte";
import { replace } from "svelte-spa-router";
let { data }: { data: ExtendedEvent } = $props();
@@ -12,7 +12,7 @@
import { Slider } from "@components/ui/slider";
import { fromAbsolute } from "@internationalized/date";
import dayjs from "dayjs";
import { Plus, Shuffle } from "lucide-svelte";
import { Plus, Shuffle } from "@lucide/svelte";
import { replace } from "svelte-spa-router";
let { data }: { data: ExtendedEvent } = $props();
@@ -16,7 +16,7 @@
import { Slider } from "@components/ui/slider";
import { fromAbsolute, fromDate, parseDateTime, parseDuration } from "@internationalized/date";
import dayjs from "dayjs";
import { Plus } from "lucide-svelte";
import { Plus } from "@lucide/svelte";
import { replace } from "svelte-spa-router";
let {
data,
@@ -11,7 +11,7 @@
import { Input } from "@components/ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { Check } from "lucide-svelte";
import { Check } from "@lucide/svelte";
import { cn } from "@components/utils";
import DateTimePicker from "@components/ui/datetime-picker/DateTimePicker.svelte";
import PlayerSelector from "@components/ui/PlayerSelector.svelte";
@@ -1,6 +1,6 @@
<script lang="ts">
import { manager, OpenEditPage } from "./page.svelte";
import { File, FileCode2, FileText, Save, X } from "lucide-svelte";
import { File, FileCode2, FileText, Save, X } from "@lucide/svelte";
import { onMount } from "svelte";
import { EditorView } from "@codemirror/view";
import { basicSetup } from "codemirror";
@@ -3,7 +3,7 @@
import { Input } from "@components/ui/input";
import { Label } from "@components/ui/label";
import { Checkbox } from "@components/ui/checkbox";
import { Plus, X } from "lucide-svelte";
import { Plus, X } from "@lucide/svelte";
import yaml from "js-yaml";
import { manager } from "./page.svelte";
import type { FrontmatterFieldSchema } from "../../../../content/frontmatter-editor-schemas";
@@ -6,7 +6,7 @@
import EditorWithTabs from "./EditorWithTabs.svelte";
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { Button } from "@components/ui/button";
import { Check, ChevronsUpDown, RefreshCw, FileImage, Plus, GitBranch, Upload } from "lucide-svelte";
import { Check, ChevronsUpDown, RefreshCw, FileImage, Plus, GitBranch, Upload } from "@lucide/svelte";
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { cn } from "@components/utils";
import { pageRepo } from "@components/repo/page";
@@ -1,5 +1,5 @@
<script lang="ts">
import { ChevronDown, ChevronRight, Folder, FileJson, FileText, File, FilePlus } from "lucide-svelte";
import { ChevronDown, ChevronRight, Folder, FileJson, FileText, File, FilePlus } from "@lucide/svelte";
import type { DirTree } from "./page.svelte";
import PagesList from "./PagesList.svelte";
import { slide } from "svelte/transition";
@@ -4,7 +4,7 @@
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { eventRepo } from "@repo/event";
import type { ShortEvent } from "@type/event";
import { CalendarDays, Check, ChevronsUpDown } from "lucide-svelte";
import { CalendarDays, Check, ChevronsUpDown } from "@lucide/svelte";
const {
value,
@@ -2,7 +2,7 @@
import { Button } from "@components/ui/button";
import { Input } from "@components/ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { Image, Search } from "lucide-svelte";
import { Image, Search } from "@lucide/svelte";
import { manager } from "../page.svelte";
const {
@@ -4,7 +4,7 @@
import { Label } from "@components/ui/label";
import { eventRepo } from "@repo/event";
import type { EventFight, ExtendedEvent, ResponseGroups } from "@type/event";
import { Plus, Trash2 } from "lucide-svelte";
import { Plus, Trash2 } from "@lucide/svelte";
type StageType = "GROUP" | "ELEMINATION" | "DOUBLE_ELEMINATION";
type RoundPrefix = "Runde" | "Tag";
+1 -1
View File
@@ -2,7 +2,7 @@
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover";
import { Button } from "@components/ui/button";
import { Check, ChevronsUpDown } from "lucide-svelte";
import { Check, ChevronsUpDown } from "@lucide/svelte";
import { cn } from "@components/utils";
import { dataRepo } from "@repo/data";
import type { Player } from "@type/data";
@@ -1,6 +1,6 @@
<script lang="ts">
import { Accordion as AccordionPrimitive } from "bits-ui";
import ChevronDown from "lucide-svelte/icons/chevron-down";
import ChevronDown from "@lucide/svelte/icons/chevron-down";
import { cn } from "$lib/components/utils.js";
type $$Props = AccordionPrimitive.TriggerProps;
@@ -1,5 +1,5 @@
<script lang="ts">
import Ellipsis from "lucide-svelte/icons/ellipsis";
import Ellipsis from "@lucide/svelte/icons/ellipsis";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/components/utils.js";
@@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLLiAttributes } from "svelte/elements";
import ChevronRight from "lucide-svelte/icons/chevron-right";
import ChevronRight from "@lucide/svelte/icons/chevron-right";
import { cn } from "$lib/components/utils.js";
type $$Props = HTMLLiAttributes & {
@@ -1,6 +1,6 @@
<script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui";
import ChevronRight from "lucide-svelte/icons/chevron-right";
import ChevronRight from "@lucide/svelte/icons/chevron-right";
import { buttonVariants } from "$lib/components/ui/button/index.js";
import { cn } from "$lib/components/utils.js";
@@ -1,6 +1,6 @@
<script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui";
import ChevronLeft from "lucide-svelte/icons/chevron-left";
import ChevronLeft from "@lucide/svelte/icons/chevron-left";
import { buttonVariants } from "$lib/components/ui/button/index.js";
import { cn } from "$lib/components/utils.js";
@@ -1,5 +1,5 @@
<script lang="ts">
import ArrowRight from "lucide-svelte/icons/arrow-right";
import ArrowRight from "@lucide/svelte/icons/arrow-right";
import type { VariantProps } from "tailwind-variants";
import { getEmblaContext } from "./context.js";
import { cn } from "$lib/components/utils.js";
@@ -1,5 +1,5 @@
<script lang="ts">
import ArrowLeft from "lucide-svelte/icons/arrow-left";
import ArrowLeft from "@lucide/svelte/icons/arrow-left";
import type { VariantProps } from "tailwind-variants";
import { getEmblaContext } from "./context.js";
import { cn } from "$lib/components/utils.js";
@@ -1,6 +1,6 @@
<script lang="ts">
import { Command as CommandPrimitive } from "bits-ui";
import Search from "lucide-svelte/icons/search";
import Search from "@lucide/svelte/icons/search";
import { cn } from "$lib/components/utils.js";
let {
@@ -1,11 +1,9 @@
<script lang="ts">
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
import Check from "lucide-svelte/icons/check";
import Check from "@lucide/svelte/icons/check";
import { cn } from "$lib/components/utils.js";
type $$Props = ContextMenuPrimitive.CheckboxItemProps;
type $$Events = ContextMenuPrimitive.CheckboxItemEvents;
let className: $$Props["class"] = undefined;
export let checked: $$Props["checked"] = undefined;
export { className as class };
@@ -26,10 +24,12 @@
on:pointerleave
on:pointermove
>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<ContextMenuPrimitive.CheckboxIndicator>
{#snippet children({ checked })}
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
{#if checked}
<Check class="h-4 w-4" />
</ContextMenuPrimitive.CheckboxIndicator>
</span>
<slot />
{/if}
</span>
<slot />
{/snippet}
</ContextMenuPrimitive.CheckboxItem>
@@ -2,7 +2,7 @@
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
import { cn } from "$lib/components/utils.js";
type $$Props = ContextMenuPrimitive.LabelProps & {
type $$Props = ContextMenuPrimitive.GroupHeadingProps & {
inset?: boolean;
};
@@ -11,9 +11,9 @@
export { className as class };
</script>
<ContextMenuPrimitive.Label
<ContextMenuPrimitive.GroupHeading
class={cn("text-foreground px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
{...$$restProps}
>
<slot />
</ContextMenuPrimitive.Label>
</ContextMenuPrimitive.GroupHeading>
@@ -1,11 +1,9 @@
<script lang="ts">
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
import Circle from "lucide-svelte/icons/circle";
import Circle from "@lucide/svelte/icons/circle";
import { cn } from "$lib/components/utils.js";
type $$Props = ContextMenuPrimitive.RadioItemProps;
type $$Events = ContextMenuPrimitive.RadioItemEvents;
let className: $$Props["class"] = undefined;
export let value: ContextMenuPrimitive.RadioItemProps["value"];
export { className as class };
@@ -26,10 +24,12 @@
on:pointerleave
on:pointermove
>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<ContextMenuPrimitive.RadioIndicator>
{#snippet children({ checked })}
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
{#if checked}
<Circle class="h-2 w-2 fill-current" />
</ContextMenuPrimitive.RadioIndicator>
</span>
<slot />
{/if}
</span>
<slot />
{/snippet}
</ContextMenuPrimitive.RadioItem>
@@ -1,6 +1,6 @@
<script lang="ts">
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
import ChevronRight from "lucide-svelte/icons/chevron-right";
import ChevronRight from "@lucide/svelte/icons/chevron-right";
import { cn } from "$lib/components/utils.js";
type $$Props = ContextMenuPrimitive.SubTriggerProps & {
@@ -22,7 +22,7 @@
import { Button } from "@components/ui/button";
import { Popover, PopoverContent, PopoverTrigger } from "$lib/components/ui/popover";
import { ScrollArea } from "$lib/components/ui/scroll-area";
import { CalendarIcon } from "lucide-svelte";
import { CalendarIcon } from "@lucide/svelte";
import { cn } from "@components/utils";
import { fromDate, type ZonedDateTime } from "@internationalized/date";
import Input from "../input/input.svelte";
@@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as DialogPrimitive, type WithoutChildrenOrChild } from "bits-ui";
import X from "lucide-svelte/icons/x";
import X from "@lucide/svelte/icons/x";
import type { Snippet } from "svelte";
import * as Dialog from "./index.js";
import { cn } from "$lib/components/utils.js";
@@ -1,11 +1,9 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
import Check from "lucide-svelte/icons/check";
import Check from "@lucide/svelte/icons/check";
import { cn } from "$lib/components/utils.js";
type $$Props = DropdownMenuPrimitive.CheckboxItemProps;
type $$Events = DropdownMenuPrimitive.CheckboxItemEvents;
let className: $$Props["class"] = undefined;
export let checked: $$Props["checked"] = undefined;
export { className as class };
@@ -26,10 +24,12 @@
on:pointerleave
on:pointermove
>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.CheckboxIndicator>
{#snippet children({ checked })}
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
{#if checked}
<Check class="h-4 w-4" />
</DropdownMenuPrimitive.CheckboxIndicator>
</span>
<slot />
{/if}
</span>
<slot />
{/snippet}
</DropdownMenuPrimitive.CheckboxItem>
@@ -2,7 +2,7 @@
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
import { cn } from "$lib/components/utils.js";
type $$Props = DropdownMenuPrimitive.LabelProps & {
type $$Props = DropdownMenuPrimitive.GroupHeadingProps & {
inset?: boolean;
};
@@ -11,9 +11,9 @@
export { className as class };
</script>
<DropdownMenuPrimitive.Label
<DropdownMenuPrimitive.GroupHeading
class={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
{...$$restProps}
>
<slot />
</DropdownMenuPrimitive.Label>
</DropdownMenuPrimitive.GroupHeading>

Some files were not shown because too many files have changed in this diff Show More