This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 88054b2193f Add dark/light mode to simple auth manager (#48065)
88054b2193f is described below
commit 88054b2193fe07819ac323513b1b131967edf59e
Author: Brent Bovenzi <[email protected]>
AuthorDate: Sat Mar 22 08:15:52 2025 -0400
Add dark/light mode to simple auth manager (#48065)
---
.../api_fastapi/auth/managers/simple/ui/package.json | 5 +++--
.../api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml | 14 ++++++++++++++
.../api_fastapi/auth/managers/simple/ui/src/main.tsx | 3 +++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
index a26b9aad6b2..b14ec02226d 100644
--- a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
+++ b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json
@@ -15,11 +15,12 @@
"@chakra-ui/react": "^3.1.1",
"@tanstack/react-query": "^5.52.1",
"axios": "^1.8.2",
+ "next-themes": "^0.4.6",
"react": "^18.3.1",
+ "react-cookie": "^7.0.0",
"react-dom": "^18.3.1",
"react-hook-form": "^7.20.0",
- "react-router-dom": "^6.26.2",
- "react-cookie": "^7.0.0"
+ "react-router-dom": "^6.26.2"
},
"devDependencies": {
"@7nohe/openapi-react-query-codegen": "^1.6.0",
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
index d0c2f468571..430fb5411f9 100644
---
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
+++
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
@@ -17,6 +17,9 @@ importers:
axios:
specifier: ^1.8.2
version: 1.8.2
+ next-themes:
+ specifier: ^0.4.6
+ version: 0.4.6([email protected]([email protected]))([email protected])
react:
specifier: ^18.3.1
version: 18.3.1
@@ -1589,6 +1592,12 @@ packages:
[email protected]:
resolution: {integrity:
sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
+ [email protected]:
+ resolution: {integrity:
sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==}
+ peerDependencies:
+ react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
+
[email protected]:
resolution: {integrity:
sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==}
@@ -3835,6 +3844,11 @@ snapshots:
[email protected]: {}
+ [email protected]([email protected]([email protected]))([email protected]):
+ dependencies:
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+
[email protected]: {}
[email protected]: {}
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/main.tsx
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/main.tsx
index 2c9f074db64..da1e461ff19 100644
--- a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/main.tsx
+++ b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/main.tsx
@@ -18,6 +18,7 @@
*/
import { ChakraProvider, defaultSystem } from "@chakra-ui/react";
import { createRoot } from "react-dom/client";
+import { ThemeProvider } from "next-themes";
import { RouterProvider } from "react-router-dom";
import { router } from "src/router";
import { QueryClientProvider } from "@tanstack/react-query";
@@ -25,8 +26,10 @@ import { queryClient } from "./queryClient";
createRoot(document.querySelector("#root") as HTMLDivElement).render(
<ChakraProvider value={defaultSystem}>
+ <ThemeProvider attribute="class" disableTransitionOnChange>
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
+ </ThemeProvider>
</ChakraProvider>
);