diff --git a/.oxlintrc.json b/.oxlintrc.json
index 56bc2c7..5957e03 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -1,135 +1,135 @@
{
- "$schema": "./node_modules/oxlint/configuration_schema.json",
- "plugins": ["typescript", "unicorn"],
- "categories": {
- "correctness": "off"
- },
- "env": {
- "builtin": true,
- "browser": true,
- "commonjs": true,
- "node": true,
- "shared-node-browser": true
- },
- "rules": {
- "for-direction": "error",
- "no-async-promise-executor": "error",
- "no-case-declarations": "error",
- "no-class-assign": "error",
- "no-compare-neg-zero": "error",
- "no-cond-assign": "error",
- "no-const-assign": "error",
- "no-constant-binary-expression": "error",
- "no-constant-condition": "error",
- "no-control-regex": "error",
- "no-debugger": "error",
- "no-delete-var": "error",
- "no-dupe-class-members": "error",
- "no-dupe-else-if": "error",
- "no-dupe-keys": "error",
- "no-duplicate-case": "error",
- "no-empty": "error",
- "no-empty-character-class": "error",
- "no-empty-pattern": "error",
- "no-empty-static-block": "error",
- "no-ex-assign": "error",
- "no-extra-boolean-cast": "error",
- "no-fallthrough": "error",
- "no-func-assign": "error",
- "no-global-assign": "error",
- "no-import-assign": "error",
- "no-invalid-regexp": "error",
- "no-irregular-whitespace": "error",
- "no-loss-of-precision": "error",
- "no-new-native-nonconstructor": "error",
- "no-nonoctal-decimal-escape": "error",
- "no-obj-calls": "error",
- "no-prototype-builtins": "error",
- "no-redeclare": "error",
- "no-regex-spaces": "error",
- "no-self-assign": "error",
- "no-setter-return": "error",
- "no-shadow-restricted-names": "error",
- "no-sparse-arrays": "error",
- "no-this-before-super": "error",
- "no-unexpected-multiline": "off",
- "no-unsafe-finally": "error",
- "no-unsafe-negation": "error",
- "no-unsafe-optional-chaining": "error",
- "no-unused-labels": "error",
- "no-unused-private-class-members": "error",
- "no-unused-vars": "error",
- "no-useless-backreference": "error",
- "no-useless-catch": "error",
- "no-useless-escape": "error",
- "no-with": "error",
- "require-yield": "error",
- "use-isnan": "error",
- "valid-typeof": "error",
- "@typescript-eslint/ban-ts-comment": "error",
- "no-array-constructor": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-empty-object-type": "error",
- "@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-require-imports": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-function-type": "error",
- "no-unused-expressions": "error",
- "@typescript-eslint/no-wrapper-object-types": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "curly": "off",
- "unicorn/empty-brace-spaces": "off",
- "unicorn/no-nested-ternary": "off",
- "unicorn/number-literal-case": "off"
- },
- "globals": {
- "route": "readonly",
- "Laravel": "readonly"
- },
- "ignorePatterns": [
- "vendor",
- "node_modules",
- "public",
- "bootstrap/ssr",
- "tailwind.config.js",
- "resources/js/components/ui/*"
- ],
- "overrides": [
- {
- "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
- "rules": {
- "no-class-assign": "off",
- "no-const-assign": "off",
- "no-dupe-class-members": "off",
- "no-dupe-keys": "off",
- "no-func-assign": "off",
- "no-import-assign": "off",
- "no-new-native-nonconstructor": "off",
- "no-obj-calls": "off",
- "no-redeclare": "off",
- "no-setter-return": "off",
- "no-this-before-super": "off",
- "no-unsafe-negation": "off",
- "no-var": "error",
- "no-with": "off",
- "prefer-rest-params": "error",
- "prefer-spread": "error"
- }
- },
- {
- "files": ["*.svelte", "**/*.svelte"],
- "rules": {
- "no-inner-declarations": "off",
- "no-self-assign": "off"
- }
- }
- ]
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["typescript", "unicorn"],
+ "categories": {
+ "correctness": "off"
+ },
+ "env": {
+ "builtin": true,
+ "browser": true,
+ "commonjs": true,
+ "node": true,
+ "shared-node-browser": true
+ },
+ "rules": {
+ "for-direction": "error",
+ "no-async-promise-executor": "error",
+ "no-case-declarations": "error",
+ "no-class-assign": "error",
+ "no-compare-neg-zero": "error",
+ "no-cond-assign": "error",
+ "no-const-assign": "error",
+ "no-constant-binary-expression": "error",
+ "no-constant-condition": "error",
+ "no-control-regex": "error",
+ "no-debugger": "error",
+ "no-delete-var": "error",
+ "no-dupe-class-members": "error",
+ "no-dupe-else-if": "error",
+ "no-dupe-keys": "error",
+ "no-duplicate-case": "error",
+ "no-empty": "error",
+ "no-empty-character-class": "error",
+ "no-empty-pattern": "error",
+ "no-empty-static-block": "error",
+ "no-ex-assign": "error",
+ "no-extra-boolean-cast": "error",
+ "no-fallthrough": "error",
+ "no-func-assign": "error",
+ "no-global-assign": "error",
+ "no-import-assign": "error",
+ "no-invalid-regexp": "error",
+ "no-irregular-whitespace": "error",
+ "no-loss-of-precision": "error",
+ "no-new-native-nonconstructor": "error",
+ "no-nonoctal-decimal-escape": "error",
+ "no-obj-calls": "error",
+ "no-prototype-builtins": "error",
+ "no-redeclare": "error",
+ "no-regex-spaces": "error",
+ "no-self-assign": "error",
+ "no-setter-return": "error",
+ "no-shadow-restricted-names": "error",
+ "no-sparse-arrays": "error",
+ "no-this-before-super": "error",
+ "no-unexpected-multiline": "off",
+ "no-unsafe-finally": "error",
+ "no-unsafe-negation": "error",
+ "no-unsafe-optional-chaining": "error",
+ "no-unused-labels": "error",
+ "no-unused-private-class-members": "error",
+ "no-unused-vars": "error",
+ "no-useless-backreference": "error",
+ "no-useless-catch": "error",
+ "no-useless-escape": "error",
+ "no-with": "error",
+ "require-yield": "error",
+ "use-isnan": "error",
+ "valid-typeof": "error",
+ "@typescript-eslint/ban-ts-comment": "error",
+ "no-array-constructor": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "no-unused-expressions": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "curly": "off",
+ "unicorn/empty-brace-spaces": "off",
+ "unicorn/no-nested-ternary": "off",
+ "unicorn/number-literal-case": "off"
+ },
+ "globals": {
+ "route": "readonly",
+ "Laravel": "readonly"
+ },
+ "ignorePatterns": [
+ "vendor",
+ "node_modules",
+ "public",
+ "bootstrap/ssr",
+ "tailwind.config.js",
+ "resources/js/components/ui/*"
+ ],
+ "overrides": [
+ {
+ "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
+ "rules": {
+ "no-class-assign": "off",
+ "no-const-assign": "off",
+ "no-dupe-class-members": "off",
+ "no-dupe-keys": "off",
+ "no-func-assign": "off",
+ "no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
+ "no-obj-calls": "off",
+ "no-redeclare": "off",
+ "no-setter-return": "off",
+ "no-this-before-super": "off",
+ "no-unsafe-negation": "off",
+ "no-var": "error",
+ "no-with": "off",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error"
+ }
+ },
+ {
+ "files": ["*.svelte", "**/*.svelte"],
+ "rules": {
+ "no-inner-declarations": "off",
+ "no-self-assign": "off"
+ }
+ }
+ ]
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 5ec5392..e611e22 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,7 @@ services:
image: postgres
restart: always
ports:
- - 5432:5432
+ - 127.0.0.1:1234:5432
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: mysecretpassword
diff --git a/src/app.css b/src/app.css
index e48f5f0..b37c9b3 100644
--- a/src/app.css
+++ b/src/app.css
@@ -1,121 +1,121 @@
-@import "tailwindcss";
+@import 'tailwindcss';
-@import "tw-animate-css";
+@import 'tw-animate-css';
@custom-variant dark (&:is(.dark *));
:root {
- --radius: 0.625rem;
- --background: oklch(1 0 0);
- --foreground: oklch(0.129 0.042 264.695);
- --card: oklch(1 0 0);
- --card-foreground: oklch(0.129 0.042 264.695);
- --popover: oklch(1 0 0);
- --popover-foreground: oklch(0.129 0.042 264.695);
- --primary: oklch(0.208 0.042 265.755);
- --primary-foreground: oklch(0.984 0.003 247.858);
- --secondary: oklch(0.968 0.007 247.896);
- --secondary-foreground: oklch(0.208 0.042 265.755);
- --muted: oklch(0.968 0.007 247.896);
- --muted-foreground: oklch(0.554 0.046 257.417);
- --accent: oklch(0.968 0.007 247.896);
- --accent-foreground: oklch(0.208 0.042 265.755);
- --destructive: oklch(0.577 0.245 27.325);
- --border: oklch(0.929 0.013 255.508);
- --input: oklch(0.929 0.013 255.508);
- --ring: oklch(0.704 0.04 256.788);
- --chart-1: oklch(0.646 0.222 41.116);
- --chart-2: oklch(0.6 0.118 184.704);
- --chart-3: oklch(0.398 0.07 227.392);
- --chart-4: oklch(0.828 0.189 84.429);
- --chart-5: oklch(0.769 0.188 70.08);
- --sidebar: oklch(0.984 0.003 247.858);
- --sidebar-foreground: oklch(0.129 0.042 264.695);
- --sidebar-primary: oklch(0.208 0.042 265.755);
- --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
- --sidebar-accent: oklch(0.968 0.007 247.896);
- --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
- --sidebar-border: oklch(0.929 0.013 255.508);
- --sidebar-ring: oklch(0.704 0.04 256.788);
+ --radius: 0.625rem;
+ --background: oklch(1 0 0);
+ --foreground: oklch(0.129 0.042 264.695);
+ --card: oklch(1 0 0);
+ --card-foreground: oklch(0.129 0.042 264.695);
+ --popover: oklch(1 0 0);
+ --popover-foreground: oklch(0.129 0.042 264.695);
+ --primary: oklch(0.208 0.042 265.755);
+ --primary-foreground: oklch(0.984 0.003 247.858);
+ --secondary: oklch(0.968 0.007 247.896);
+ --secondary-foreground: oklch(0.208 0.042 265.755);
+ --muted: oklch(0.968 0.007 247.896);
+ --muted-foreground: oklch(0.554 0.046 257.417);
+ --accent: oklch(0.968 0.007 247.896);
+ --accent-foreground: oklch(0.208 0.042 265.755);
+ --destructive: oklch(0.577 0.245 27.325);
+ --border: oklch(0.929 0.013 255.508);
+ --input: oklch(0.929 0.013 255.508);
+ --ring: oklch(0.704 0.04 256.788);
+ --chart-1: oklch(0.646 0.222 41.116);
+ --chart-2: oklch(0.6 0.118 184.704);
+ --chart-3: oklch(0.398 0.07 227.392);
+ --chart-4: oklch(0.828 0.189 84.429);
+ --chart-5: oklch(0.769 0.188 70.08);
+ --sidebar: oklch(0.984 0.003 247.858);
+ --sidebar-foreground: oklch(0.129 0.042 264.695);
+ --sidebar-primary: oklch(0.208 0.042 265.755);
+ --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
+ --sidebar-accent: oklch(0.968 0.007 247.896);
+ --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
+ --sidebar-border: oklch(0.929 0.013 255.508);
+ --sidebar-ring: oklch(0.704 0.04 256.788);
}
.dark {
- --background: oklch(0.129 0.042 264.695);
- --foreground: oklch(0.984 0.003 247.858);
- --card: oklch(0.208 0.042 265.755);
- --card-foreground: oklch(0.984 0.003 247.858);
- --popover: oklch(0.208 0.042 265.755);
- --popover-foreground: oklch(0.984 0.003 247.858);
- --primary: oklch(0.929 0.013 255.508);
- --primary-foreground: oklch(0.208 0.042 265.755);
- --secondary: oklch(0.279 0.041 260.031);
- --secondary-foreground: oklch(0.984 0.003 247.858);
- --muted: oklch(0.279 0.041 260.031);
- --muted-foreground: oklch(0.704 0.04 256.788);
- --accent: oklch(0.279 0.041 260.031);
- --accent-foreground: oklch(0.984 0.003 247.858);
- --destructive: oklch(0.704 0.191 22.216);
- --border: oklch(1 0 0 / 10%);
- --input: oklch(1 0 0 / 15%);
- --ring: oklch(0.551 0.027 264.364);
- --chart-1: oklch(0.488 0.243 264.376);
- --chart-2: oklch(0.696 0.17 162.48);
- --chart-3: oklch(0.769 0.188 70.08);
- --chart-4: oklch(0.627 0.265 303.9);
- --chart-5: oklch(0.645 0.246 16.439);
- --sidebar: oklch(0.208 0.042 265.755);
- --sidebar-foreground: oklch(0.984 0.003 247.858);
- --sidebar-primary: oklch(0.488 0.243 264.376);
- --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
- --sidebar-accent: oklch(0.279 0.041 260.031);
- --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
- --sidebar-border: oklch(1 0 0 / 10%);
- --sidebar-ring: oklch(0.551 0.027 264.364);
+ --background: oklch(0.129 0.042 264.695);
+ --foreground: oklch(0.984 0.003 247.858);
+ --card: oklch(0.208 0.042 265.755);
+ --card-foreground: oklch(0.984 0.003 247.858);
+ --popover: oklch(0.208 0.042 265.755);
+ --popover-foreground: oklch(0.984 0.003 247.858);
+ --primary: oklch(0.929 0.013 255.508);
+ --primary-foreground: oklch(0.208 0.042 265.755);
+ --secondary: oklch(0.279 0.041 260.031);
+ --secondary-foreground: oklch(0.984 0.003 247.858);
+ --muted: oklch(0.279 0.041 260.031);
+ --muted-foreground: oklch(0.704 0.04 256.788);
+ --accent: oklch(0.279 0.041 260.031);
+ --accent-foreground: oklch(0.984 0.003 247.858);
+ --destructive: oklch(0.704 0.191 22.216);
+ --border: oklch(1 0 0 / 10%);
+ --input: oklch(1 0 0 / 15%);
+ --ring: oklch(0.551 0.027 264.364);
+ --chart-1: oklch(0.488 0.243 264.376);
+ --chart-2: oklch(0.696 0.17 162.48);
+ --chart-3: oklch(0.769 0.188 70.08);
+ --chart-4: oklch(0.627 0.265 303.9);
+ --chart-5: oklch(0.645 0.246 16.439);
+ --sidebar: oklch(0.208 0.042 265.755);
+ --sidebar-foreground: oklch(0.984 0.003 247.858);
+ --sidebar-primary: oklch(0.488 0.243 264.376);
+ --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
+ --sidebar-accent: oklch(0.279 0.041 260.031);
+ --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
+ --sidebar-border: oklch(1 0 0 / 10%);
+ --sidebar-ring: oklch(0.551 0.027 264.364);
}
@theme inline {
- --radius-sm: calc(var(--radius) - 4px);
- --radius-md: calc(var(--radius) - 2px);
- --radius-lg: var(--radius);
- --radius-xl: calc(var(--radius) + 4px);
- --color-background: var(--background);
- --color-foreground: var(--foreground);
- --color-card: var(--card);
- --color-card-foreground: var(--card-foreground);
- --color-popover: var(--popover);
- --color-popover-foreground: var(--popover-foreground);
- --color-primary: var(--primary);
- --color-primary-foreground: var(--primary-foreground);
- --color-secondary: var(--secondary);
- --color-secondary-foreground: var(--secondary-foreground);
- --color-muted: var(--muted);
- --color-muted-foreground: var(--muted-foreground);
- --color-accent: var(--accent);
- --color-accent-foreground: var(--accent-foreground);
- --color-destructive: var(--destructive);
- --color-border: var(--border);
- --color-input: var(--input);
- --color-ring: var(--ring);
- --color-chart-1: var(--chart-1);
- --color-chart-2: var(--chart-2);
- --color-chart-3: var(--chart-3);
- --color-chart-4: var(--chart-4);
- --color-chart-5: var(--chart-5);
- --color-sidebar: var(--sidebar);
- --color-sidebar-foreground: var(--sidebar-foreground);
- --color-sidebar-primary: var(--sidebar-primary);
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
- --color-sidebar-accent: var(--sidebar-accent);
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
- --color-sidebar-border: var(--sidebar-border);
- --color-sidebar-ring: var(--sidebar-ring);
+ --radius-sm: calc(var(--radius) - 4px);
+ --radius-md: calc(var(--radius) - 2px);
+ --radius-lg: var(--radius);
+ --radius-xl: calc(var(--radius) + 4px);
+ --color-background: var(--background);
+ --color-foreground: var(--foreground);
+ --color-card: var(--card);
+ --color-card-foreground: var(--card-foreground);
+ --color-popover: var(--popover);
+ --color-popover-foreground: var(--popover-foreground);
+ --color-primary: var(--primary);
+ --color-primary-foreground: var(--primary-foreground);
+ --color-secondary: var(--secondary);
+ --color-secondary-foreground: var(--secondary-foreground);
+ --color-muted: var(--muted);
+ --color-muted-foreground: var(--muted-foreground);
+ --color-accent: var(--accent);
+ --color-accent-foreground: var(--accent-foreground);
+ --color-destructive: var(--destructive);
+ --color-border: var(--border);
+ --color-input: var(--input);
+ --color-ring: var(--ring);
+ --color-chart-1: var(--chart-1);
+ --color-chart-2: var(--chart-2);
+ --color-chart-3: var(--chart-3);
+ --color-chart-4: var(--chart-4);
+ --color-chart-5: var(--chart-5);
+ --color-sidebar: var(--sidebar);
+ --color-sidebar-foreground: var(--sidebar-foreground);
+ --color-sidebar-primary: var(--sidebar-primary);
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
+ --color-sidebar-accent: var(--sidebar-accent);
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
+ --color-sidebar-border: var(--sidebar-border);
+ --color-sidebar-ring: var(--sidebar-ring);
}
@layer base {
- * {
- @apply border-border outline-ring/50;
- }
- body {
- @apply bg-background text-foreground;
- }
-}
\ No newline at end of file
+ * {
+ @apply border-border outline-ring/50;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
diff --git a/src/app.d.ts b/src/app.d.ts
index e3dda87..89311bd 100644
--- a/src/app.d.ts
+++ b/src/app.d.ts
@@ -3,10 +3,10 @@
declare global {
namespace App {
interface Locals {
- user: import('$lib/server/auth').SessionValidationResult['users'];
+ user: import('$lib/server/auth').SessionValidationResult['user'];
session: import('$lib/server/auth').SessionValidationResult['sessions'];
- roles: import('$lib/server/db/schema').Role[];
- permissions: import('$lib/server/db/schema').Permission[];
+ roles: import('$lib/server/db/schema/roles').Role[];
+ permissions: import('$lib/server/db/schema/permissions').Permission[];
}
} // interface Error {}
// interface Locals {}
diff --git a/src/lib/components/rounds/create-round.svelte b/src/lib/components/rounds/create-round.svelte
index 0ad9f9d..abae1e4 100644
--- a/src/lib/components/rounds/create-round.svelte
+++ b/src/lib/components/rounds/create-round.svelte
@@ -1,36 +1,92 @@
+
+
+
+
+
+
+
+
+ Number of participants at the beginning of the stage.
+
+
+
+
+
schedulingMode, (t: SchedulingMode) => {}}
@@ -38,11 +94,10 @@
>
{#each Object.values(SchedulingMode) as mode}