fix: migrate to tailwind v4 and TS6, add oauth2 dashboard_host setting

- migrate Tailwind v3->v4 (postcss @tailwindcss/postcss, CSS-first @theme/@plugin/@custom-variant)
- fix TS6 build: ignoreDeprecations for baseUrl, react-day-picker v10 classNames, test type fixes
- add dashboard_host setting field with i18n
This commit is contained in:
naiba
2026-06-06 01:39:25 +00:00
parent ee99e93e5e
commit 2ff923220f
23 changed files with 154 additions and 82 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, expect, test, vi } from "vitest"
const realFetch = global.fetch
const realFetch = globalThis.fetch
function setCookie(value: string) {
Object.defineProperty(document, "cookie", { value, configurable: true })
@@ -19,7 +19,7 @@ beforeEach(() => {
})
afterEach(() => {
global.fetch = realFetch
globalThis.fetch = realFetch
vi.restoreAllMocks()
})
@@ -31,7 +31,7 @@ test("auto refresh is deferred while nz-csrf cookie is missing", async () => {
const { FetcherMethod, fetcher } = await import("../api/api")
setCookie("nz-jwt=session") // jwt present, but no nz-csrf yet
const urls: string[] = []
global.fetch = vi.fn(async (input: any) => {
globalThis.fetch = vi.fn(async (input: any) => {
urls.push(String(input))
return jsonOk()
}) as unknown as typeof fetch
@@ -46,7 +46,7 @@ test("auto refresh is deferred while nz-csrf cookie is missing", async () => {
test("auto refresh fires after nz-csrf cookie becomes available", async () => {
const { FetcherMethod, fetcher } = await import("../api/api")
const urls: string[] = []
global.fetch = vi.fn(async (input: any) => {
globalThis.fetch = vi.fn(async (input: any) => {
urls.push(String(input))
return jsonOk()
}) as unknown as typeof fetch