From d1177d526898da0597718e5f4b2307ea558db100 Mon Sep 17 00:00:00 2001 From: Matt Goldspink Date: Sun, 22 Jan 2023 08:27:57 -0800 Subject: Adding dark mode support. This initial version is done based on the OS theme (so it'll only be dark mode if the OS setting is dark mode). In order for this to work I've added the customised less files for semantic locally and this requires a change from the react build scripts to craco because react doesn't support less compilation. I've verified as many screens as I can to make sure they're all looking ok but I'm sure I missed some parts. CodeMirror needs a slightly different solution which needed JS code to detect the current theme. The color scheme is heavily based on githubs dark mode and is using mostly css variable support. This should make it easy to tweak in the future too. --- src/web/package.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/web/package.json') diff --git a/src/web/package.json b/src/web/package.json index e87d4505..4c865a74 100644 --- a/src/web/package.json +++ b/src/web/package.json @@ -4,11 +4,11 @@ "private": true, "homepage": ".", "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "test-unattended": "react-scripts test --watchAll false --passWithNoTests", - "eject": "react-scripts eject", + "start": "craco start", + "build": "craco build", + "test": "craco test", + "test-unattended": "craco test --watchAll false --passWithNoTests", + "eject": "craco eject", "postinstall": "semantic-ui-css-patch", "lint": "eslint .", "lint:fix": "eslint --fix ." @@ -25,13 +25,15 @@ "react-responsive": "^9.0.0-beta.5", "react-router-dom": "^5.0.0", "react-toastify": "^9.0.1", - "semantic-ui-css": "^2.4.1", + "semantic-ui-less": "^2.5.0", "semantic-ui-react": "^2.1.0", "signalr": "^2.4.1", "uuid": "^8.3.0", "yaml": "^1.10.2" }, "devDependencies": { + "@craco/craco": "^7.0.0", + "@semantic-ui-react/craco-less": "^3.0.0", "@semantic-ui-react/css-patch": "^1.0.0", "eslint": "^8.16.0", "react-scripts": "^5.0.0" -- cgit v1.2.3