- }
- onClick={() => navigate("/")}
- style={{ alignSelf: "flex-start" }}
- >
- Back
-
+
+
+ }
+ onClick={() => navigate("/")}
+ style={{ alignSelf: "flex-start" }}
+ >
+ Back
+
-
+
-
-
+
+
+
+
+
);
};
diff --git a/src/renderer/src/util/themeModeContext.ts b/src/renderer/src/util/themeModeContext.ts
new file mode 100644
index 0000000..3b6e187
--- /dev/null
+++ b/src/renderer/src/util/themeModeContext.ts
@@ -0,0 +1,18 @@
+import { createContext, useContext } from "react";
+
+export type ThemeModeContextValue = {
+ isDarkMode: boolean;
+ setDarkMode: (enabled: boolean) => void;
+};
+
+export const ThemeModeContext = createContext(
+ null,
+);
+
+export function useThemeMode(): ThemeModeContextValue {
+ const context = useContext(ThemeModeContext);
+ if (!context) {
+ throw new Error("useThemeMode must be used within ThemeModeContext.");
+ }
+ return context;
+}
diff --git a/src/util/translations/en-US/renderer.json b/src/util/translations/en-US/renderer.json
index 5701936..80ce4eb 100644
--- a/src/util/translations/en-US/renderer.json
+++ b/src/util/translations/en-US/renderer.json
@@ -1,83 +1,88 @@
{
- "translation": {
- "auth": {
- "labels": {
- "welcome": "Hi {{name}}"
- },
- "login": {
- "error": "The username and password combination provided is not valid.",
- "login": "Log In",
- "resetpassword": "Reset Password"
- }
- },
- "dashboard": {
- "actions": {
- "clear_all": "Clear All"
- },
- "labels": {
- "dashboard": "Dashboard",
- "estimate_scrub_history": "Scrub History",
- "last_processed": "Last Processed at",
- "scrub_results": "Scrub Results",
- "total_estimates": "Total Estimates"
- }
- },
- "errors": {
- "errorboundary": "Uh oh - we've hit an error.",
- "notificationtitle": "Error Encountered"
- },
- "navigation": {
- "home": "Home",
- "settings": "Settings",
- "signout": "Sign Out"
- },
- "settings": {
- "actions": {
- "addpath": "Add path",
- "startwatcher": "Start Watcher",
- "stopwatcher": "Stop Watcher\n"
- },
- "errors": {
- "duplicatePath": "The selected directory is already used in another configuration."
- },
- "labels": {
- "actions": "Actions",
- "addPaintScalePath": "Add Paint Scale Path",
- "config": "Configuration",
- "emsOutFilePath": "EMS Out File Path (Parts Order, etc.)",
- "esApiKey": "Estimate Scrubber API Key",
- "invalidPath": "Path not set or invalid",
- "paintScalePath": "Paint Scale Path",
- "paintScaleSettingsInput": "BSMS To Paint Scale",
- "paintScaleSettingsOutput": "Paint Scale To BSMS",
- "paintScaleType": "Paint Scale Type",
- "pollingInterval": "Polling Interval (m)",
- "pollinginterval": "Polling Interval (ms)",
- "ppcfilepath": "Parts Price Change File Path",
- "remove": "Remove",
- "selectPaintScaleType": "Select Paint Scale Type",
- "started": "Started",
- "stopped": "Stopped",
- "validPath": "Valid path",
- "watchedpaths": "Watched Paths",
- "watchermodepolling": "Polling",
- "watchermoderealtime": "Real Time",
- "watcherstatus": "Watcher Status"
- },
- "validation": {
- "esApiKeyRequired": "Estimate Scrubber API Key is required."
- }
- },
- "title": {
- "imex": "ImEX Online",
- "rome": "Rome Online"
- },
- "updates": {
- "apply": "Apply Update",
- "applying": "Applying update",
- "available": "An update is available.",
- "download": "Download Update",
- "downloading": "An update is downloading."
- }
- }
+ "translation": {
+ "auth": {
+ "labels": {
+ "welcome": "Hi {{name}}"
+ },
+ "login": {
+ "error": "The username and password combination provided is not valid.",
+ "login": "Log In",
+ "resetpassword": "Reset Password"
+ }
+ },
+ "dashboard": {
+ "actions": {
+ "clear_all": "Clear All"
+ },
+ "labels": {
+ "dashboard": "Dashboard",
+ "estimate_scrub_history": "Scrub History",
+ "last_processed": "Last Processed at",
+ "scrub_results": "Scrub Results",
+ "total_estimates": "Total Estimates"
+ }
+ },
+ "errors": {
+ "errorboundary": "Uh oh - we've hit an error.",
+ "notificationtitle": "Error Encountered"
+ },
+ "navigation": {
+ "home": "Home",
+ "settings": "Settings",
+ "signout": "Sign Out"
+ },
+ "settings": {
+ "actions": {
+ "addpath": "Add path",
+ "startwatcher": "Start Watcher",
+ "stopwatcher": "Stop Watcher\n"
+ },
+ "errors": {
+ "duplicatePath": "The selected directory is already used in another configuration."
+ },
+ "labels": {
+ "actions": "Actions",
+ "addPaintScalePath": "Add Paint Scale Path",
+ "appearance": "Appearance",
+ "config": "Configuration",
+ "dark": "Dark",
+ "darkMode": "Dark Mode",
+ "darkModeDescription": "Use the dark application theme.",
+ "emsOutFilePath": "EMS Out File Path (Parts Order, etc.)",
+ "esApiKey": "Estimate Scrubber API Key",
+ "invalidPath": "Path not set or invalid",
+ "light": "Light",
+ "paintScalePath": "Paint Scale Path",
+ "paintScaleSettingsInput": "BSMS To Paint Scale",
+ "paintScaleSettingsOutput": "Paint Scale To BSMS",
+ "paintScaleType": "Paint Scale Type",
+ "pollingInterval": "Polling Interval (m)",
+ "pollinginterval": "Polling Interval (ms)",
+ "ppcfilepath": "Parts Price Change File Path",
+ "remove": "Remove",
+ "selectPaintScaleType": "Select Paint Scale Type",
+ "started": "Started",
+ "stopped": "Stopped",
+ "validPath": "Valid path",
+ "watchedpaths": "Watched Paths",
+ "watchermodepolling": "Polling",
+ "watchermoderealtime": "Real Time",
+ "watcherstatus": "Watcher Status"
+ },
+ "validation": {
+ "esApiKeyRequired": "Estimate Scrubber API Key is required."
+ }
+ },
+ "title": {
+ "imex": "ImEX Online",
+ "rome": "Rome Online"
+ },
+ "updates": {
+ "apply": "Apply Update",
+ "applying": "Applying update",
+ "available": "An update is available.",
+ "download": "Download Update",
+ "downloading": "An update is downloading."
+ }
+ }
}