fix dark demo theme and bump deps
This commit is contained in:
parent
a88e4b3ba4
commit
d67d80eb41
4 changed files with 441 additions and 349 deletions
|
|
@ -1,4 +1,3 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm run lint:staged
|
||||
|
|
|
|||
770
package-lock.json
generated
770
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
|
@ -92,7 +92,7 @@
|
|||
"@types/diff": "^5.2.1",
|
||||
"@types/hogan.js": "3.0.5",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.14.10",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/nopt": "3.0.32",
|
||||
"@typescript-eslint/eslint-plugin": "6.18.1",
|
||||
"@typescript-eslint/parser": "6.18.1",
|
||||
|
|
@ -110,13 +110,13 @@
|
|||
"eslint-plugin-json": "3.1.0",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-optimize-regex": "1.2.1",
|
||||
"eslint-plugin-promise": "^6.4.0",
|
||||
"eslint-plugin-promise": "^6.5.1",
|
||||
"eslint-plugin-sonarjs": "0.23.0",
|
||||
"file-loader": "6.2.0",
|
||||
"handlebars": "4.7.8",
|
||||
"handlebars-loader": "1.7.3",
|
||||
"html-webpack-plugin": "5.6.0",
|
||||
"husky": "^9.0.11",
|
||||
"husky": "^9.1.1",
|
||||
"image-webpack-loader": "8.1.0",
|
||||
"is-ci-cli": "2.2.0",
|
||||
"jest": "29.7.0",
|
||||
|
|
@ -130,13 +130,13 @@
|
|||
"postcss-import": "^16.1.0",
|
||||
"postcss-loader": "^8.1.1",
|
||||
"postcss-preset-env": "^9.6.0",
|
||||
"prettier": "^3.3.2",
|
||||
"ts-jest": "^29.2.0",
|
||||
"prettier": "^3.3.3",
|
||||
"ts-jest": "^29.2.3",
|
||||
"ts-loader": "9.5.1",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "^5.5.3",
|
||||
"url-loader": "4.1.1",
|
||||
"webpack": "^5.92.1",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "5.1.4",
|
||||
"webpack-dev-server": "^5.0.4",
|
||||
"whatwg-fetch": "3.6.20"
|
||||
|
|
|
|||
|
|
@ -125,8 +125,15 @@ function getConfiguration(urlParams: URLParams): Diff2HtmlUIConfig {
|
|||
// Removing `diff` and `diffTooBigMessage` form `urlParams` to avoid being inserted
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { diff, diffTooBigMessage, ...urlParamsRest } = urlParams;
|
||||
|
||||
const defaultColorScheme: ColorSchemeType =
|
||||
window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
? ColorSchemeType.DARK
|
||||
: ColorSchemeType.LIGHT;
|
||||
|
||||
const config: URLParams = {
|
||||
...defaultDiff2HtmlUIConfig,
|
||||
colorScheme: defaultColorScheme,
|
||||
...urlParamsRest,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue