Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa52d052da |
No files matched your search
@@ -47,7 +47,6 @@ jobs:
|
|||||||
pnpm biome:lint
|
pnpm biome:lint
|
||||||
pnpm typecheck
|
pnpm typecheck
|
||||||
pnpm test
|
pnpm test
|
||||||
pnpm knip
|
|
||||||
echo "--- CI checks passed ---"
|
echo "--- CI checks passed ---"
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
@@ -4,19 +4,15 @@
|
|||||||
"src/app/**/page.{ts,tsx}",
|
"src/app/**/page.{ts,tsx}",
|
||||||
"src/app/**/layout.{ts,tsx}",
|
"src/app/**/layout.{ts,tsx}",
|
||||||
"src/app/**/route.{ts,tsx}",
|
"src/app/**/route.{ts,tsx}",
|
||||||
"src/app/**/{error,not-found,loading,template,default,global-error}.{ts,tsx}",
|
"src/app/**/{error,not-found,loading,template,default,global-error}.{ts,tsx}"
|
||||||
"scripts/migrate-aes-cbc-to-gcm.ts"
|
|
||||||
],
|
],
|
||||||
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.{ts,js}"],
|
"project": ["src/**/*.{ts,tsx}"],
|
||||||
"ignoreDependencies": [
|
"ignoreDependencies": [
|
||||||
"tailwindcss-animate",
|
"tailwindcss-animate",
|
||||||
"@tailwindcss/forms",
|
"@tailwindcss/forms",
|
||||||
"@tailwindcss/typography",
|
"@tailwindcss/typography",
|
||||||
"pino-pretty",
|
"pino-pretty",
|
||||||
"tailwindcss",
|
"tailwindcss"
|
||||||
"husky",
|
|
||||||
"@sentry/nextjs"
|
|
||||||
],
|
],
|
||||||
"ignore": ["src/actions/import-badges.ts"],
|
|
||||||
"ignoreBinaries": ["sendmail"]
|
"ignoreBinaries": ["sendmail"]
|
||||||
}
|
}
|
||||||
+1
-1
@@ -49,7 +49,7 @@ const nextConfig: NextConfig = {
|
|||||||
|
|
||||||
// Voorkom dat type-warnings (zoals ongebruikte imports) de productiebuild blokkeren
|
// Voorkom dat type-warnings (zoals ongebruikte imports) de productiebuild blokkeren
|
||||||
typescript: {
|
typescript: {
|
||||||
ignoreBuildErrors: false,
|
ignoreBuildErrors: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Enable React Compiler for automatic memoization
|
// Enable React Compiler for automatic memoization
|
||||||
|
|||||||
+1
-3
@@ -13,8 +13,6 @@
|
|||||||
"lint": "biome check .",
|
"lint": "biome check .",
|
||||||
"biome:lint": "biome check .",
|
"biome:lint": "biome check .",
|
||||||
"format": "biome format --write .",
|
"format": "biome format --write .",
|
||||||
"knip": "knip --include files,dependencies,devDependencies,unlisted,binaries",
|
|
||||||
"jobs:worker": "tsx scripts/jobs-worker.ts",
|
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"db:generate": "drizzle-kit generate",
|
"db:generate": "drizzle-kit generate",
|
||||||
@@ -71,7 +69,7 @@
|
|||||||
"@tailwindcss/forms": "^0.5.11",
|
"@tailwindcss/forms": "^0.5.11",
|
||||||
"@tailwindcss/postcss": "^4.3.3",
|
"@tailwindcss/postcss": "^4.3.3",
|
||||||
"@tailwindcss/typography": "^0.5.20",
|
"@tailwindcss/typography": "^0.5.20",
|
||||||
"@types/node": "^26.2.0",
|
"@types/node": "^26.1.2",
|
||||||
"@types/react": "19.2.18",
|
"@types/react": "19.2.18",
|
||||||
"@types/react-dom": "19.2.4",
|
"@types/react-dom": "19.2.4",
|
||||||
"@vitest/coverage-v8": "4.1.10",
|
"@vitest/coverage-v8": "4.1.10",
|
||||||
|
|||||||
Generated
+34
-34
@@ -57,7 +57,7 @@ importers:
|
|||||||
version: 3.4.13
|
version: 3.4.13
|
||||||
drizzle-orm:
|
drizzle-orm:
|
||||||
specifier: 0.45.2
|
specifier: 0.45.2
|
||||||
version: 0.45.2([email protected](@types/node@26.2.0))
|
version: 0.45.2([email protected](@types/node@26.1.2))
|
||||||
hash-wasm:
|
hash-wasm:
|
||||||
specifier: 4.12.0
|
specifier: 4.12.0
|
||||||
version: 4.12.0
|
version: 4.12.0
|
||||||
@@ -90,16 +90,16 @@ importers:
|
|||||||
version: 11.14.0([email protected])
|
version: 11.14.0([email protected])
|
||||||
mysql2:
|
mysql2:
|
||||||
specifier: 3.23.2
|
specifier: 3.23.2
|
||||||
version: 3.23.2(@types/node@26.2.0)
|
version: 3.23.2(@types/node@26.1.2)
|
||||||
next:
|
next:
|
||||||
specifier: 16.3.0
|
specifier: 16.3.0
|
||||||
version: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
|
version: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
|
||||||
next-auth:
|
next-auth:
|
||||||
specifier: 5.0.0-beta.32
|
specifier: 5.0.0-beta.32
|
||||||
version: 5.0.0-beta.32([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])
|
version: 5.0.0-beta.32([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])
|
||||||
next-intl:
|
next-intl:
|
||||||
specifier: 4.13.5
|
specifier: 4.13.5
|
||||||
version: 4.13.5([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
|
version: 4.13.5([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
|
||||||
otplib:
|
otplib:
|
||||||
specifier: 13.4.1
|
specifier: 13.4.1
|
||||||
version: 13.4.1
|
version: 13.4.1
|
||||||
@@ -123,7 +123,7 @@ importers:
|
|||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
sharp:
|
sharp:
|
||||||
specifier: ^0.35.3
|
specifier: ^0.35.3
|
||||||
version: 0.35.3(@types/node@26.2.0)
|
version: 0.35.3(@types/node@26.1.2)
|
||||||
sonner:
|
sonner:
|
||||||
specifier: 2.0.7
|
specifier: 2.0.7
|
||||||
version: 2.0.7([email protected]([email protected]))([email protected])
|
version: 2.0.7([email protected]([email protected]))([email protected])
|
||||||
@@ -153,8 +153,8 @@ importers:
|
|||||||
specifier: ^0.5.20
|
specifier: ^0.5.20
|
||||||
version: 0.5.20([email protected])
|
version: 0.5.20([email protected])
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^26.2.0
|
specifier: ^26.1.2
|
||||||
version: 26.2.0
|
version: 26.1.2
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: 19.2.18
|
specifier: 19.2.18
|
||||||
version: 19.2.18
|
version: 19.2.18
|
||||||
@@ -199,10 +199,10 @@ importers:
|
|||||||
version: 7.0.2
|
version: 7.0.2
|
||||||
vite:
|
vite:
|
||||||
specifier: 8.2.1
|
specifier: 8.2.1
|
||||||
version: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected])
|
version: 8.2.1(@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected])
|
||||||
vitest:
|
vitest:
|
||||||
specifier: 4.1.10
|
specifier: 4.1.10
|
||||||
version: 4.1.10(@types/node@26.2.0)(@vitest/[email protected])([email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected]))
|
version: 4.1.10(@types/node@26.1.2)(@vitest/[email protected])([email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected]))
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -1734,8 +1734,8 @@ packages:
|
|||||||
'@types/[email protected]':
|
'@types/[email protected]':
|
||||||
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
|
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
|
||||||
|
|
||||||
'@types/node@26.2.0':
|
'@types/node@26.1.2':
|
||||||
resolution: {integrity: sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==}
|
resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==}
|
||||||
|
|
||||||
'@types/[email protected]':
|
'@types/[email protected]':
|
||||||
resolution: {integrity: sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==}
|
resolution: {integrity: sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==}
|
||||||
@@ -4165,7 +4165,7 @@ snapshots:
|
|||||||
|
|
||||||
'@types/[email protected]': {}
|
'@types/[email protected]': {}
|
||||||
|
|
||||||
'@types/node@26.2.0':
|
'@types/node@26.1.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 8.3.0
|
undici-types: 8.3.0
|
||||||
|
|
||||||
@@ -4252,7 +4252,7 @@ snapshots:
|
|||||||
obug: 2.1.4
|
obug: 2.1.4
|
||||||
std-env: 4.2.0
|
std-env: 4.2.0
|
||||||
tinyrainbow: 3.1.1
|
tinyrainbow: 3.1.1
|
||||||
vitest: 4.1.10(@types/node@26.2.0)(@vitest/[email protected])([email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected]))
|
vitest: 4.1.10(@types/node@26.1.2)(@vitest/[email protected])([email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected]))
|
||||||
|
|
||||||
'@vitest/[email protected]':
|
'@vitest/[email protected]':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4263,13 +4263,13 @@ snapshots:
|
|||||||
chai: 6.2.2
|
chai: 6.2.2
|
||||||
tinyrainbow: 3.1.1
|
tinyrainbow: 3.1.1
|
||||||
|
|
||||||
'@vitest/[email protected]([email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected]))':
|
'@vitest/[email protected]([email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected]))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vitest/spy': 4.1.10
|
'@vitest/spy': 4.1.10
|
||||||
estree-walker: 3.0.3
|
estree-walker: 3.0.3
|
||||||
magic-string: 0.30.21
|
magic-string: 0.30.21
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected])
|
vite: 8.2.1(@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected])
|
||||||
|
|
||||||
'@vitest/[email protected]':
|
'@vitest/[email protected]':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4396,9 +4396,9 @@ snapshots:
|
|||||||
esbuild: 0.25.12
|
esbuild: 0.25.12
|
||||||
tsx: 4.23.9
|
tsx: 4.23.9
|
||||||
|
|
||||||
[email protected]([email protected](@types/node@26.2.0)):
|
[email protected]([email protected](@types/node@26.1.2)):
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
mysql2: 3.23.2(@types/node@26.2.0)
|
mysql2: 3.23.2(@types/node@26.1.2)
|
||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
@@ -4782,9 +4782,9 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
[email protected](@types/node@26.2.0):
|
[email protected](@types/node@26.1.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 26.2.0
|
'@types/node': 26.1.2
|
||||||
aws-ssl-profiles: 1.1.2
|
aws-ssl-profiles: 1.1.2
|
||||||
denque: 2.1.0
|
denque: 2.1.0
|
||||||
generate-function: 2.3.1
|
generate-function: 2.3.1
|
||||||
@@ -4802,22 +4802,22 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected]([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected]):
|
[email protected]([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected]):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@auth/core': 0.41.3
|
'@auth/core': 0.41.3
|
||||||
next: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
|
next: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
|
||||||
react: 19.2.8
|
react: 19.2.8
|
||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected]([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
|
[email protected]([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formatjs/intl-localematcher': 0.8.13
|
'@formatjs/intl-localematcher': 0.8.13
|
||||||
'@parcel/watcher': 2.6.0
|
'@parcel/watcher': 2.6.0
|
||||||
'@swc/core': 1.15.47
|
'@swc/core': 1.15.47
|
||||||
icu-minify: 4.13.5
|
icu-minify: 4.13.5
|
||||||
negotiator: 1.0.0
|
negotiator: 1.0.0
|
||||||
next: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
|
next: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
|
||||||
next-intl-swc-plugin-extractor: 4.13.5
|
next-intl-swc-plugin-extractor: 4.13.5
|
||||||
po-parser: 2.1.1
|
po-parser: 2.1.1
|
||||||
react: 19.2.8
|
react: 19.2.8
|
||||||
@@ -4827,7 +4827,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
|
|
||||||
[email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]):
|
[email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@next/env': 16.3.0
|
'@next/env': 16.3.0
|
||||||
'@swc/helpers': 0.5.15
|
'@swc/helpers': 0.5.15
|
||||||
@@ -4847,7 +4847,7 @@ snapshots:
|
|||||||
'@next/swc-win32-arm64-msvc': 16.3.0
|
'@next/swc-win32-arm64-msvc': 16.3.0
|
||||||
'@next/swc-win32-x64-msvc': 16.3.0
|
'@next/swc-win32-x64-msvc': 16.3.0
|
||||||
babel-plugin-react-compiler: 1.0.0
|
babel-plugin-react-compiler: 1.0.0
|
||||||
sharp: 0.35.3(@types/node@26.2.0)
|
sharp: 0.35.3(@types/node@26.1.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
@@ -5098,7 +5098,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected](@types/node@26.2.0):
|
[email protected](@types/node@26.1.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@img/colour': 1.1.0
|
'@img/colour': 1.1.0
|
||||||
detect-libc: 2.1.2
|
detect-libc: 2.1.2
|
||||||
@@ -5129,7 +5129,7 @@ snapshots:
|
|||||||
'@img/sharp-win32-arm64': 0.35.3
|
'@img/sharp-win32-arm64': 0.35.3
|
||||||
'@img/sharp-win32-ia32': 0.35.3
|
'@img/sharp-win32-ia32': 0.35.3
|
||||||
'@img/sharp-win32-x64': 0.35.3
|
'@img/sharp-win32-x64': 0.35.3
|
||||||
'@types/node': 26.2.0
|
'@types/node': 26.1.2
|
||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
@@ -5300,7 +5300,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected]):
|
[email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected]):
|
||||||
dependencies:
|
dependencies:
|
||||||
lightningcss: 1.33.0
|
lightningcss: 1.33.0
|
||||||
picomatch: 4.0.5
|
picomatch: 4.0.5
|
||||||
@@ -5308,17 +5308,17 @@ snapshots:
|
|||||||
rolldown: 1.2.2
|
rolldown: 1.2.2
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/node': 26.2.0
|
'@types/node': 26.1.2
|
||||||
esbuild: 0.25.12
|
esbuild: 0.25.12
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.7.0
|
jiti: 2.7.0
|
||||||
tsx: 4.23.11
|
tsx: 4.23.11
|
||||||
yaml: 2.9.0
|
yaml: 2.9.0
|
||||||
|
|
||||||
[email protected](@types/node@26.2.0)(@vitest/[email protected])([email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected])):
|
[email protected](@types/node@26.1.2)(@vitest/[email protected])([email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected])):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vitest/expect': 4.1.10
|
'@vitest/expect': 4.1.10
|
||||||
'@vitest/mocker': 4.1.10([email protected](@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected]))
|
'@vitest/mocker': 4.1.10([email protected](@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected]))
|
||||||
'@vitest/pretty-format': 4.1.10
|
'@vitest/pretty-format': 4.1.10
|
||||||
'@vitest/runner': 4.1.10
|
'@vitest/runner': 4.1.10
|
||||||
'@vitest/snapshot': 4.1.10
|
'@vitest/snapshot': 4.1.10
|
||||||
@@ -5335,10 +5335,10 @@ snapshots:
|
|||||||
tinyexec: 1.3.0
|
tinyexec: 1.3.0
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
tinyrainbow: 3.1.1
|
tinyrainbow: 3.1.1
|
||||||
vite: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected])([email protected])
|
vite: 8.2.1(@types/node@26.1.2)([email protected])([email protected])([email protected])([email protected])
|
||||||
why-is-node-running: 2.3.0
|
why-is-node-running: 2.3.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/node': 26.2.0
|
'@types/node': 26.1.2
|
||||||
'@vitest/coverage-v8': 4.1.10([email protected])
|
'@vitest/coverage-v8': 4.1.10([email protected])
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- msw
|
- msw
|
||||||
|
|||||||
@@ -18,6 +18,20 @@ async function rejectLegacyHousekeepingWrite(): Promise<never> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function upsertPermission(_formData: FormData): Promise<void> {
|
||||||
|
return rejectLegacyHousekeepingWrite();
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function deletePermission(_formData: FormData): Promise<void> {
|
||||||
|
return rejectLegacyHousekeepingWrite();
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function bulkImportPermissions(
|
||||||
|
_formData: FormData,
|
||||||
|
): Promise<{ count: number; errors: string[] }> {
|
||||||
|
return rejectLegacyHousekeepingWrite();
|
||||||
|
}
|
||||||
|
|
||||||
export async function exportPermissions(): Promise<string> {
|
export async function exportPermissions(): Promise<string> {
|
||||||
await requirePermission(PERMS.SETTINGS_VIEW);
|
await requirePermission(PERMS.SETTINGS_VIEW);
|
||||||
|
|
||||||
@@ -41,3 +55,13 @@ export async function exportPermissions(): Promise<string> {
|
|||||||
export async function applyPreset(_formData: FormData): Promise<void> {
|
export async function applyPreset(_formData: FormData): Promise<void> {
|
||||||
return rejectLegacyHousekeepingWrite();
|
return rejectLegacyHousekeepingWrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function clearAllPermissions(): Promise<void> {
|
||||||
|
return rejectLegacyHousekeepingWrite();
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function bulkDeletePermissions(
|
||||||
|
_ids: bigint[],
|
||||||
|
): Promise<{ count: number }> {
|
||||||
|
return rejectLegacyHousekeepingWrite();
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
"use server";
|
"use server";
|
||||||
|
|
||||||
import { eq } from "drizzle-orm";
|
import { eq, inArray } from "drizzle-orm";
|
||||||
import { revalidatePath } from "next/cache";
|
import { revalidatePath } from "next/cache";
|
||||||
import { requirePermission } from "@/lib/admin/guard";
|
import { requirePermission } from "@/lib/admin/guard";
|
||||||
import { tryRemoveLocalPhotoFile } from "@/lib/admin/photo-files";
|
import { tryRemoveLocalPhotoFile } from "@/lib/admin/photo-files";
|
||||||
@@ -34,3 +34,37 @@ export async function deletePhoto(formData: FormData): Promise<void> {
|
|||||||
revalidatePath("/admin/photos");
|
revalidatePath("/admin/photos");
|
||||||
revalidatePath("/photos");
|
revalidatePath("/photos");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function bulkDeletePhotos(formData: FormData): Promise<void> {
|
||||||
|
const staff = await requirePermission(PERMS.PAGES_EDIT);
|
||||||
|
const raw = String(formData.get("ids") ?? "");
|
||||||
|
const ids = raw
|
||||||
|
.split(",")
|
||||||
|
.map((s) => Number(s.trim()))
|
||||||
|
.filter((n) => Number.isFinite(n) && n > 0);
|
||||||
|
if (ids.length === 0) return;
|
||||||
|
|
||||||
|
const rows = await db
|
||||||
|
.select({ id: CameraWeb.id, url: CameraWeb.url })
|
||||||
|
.from(CameraWeb)
|
||||||
|
.where(inArray(CameraWeb.id, ids));
|
||||||
|
|
||||||
|
if (rows.length > 0) {
|
||||||
|
await db.delete(CameraWeb).where(
|
||||||
|
inArray(
|
||||||
|
CameraWeb.id,
|
||||||
|
rows.map((r) => r.id),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
await Promise.all(rows.map((r) => tryRemoveLocalPhotoFile(r.url)));
|
||||||
|
await logStaffActivity({
|
||||||
|
staffId: staff.id,
|
||||||
|
action: "photo_bulk_delete",
|
||||||
|
description: `Deleted ${rows.length} camera photo(s)`,
|
||||||
|
targetType: "camera_web",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
revalidatePath("/admin/photos");
|
||||||
|
revalidatePath("/photos");
|
||||||
|
}
|
||||||
@@ -53,6 +53,75 @@ export const createTicket = authAction(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const userReplyTicket = authAction(
|
||||||
|
{
|
||||||
|
schema: replyTicketSchema,
|
||||||
|
rateLimitKey: "ticket-reply",
|
||||||
|
rateLimitMax: 10,
|
||||||
|
rateLimitWindowMs: 60_000,
|
||||||
|
},
|
||||||
|
async (ctx) => {
|
||||||
|
const [ticket] = await db
|
||||||
|
.select()
|
||||||
|
.from(WebsiteTicket)
|
||||||
|
.where(eq(WebsiteTicket.id, ctx.data.ticketId))
|
||||||
|
.limit(1);
|
||||||
|
|
||||||
|
if (!ticket) throw new ActionError("Ticket not found");
|
||||||
|
if (ticket.creatorId !== ctx.session.user.id)
|
||||||
|
throw new ActionError("Unauthorized");
|
||||||
|
if (ticket.status === "closed") throw new ActionError("Ticket is closed");
|
||||||
|
|
||||||
|
await db.insert(WebsiteTicketMessage).values({
|
||||||
|
ticketId: ctx.data.ticketId,
|
||||||
|
userId: ctx.session.user.id,
|
||||||
|
message: ctx.data.message,
|
||||||
|
isStaff: 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
// If ticket was in "waiting" (waiting for user), move back to open
|
||||||
|
if (ticket.status === "waiting") {
|
||||||
|
await db
|
||||||
|
.update(WebsiteTicket)
|
||||||
|
.set({ status: "open", updatedAt: new Date() })
|
||||||
|
.where(eq(WebsiteTicket.id, ctx.data.ticketId));
|
||||||
|
}
|
||||||
|
|
||||||
|
return actionOk();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
export const closeTicketByUser = authAction(
|
||||||
|
{
|
||||||
|
schema: replyTicketSchema.pick({ ticketId: true }),
|
||||||
|
rateLimitKey: "ticket-close",
|
||||||
|
rateLimitMax: 10,
|
||||||
|
rateLimitWindowMs: 60_000,
|
||||||
|
},
|
||||||
|
async (ctx) => {
|
||||||
|
const [ticket] = await db
|
||||||
|
.select()
|
||||||
|
.from(WebsiteTicket)
|
||||||
|
.where(eq(WebsiteTicket.id, ctx.data.ticketId))
|
||||||
|
.limit(1);
|
||||||
|
|
||||||
|
if (!ticket) throw new ActionError("Ticket not found");
|
||||||
|
if (ticket.creatorId !== ctx.session.user.id)
|
||||||
|
throw new ActionError("Unauthorized");
|
||||||
|
if (ticket.status === "closed")
|
||||||
|
throw new ActionError("Ticket is already closed");
|
||||||
|
|
||||||
|
await db
|
||||||
|
.update(WebsiteTicket)
|
||||||
|
.set({ status: "closed", closedAt: new Date(), updatedAt: new Date() })
|
||||||
|
.where(eq(WebsiteTicket.id, ctx.data.ticketId));
|
||||||
|
|
||||||
|
return actionOk();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// ── Admin actions ────────────────────────────────────────────────────
|
||||||
|
|
||||||
export const adminReplyTicket = adminAction(
|
export const adminReplyTicket = adminAction(
|
||||||
{
|
{
|
||||||
permission: [PERMS.TICKETS_EDIT, PERMS.MOD_TICKETS_EDIT],
|
permission: [PERMS.TICKETS_EDIT, PERMS.MOD_TICKETS_EDIT],
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN (same base used by the profile page).
|
// Canonical Habbo badge image CDN (same base used by the profile page).
|
||||||
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteStaffApplications, WebsiteTeams } from "@/lib/db";
|
import { db, WebsiteStaffApplications, WebsiteTeams } from "@/lib/db";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN (same base used by the profile page).
|
// Canonical Habbo badge image CDN (same base used by the profile page).
|
||||||
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { ContentCard, EmptyState } from "@/components/public/ui";
|
import { ContentCard, EmptyState } from "@/components/public/ui";
|
||||||
import { db, WebsiteBadges } from "@/lib/db";
|
import { db, WebsiteBadges } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Badges" };
|
export const metadata = { title: "Badges" };
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN. A badge_key (e.g. "ADM") maps to a .gif here.
|
// Canonical Habbo badge image CDN. A badge_key (e.g. "ADM") maps to a .gif here.
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { unixNow } from "@/lib/bans";
|
import { unixNow } from "@/lib/bans";
|
||||||
import { Ban, db } from "@/lib/db";
|
import { Ban, db } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
const FAR_FUTURE = Math.floor(Date.now() / 1000) + 50 * 365 * 24 * 3600;
|
const FAR_FUTURE = Math.floor(Date.now() / 1000) + 50 * 365 * 24 * 3600;
|
||||||
|
|
||||||
export default async function BannedPage() {
|
export default async function BannedPage() {
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import Link from "next/link";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Community" };
|
export const metadata = { title: "Community" };
|
||||||
|
|
||||||
const LINKS = [
|
const LINKS = [
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Public API documentation. Static, hand-maintained from the routes that
|
// Public API documentation. Static, hand-maintained from the routes that
|
||||||
// actually exist under src/app/api — keep this in sync when endpoints change.
|
// actually exist under src/app/api — keep this in sync when endpoints change.
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, User, WebsiteDrawbadges } from "@/lib/db";
|
import { db, User, WebsiteDrawbadges } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Reads the live users + website_drawbadges tables and writes credits/badges on
|
// Reads the live users + website_drawbadges tables and writes credits/badges on
|
||||||
// purchase — must never be statically rendered.
|
// purchase — must never be statically rendered.
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { EventRegisterButton } from "./event-register-button";
|
import { EventRegisterButton } from "./event-register-button";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
function parseEventId(slugOrId: string): number | null {
|
function parseEventId(slugOrId: string): number | null {
|
||||||
if (/^\d+$/.test(slugOrId)) return Number.parseInt(slugOrId, 10);
|
if (/^\d+$/.test(slugOrId)) return Number.parseInt(slugOrId, 10);
|
||||||
const match = slugOrId.match(/-(\d+)$/);
|
const match = slugOrId.match(/-(\d+)$/);
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ import {
|
|||||||
import { excerpt, slugify } from "@/lib/format";
|
import { excerpt, slugify } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Events" };
|
export const metadata = { title: "Events" };
|
||||||
|
|
||||||
export default async function EventsPage() {
|
export default async function EventsPage() {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { CaptchaWidget } from "@/components/auth/captcha-widget";
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function ForgotPage({
|
export default async function ForgotPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { db, MessengerFriendships, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Friends" };
|
export const metadata = { title: "Friends" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ removed?: string; error?: string }>;
|
type SearchParams = Promise<{ removed?: string; error?: string }>;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import {
|
|||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ replied?: string; error?: string }>;
|
type SearchParams = Promise<{ replied?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
import { db, Guilds } from "@/lib/db";
|
import { db, Guilds } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ error?: string }>;
|
type SearchParams = Promise<{ error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, Guilds, GuildsForumsThreads, User } from "@/lib/db";
|
import { db, Guilds, GuildsForumsThreads, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string }>;
|
type SearchParams = Promise<{ posted?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type GuildView = {
|
type GuildView = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, Guilds } from "@/lib/db";
|
import { db, Guilds } from "@/lib/db";
|
||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Guilds" };
|
export const metadata = { title: "Guilds" };
|
||||||
|
|
||||||
type GuildCard = {
|
type GuildCard = {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
|||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { sanitize } from "@/lib/sanitize";
|
import { sanitize } from "@/lib/sanitize";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
|
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
|
||||||
const HELP_IMAGE_BASE = "/assets/images/help-center";
|
const HELP_IMAGE_BASE = "/assets/images/help-center";
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import {
|
|||||||
WebsiteRules,
|
WebsiteRules,
|
||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type HelpCategory = {
|
type HelpCategory = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import {
|
|||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
replied?: string;
|
replied?: string;
|
||||||
closed?: string;
|
closed?: string;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteHelpCenterTickets } from "@/lib/db";
|
import { db, WebsiteHelpCenterTickets } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ created?: string; error?: string }>;
|
type SearchParams = Promise<{ created?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { SiteHeader } from "@/components/site-header";
|
|||||||
import { TopHeader } from "@/components/top-header";
|
import { TopHeader } from "@/components/top-header";
|
||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public site chrome. Route group `(site)` keeps this off `/admin` and `/client`,
|
* Public site chrome. Route group `(site)` keeps this off `/admin` and `/client`,
|
||||||
* so housekeeping is never constrained by the public max-w-7xl grid.
|
* so housekeeping is never constrained by the public max-w-7xl grid.
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { db, User, UsersCurrency, UsersSettings } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Leaderboard" };
|
export const metadata = { title: "Leaderboard" };
|
||||||
|
|
||||||
// Currency type ids (see UsersCurrency in src/db/schema.ts):
|
// Currency type ids (see UsersCurrency in src/db/schema.ts):
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function LoginPage() {
|
export default async function LoginPage() {
|
||||||
const t = await getTranslations("pages.login");
|
const t = await getTranslations("pages.login");
|
||||||
const th = await getTranslations("header");
|
const th = await getTranslations("header");
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import LogoGenerator from "@/components/public/logo-generator";
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Logo generator" };
|
export const metadata = { title: "Logo generator" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function MaintenancePage() {
|
export default async function MaintenancePage() {
|
||||||
const t = await getTranslations("pages.maintenance");
|
const t = await getTranslations("pages.maintenance");
|
||||||
const [hotel, message] = await Promise.all([
|
const [hotel, message] = await Promise.all([
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
|||||||
import { db, MarketplaceItems, User } from "@/lib/db";
|
import { db, MarketplaceItems, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Marketplace" };
|
export const metadata = { title: "Marketplace" };
|
||||||
|
|
||||||
// state == 1 → an active, unsold offer in the Arcturus marketplace.
|
// state == 1 → an active, unsold offer in the Arcturus marketplace.
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
import CopyReferralButton from "./CopyReferralButton";
|
import CopyReferralButton from "./CopyReferralButton";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "My dashboard" };
|
export const metadata = { title: "My dashboard" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ claimed?: string; error?: string }>;
|
type SearchParams = Promise<{ claimed?: string; error?: string }>;
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
accepted?: string;
|
accepted?: string;
|
||||||
declined?: string;
|
declined?: string;
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import { excerpt } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { sanitize } from "@/lib/sanitize";
|
import { sanitize } from "@/lib/sanitize";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
comment?: string;
|
comment?: string;
|
||||||
reaction?: string;
|
reaction?: string;
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { db, WebsiteArticles } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "News" };
|
export const metadata = { title: "News" };
|
||||||
|
|
||||||
export default async function NewsPage() {
|
export default async function NewsPage() {
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
async function getHotelData() {
|
async function getHotelData() {
|
||||||
const [hotelName, imagerRaw, logo] = await Promise.all([
|
const [hotelName, imagerRaw, logo] = await Promise.all([
|
||||||
resolveHotelName(),
|
resolveHotelName(),
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { CameraWeb, db } from "@/lib/db";
|
import { CameraWeb, db } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Photos" };
|
export const metadata = { title: "Photos" };
|
||||||
|
|
||||||
type Photo = {
|
type Photo = {
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { PollVoteForm } from "./poll-vote-form";
|
import { PollVoteForm } from "./poll-vote-form";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function PollDetailPage({
|
export default async function PollDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { db, WebsitePoll, WebsitePollQuestion } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Polls" };
|
export const metadata = { title: "Polls" };
|
||||||
|
|
||||||
export default async function PollsPage() {
|
export default async function PollsPage() {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, RadioApplications } from "@/lib/db";
|
import { db, RadioApplications } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
const accent =
|
const accent =
|
||||||
tone === "error" ? "var(--color-danger)" : "var(--color-primary)";
|
tone === "error" ? "var(--color-danger)" : "var(--color-primary)";
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { db, RadioContests } from "@/lib/db";
|
import { db, RadioContests } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RadioContestDetailPage({
|
export default async function RadioContestDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, RadioContests } from "@/lib/db";
|
import { db, RadioContests } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RadioContestsPage() {
|
export default async function RadioContestsPage() {
|
||||||
const t = await getTranslations("pages.radioContests");
|
const t = await getTranslations("pages.radioContests");
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { db, RadioGiveaways } from "@/lib/db";
|
import { db, RadioGiveaways } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RadioGiveawayDetailPage({
|
export default async function RadioGiveawayDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, RadioGiveaways } from "@/lib/db";
|
import { db, RadioGiveaways } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RadioGiveawaysPage() {
|
export default async function RadioGiveawaysPage() {
|
||||||
const t = await getTranslations("pages.radioGiveaways");
|
const t = await getTranslations("pages.radioGiveaways");
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import Link from "next/link";
|
|||||||
import { getTranslations } from "next-intl/server";
|
import { getTranslations } from "next-intl/server";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
const RADIO_SIDEBAR_LINKS = [
|
const RADIO_SIDEBAR_LINKS = [
|
||||||
{ key: "schedule", href: "/radio/schedule", icon: "🗓️" },
|
{ key: "schedule", href: "/radio/schedule", icon: "🗓️" },
|
||||||
{ key: "shouts", href: "/radio/shouts", icon: "📣" },
|
{ key: "shouts", href: "/radio/shouts", icon: "📣" },
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { db } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type LeaderRow = {
|
type LeaderRow = {
|
||||||
username: string;
|
username: string;
|
||||||
look: string;
|
look: string;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState, OnlineBadge } from "@/components/public/ui";
|
|||||||
import { db, RadioSchedules, User } from "@/lib/db";
|
import { db, RadioSchedules, User } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Radio config + today's schedule are read live from the DB / settings table.
|
// Radio config + today's schedule are read live from the DB / settings table.
|
||||||
|
|
||||||
// Canonical weekday order so today's slots come out chronologically and we can
|
// Canonical weekday order so today's slots come out chronologically and we can
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, RadioSongRequests, User } from "@/lib/db";
|
import { db, RadioSongRequests, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { ContentCard, EmptyState } from "@/components/public/ui";
|
import { ContentCard, EmptyState } from "@/components/public/ui";
|
||||||
import { db, RadioSchedules, User } from "@/lib/db";
|
import { db, RadioSchedules, User } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Weekly order so the table reads Monday → Sunday regardless of insert order.
|
// Weekly order so the table reads Monday → Sunday regardless of insert order.
|
||||||
// The `day` column stores a free-form string; we key case-insensitively.
|
// The `day` column stores a free-form string; we key case-insensitively.
|
||||||
const DAYS = [
|
const DAYS = [
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ import { db, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Rankings" };
|
export const metadata = { title: "Rankings" };
|
||||||
|
|
||||||
type TopUser = {
|
type TopUser = {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type RareRow = {
|
type RareRow = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Rare values" };
|
export const metadata = { title: "Rare values" };
|
||||||
|
|
||||||
type CategoryRow = {
|
type CategoryRow = {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
import RedeemForm from "./RedeemForm";
|
import RedeemForm from "./RedeemForm";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RedeemPage() {
|
export default async function RedeemPage() {
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (!session?.user?.id) redirect("/login");
|
if (!session?.user?.id) redirect("/login");
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function RegisterPage() {
|
export default async function RegisterPage() {
|
||||||
const th = await getTranslations("header");
|
const th = await getTranslations("header");
|
||||||
const tpr = await getTranslations("pages.register");
|
const tpr = await getTranslations("pages.register");
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { resetPassword } from "@/actions/password-reset";
|
import { resetPassword } from "@/actions/password-reset";
|
||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function ResetPage({
|
export default async function ResetPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { notFound } from "next/navigation";
|
|||||||
import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
||||||
import { db, Rooms, User } from "@/lib/db";
|
import { db, Rooms, User } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
// Arcturus stores room access as a short string on rooms.state. Map each known
|
// Arcturus stores room access as a short string on rooms.state. Map each known
|
||||||
// value to a friendly label + lock icon; unknown values fall back to the raw
|
// value to a friendly label + lock icon; unknown values fall back to the raw
|
||||||
// string so we never hide a real (future) state from the visitor.
|
// string so we never hide a real (future) state from the visitor.
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { db, Rooms, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata: Metadata = { title: "Search" };
|
export const metadata: Metadata = { title: "Search" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ q?: string }>;
|
type SearchParams = Promise<{ q?: string }>;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import { totpKeyUri } from "@/lib/auth/totp";
|
|||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function TwoFactorPage({
|
export default async function TwoFactorPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { db, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function SettingsPage() {
|
export default async function SettingsPage() {
|
||||||
const t = await getTranslations("pages.settings");
|
const t = await getTranslations("pages.settings");
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteLoginLogs } from "@/lib/db";
|
import { db, WebsiteLoginLogs } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{ signedOutAll?: string }>;
|
type SearchParams = Promise<{ signedOutAll?: string }>;
|
||||||
|
|
||||||
/** Tiny user-agent → "Browser on OS" summary (no dependency). */
|
/** Tiny user-agent → "Browser on OS" summary (no dependency). */
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { db, WebsiteShopArticles, WebsiteShopCategories } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { creditsPerUnit } from "@/lib/services/paypal";
|
import { creditsPerUnit } from "@/lib/services/paypal";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Shop" };
|
export const metadata = { title: "Shop" };
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ import {
|
|||||||
} from "@/lib/services/paypal";
|
} from "@/lib/services/paypal";
|
||||||
import TopUpForm from "./TopUpForm";
|
import TopUpForm from "./TopUpForm";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function TopUpPage({
|
export default async function TopUpPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, User, WebsiteTeams } from "@/lib/db";
|
import { db, User, WebsiteTeams } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Staff" };
|
export const metadata = { title: "Staff" };
|
||||||
|
|
||||||
type StaffMember = {
|
type StaffMember = {
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
friend?: string;
|
friend?: string;
|
||||||
guestbook?: string;
|
guestbook?: string;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { isValidVerificationToken } from "@/actions/email-verify";
|
import { isValidVerificationToken } from "@/actions/email-verify";
|
||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type Status = "verified" | "already" | "invalid" | "unavailable";
|
type Status = "verified" | "already" | "invalid" | "unavailable";
|
||||||
|
|
||||||
function StatusCard({
|
function StatusCard({
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { StatusCard } from "@/components/admin/dashboard";
|
|||||||
import { Achievements, db } from "@/lib/db";
|
import { Achievements, db } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type Achievement = {
|
type Achievement = {
|
||||||
name: string;
|
name: string;
|
||||||
category: string;
|
category: string;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { db, WebsiteAds } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EditAdDeleteButton } from "../edit-ad-delete-button";
|
import { EditAdDeleteButton } from "../edit-ad-delete-button";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EditAd({
|
export default async function EditAd({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { createAd } from "@/actions/admin-ads";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function NewAd() {
|
export default async function NewAd() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { formatDate } from "@/lib/format-date";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { AdsTable } from "./ads-table";
|
import { AdsTable } from "./ads-table";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminAds() {
|
export default async function AdminAds() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { AlertLogs, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
const CRITICAL = new Set(["critical", "error", "danger"]);
|
const CRITICAL = new Set(["critical", "error", "danger"]);
|
||||||
const WARNING = new Set(["warning", "warn"]);
|
const WARNING = new Set(["warning", "warn"]);
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { Ban, db, User } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type DayRow = {
|
type DayRow = {
|
||||||
label: string;
|
label: string;
|
||||||
chats: number;
|
chats: number;
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ import {
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type EconomyData = {
|
type EconomyData = {
|
||||||
totalCredits: number;
|
totalCredits: number;
|
||||||
totalPixels: number;
|
totalPixels: number;
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ import { Ban, db, Rooms, RoomTradeLog, User } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type AnalyticsData = {
|
type AnalyticsData = {
|
||||||
totalUsers: number;
|
totalUsers: number;
|
||||||
onlineUsers: number;
|
onlineUsers: number;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { db, User, WebsiteStaffApplications } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type ApplicationRow = {
|
type ApplicationRow = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
userId: number;
|
userId: number;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteArticles } from "@/lib/db";
|
import { db, WebsiteArticles } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EditArticle({
|
export default async function EditArticle({
|
||||||
params,
|
params,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { createArticle } from "@/actions/admin-articles";
|
|||||||
import { ArticleForm } from "@/components/admin/article-form";
|
import { ArticleForm } from "@/components/admin/article-form";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function NewArticle({
|
export default async function NewArticle({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ import { db, User, WebsiteArticles } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminArticles({
|
export default async function AdminArticles({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteBadges } from "@/lib/db";
|
import { db, WebsiteBadges } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export const metadata = { title: "Badges" };
|
export const metadata = { title: "Badges" };
|
||||||
|
|
||||||
export default async function AdminBadges({
|
export default async function AdminBadges({
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { db, WebsiteBanner } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { BannersManager } from "./banners-manager";
|
import { BannersManager } from "./banners-manager";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function BannersPage() {
|
export default async function BannersPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.BANNERS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.BANNERS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ import { Ban, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminBans() {
|
export default async function AdminBans() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.BANS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.BANS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type Campaign = {
|
type Campaign = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
type Campaign = {
|
type Campaign = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import { loadCatalogItemsData } from "@/lib/services/catalog-items-loader";
|
|||||||
import { getAncestors } from "@/lib/services/catalog-tree";
|
import { getAncestors } from "@/lib/services/catalog-tree";
|
||||||
import { CatalogDetailTabs } from "./catalog-detail-tabs";
|
import { CatalogDetailTabs } from "./catalog-detail-tabs";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function CatalogEditPage({
|
export default async function CatalogEditPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { CatalogItemsBc, CatalogPagesBc, db } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { BcPageDetail } from "../bc-manager";
|
import { BcPageDetail } from "../bc-manager";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function BcPageDetailPage({
|
export default async function BcPageDetailPage({
|
||||||
params: paramsPromise,
|
params: paramsPromise,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default function BuilderClubPage() {
|
export default function BuilderClubPage() {
|
||||||
redirect("/admin/catalog?catalog=bc");
|
redirect("/admin/catalog?catalog=bc");
|
||||||
}
|
}
|
||||||
@@ -31,6 +31,10 @@ import { CatalogManagerDialog } from "./catalog-manager-dialog-wrapper";
|
|||||||
import { CatalogTable } from "./catalog-table";
|
import { CatalogTable } from "./catalog-table";
|
||||||
import { CatalogViewToggle } from "./catalog-view-toggle";
|
import { CatalogViewToggle } from "./catalog-view-toggle";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
async function rawRows<T>(query: ReturnType<typeof sql>): Promise<T[]> {
|
async function rawRows<T>(query: ReturnType<typeof sql>): Promise<T[]> {
|
||||||
const [rows] = (await db.execute(query)) as unknown as [T[], unknown];
|
const [rows] = (await db.execute(query)) as unknown as [T[], unknown];
|
||||||
return rows ?? [];
|
return rows ?? [];
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
import { CommandocentrumControls } from "./commandocentrum-controls";
|
import { CommandocentrumControls } from "./commandocentrum-controls";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
function decodeStacktrace(raw: unknown): string {
|
function decodeStacktrace(raw: unknown): string {
|
||||||
if (raw == null) return "";
|
if (raw == null) return "";
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { Card, CardContent } from "@/components/ui/card";
|
|||||||
import { db, EmulatorErrors } from "@/lib/db";
|
import { db, EmulatorErrors } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EmulatorErrorsPage({
|
export default async function EmulatorErrorsPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { db, EmulatorErrors, EmulatorSettings } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { HealthCheckClient } from "./health-check-client";
|
import { HealthCheckClient } from "./health-check-client";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
async function getDevOpsData() {
|
async function getDevOpsData() {
|
||||||
const now = Math.floor(Date.now() / 1000);
|
const now = Math.floor(Date.now() / 1000);
|
||||||
const dayAgo = now - 86400;
|
const dayAgo = now - 86400;
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, EmailTemplates } from "@/lib/db";
|
import { db, EmailTemplates } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminEmailTemplates() {
|
export default async function AdminEmailTemplates() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, EmulatorSettings, EmulatorTexts } from "@/lib/db";
|
import { db, EmulatorSettings, EmulatorTexts } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
const TEXTS_LIMIT = 300;
|
const TEXTS_LIMIT = 300;
|
||||||
|
|
||||||
export default async function AdminEmulator() {
|
export default async function AdminEmulator() {
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ import { EventPrizesManager } from "./event-prizes";
|
|||||||
import { EventRegistrations } from "./event-registrations";
|
import { EventRegistrations } from "./event-registrations";
|
||||||
import { EventWinnersManager } from "./event-winners";
|
import { EventWinnersManager } from "./event-winners";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EventDetailPage({
|
export default async function EventDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import { db, WebsiteEventType } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EventForm } from "../event-form";
|
import { EventForm } from "../event-form";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function CreateEventPage() {
|
export default async function CreateEventPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { db, WebsiteEvent, WebsiteEventType } from "@/lib/db";
|
|||||||
import { PERMS } from "@/lib/permissions";
|
import { PERMS } from "@/lib/permissions";
|
||||||
import { EventsTable } from "./events-table";
|
import { EventsTable } from "./events-table";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EventsPage({
|
export default async function EventsPage({
|
||||||
params: paramsPromise,
|
params: paramsPromise,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { db, WebsiteEventType } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EventTypesManager } from "./event-types-manager";
|
import { EventTypesManager } from "./event-types-manager";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function EventTypesPage() {
|
export default async function EventTypesPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { db, WebsiteSetting } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { FaviconForm } from "./favicon-form";
|
import { FaviconForm } from "./favicon-form";
|
||||||
|
|
||||||
|
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||||
|
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminFaviconPage() {
|
export default async function AdminFaviconPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.SETTINGS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.SETTINGS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
Loaded 100 of 274 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user