diff --git a/package-lock.json b/package-lock.json
index 74e9f57..ea81c4b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,9 +8,11 @@
"name": "picrinth-admin",
"version": "0.0.0",
"dependencies": {
+ "@material/material-color-utilities": "^0.3.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
- "react-router-dom": "^7.7.1"
+ "react-router-dom": "^7.7.1",
+ "react-toastify": "^11.0.5"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
@@ -1023,6 +1025,12 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@material/material-color-utilities": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@material/material-color-utilities/-/material-color-utilities-0.3.0.tgz",
+ "integrity": "sha512-ztmtTd6xwnuh2/xu+Vb01btgV8SQWYCaK56CkRK8gEkWe5TuDyBcYJ0wgkMRn+2VcE9KUmhvkz+N9GHrqw/C0g==",
+ "license": "Apache-2.0"
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1894,6 +1902,15 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -2947,6 +2964,19 @@
"react-dom": ">=18"
}
},
+ "node_modules/react-toastify": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-11.0.5.tgz",
+ "integrity": "sha512-EpqHBGvnSTtHYhCPLxML05NLY2ZX0JURbAdNYa6BUkk+amz4wbKBQvoKQAB0ardvSarUBuY4Q4s1sluAzZwkmA==",
+ "license": "MIT",
+ "dependencies": {
+ "clsx": "^2.1.1"
+ },
+ "peerDependencies": {
+ "react": "^18 || ^19",
+ "react-dom": "^18 || ^19"
+ }
+ },
"node_modules/resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
diff --git a/package.json b/package.json
index 53d5769..b4a937f 100644
--- a/package.json
+++ b/package.json
@@ -10,9 +10,11 @@
"preview": "vite preview"
},
"dependencies": {
+ "@material/material-color-utilities": "^0.3.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
- "react-router-dom": "^7.7.1"
+ "react-router-dom": "^7.7.1",
+ "react-toastify": "^11.0.5"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
diff --git a/public/test.mp4 b/public/test.mp4
new file mode 100644
index 0000000..9b0c25e
Binary files /dev/null and b/public/test.mp4 differ
diff --git a/src/App.tsx b/src/App.tsx
index cc3821b..b3c418c 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,7 +1,14 @@
import { BrowserRouter as Router, Routes, Route, Navigate, Outlet, useLocation } from 'react-router-dom';
-import {useContext, useEffect, useState } from "react";
+import {useEffect, useState } from "react";
-import AuthContext, { AuthProvider } from "./auth/auth-provider"
+import { ToastContainer } from "react-toastify";
+import {
+ argbFromHex,
+ themeFromSourceColor,
+ applyTheme,
+} from "@material/material-color-utilities";
+
+import { AuthProvider } from "./auth/auth-provider"
import ping from "./auth/ping";
import Login from "./pages/login/login"
@@ -14,8 +21,22 @@ import useAuth from './auth/auth';
function App() {
+ const theme = themeFromSourceColor(argbFromHex("ffddaf"));
+ const systemDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
+ applyTheme(theme, { target: document.body, dark: systemDark });
return (