fix: temporarily lock tasker dark theme
This commit is contained in:
@@ -10,7 +10,7 @@ import { Links, Meta, Outlet, Scripts } from "react-router";
|
||||
import type { LinksFunction } from "react-router";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
// plane imports
|
||||
import { SITE_DESCRIPTION, SITE_NAME } from "@plane/constants";
|
||||
import { NODEDC_FORCED_THEME, NODEDC_THEME_LOCK_ENABLED, SITE_DESCRIPTION, SITE_NAME, THEMES } from "@plane/constants";
|
||||
import { cn } from "@plane/utils";
|
||||
// types
|
||||
// assets
|
||||
@@ -24,9 +24,12 @@ import { NodeDCSessionSync } from "@/components/auth-screens/nodedc-session-sync
|
||||
import { CustomErrorComponent } from "./error";
|
||||
import { AppProvider } from "./provider";
|
||||
// fonts
|
||||
// oxlint-disable-next-line import/no-unassigned-import
|
||||
import "@fontsource-variable/inter";
|
||||
import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
|
||||
// oxlint-disable-next-line import/no-unassigned-import
|
||||
import "@fontsource/material-symbols-rounded";
|
||||
// oxlint-disable-next-line import/no-unassigned-import
|
||||
import "@fontsource/ibm-plex-mono";
|
||||
|
||||
const APP_TITLE = "NODE.DC | Self-hosted task management workspace.";
|
||||
@@ -110,15 +113,20 @@ export function Layout({ children }: { children: ReactNode }) {
|
||||
const isSessionRecorderEnabled = parseInt(process.env.VITE_ENABLE_SESSION_RECORDER || "0");
|
||||
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning style={designConfigStyle}>
|
||||
<html
|
||||
lang="en"
|
||||
data-theme={NODEDC_THEME_LOCK_ENABLED ? NODEDC_FORCED_THEME : undefined}
|
||||
suppressHydrationWarning
|
||||
style={designConfigStyle}
|
||||
>
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#fff" />
|
||||
<meta name="theme-color" content={NODEDC_THEME_LOCK_ENABLED ? "#111113" : "#fff"} />
|
||||
{/* Meta info for PWA */}
|
||||
<meta name="application-name" content="NODE.DC" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content={NODEDC_THEME_LOCK_ENABLED ? "black" : "default"} />
|
||||
<meta name="apple-mobile-web-app-title" content={SITE_NAME} />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
@@ -128,7 +136,14 @@ export function Layout({ children }: { children: ReactNode }) {
|
||||
<body suppressHydrationWarning>
|
||||
<div id="context-menu-portal" />
|
||||
<div id="editor-portal" />
|
||||
<ThemeProvider themes={["light", "dark", "light-contrast", "dark-contrast", "custom"]} defaultTheme="system">
|
||||
<ThemeProvider
|
||||
attribute="data-theme"
|
||||
themes={THEMES}
|
||||
defaultTheme={NODEDC_THEME_LOCK_ENABLED ? NODEDC_FORCED_THEME : "system"}
|
||||
forcedTheme={NODEDC_THEME_LOCK_ENABLED ? NODEDC_FORCED_THEME : undefined}
|
||||
enableSystem={!NODEDC_THEME_LOCK_ENABLED}
|
||||
disableTransitionOnChange
|
||||
>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
<Scripts />
|
||||
|
||||
Reference in New Issue
Block a user