diff --git a/package.json b/package.json index c4ff9a1..92be4ac 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "dive-downloader", "description": "Download dives from any divecomputer with an electron app", "productName": "dive-downloader", - "version": "0.1.4", + "version": "0.1.5", "main": ".webpack/main", "scripts": { - "lint": "eslint . --ext .js,.jsx,.ts,.tsx", - "lint:fix": "eslint . --cache --fix --ext .js,.jsx,.ts,.tsx", + "lint": "eslint src --ext .js,.jsx,.ts,.tsx", + "lint:fix": "eslint src --cache --fix --ext .js,.jsx,.ts,.tsx", "package": "electron-forge package", "start": "electron-forge start", "test": "jest", @@ -81,48 +81,48 @@ "@electron-forge/plugin-auto-unpack-natives": "^6.0.0-beta.65", "@electron-forge/plugin-webpack": "^6.0.0-beta.65", "@electron-forge/publisher-github": "^6.0.0-beta.65", - "@svgr/webpack": "^6.3.1", - "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^13.2.0", + "@svgr/webpack": "^8.1.0", + "@testing-library/jest-dom": "^6.0.0", + "@testing-library/react": "^14.0.0", "@types/history": "5.0.0", - "@types/jest": "^27.5.1", - "@types/node": "17.0.33", + "@types/jest": "^29.5.3", + "@types/node": "20.5.0", "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", "@types/react-redux": "^7.1.24", "@types/redux-saga": "^0.10.5", "@types/styled-components": "^5.1.25", - "@typescript-eslint/eslint-plugin": "^5.31.0", - "@typescript-eslint/parser": "^5.31.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", "@vercel/webpack-asset-relocator-loader": "^1.7.3", "css-loader": "^6.7.1", "electron": "^19.0.10", "eslint": "^8.21.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.0.0", "eslint-plugin-compat": "^4.0.2", - "eslint-plugin-jest": "^26.7.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-jest": "^27.2.3", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "file-loader": "^6.0.0", - "fork-ts-checker-webpack-plugin": "^7.2.13", + "fork-ts-checker-webpack-plugin": "^8.0.0", "html-webpack-plugin": "^5.5.0", "husky": "^8.0.1", "identity-obj-proxy": "^3.0.0", - "jest": "^28.1.3", - "jest-environment-jsdom": "^28.1.3", - "lint-staged": "^12.4.1", + "jest": "^29.6.2", + "jest-environment-jsdom": "^29.6.2", + "lint-staged": "^14.0.0", "node-loader": "^2.0.0", - "node-sass": "^7.0.1", + "node-sass": "^9.0.0", "polished": "^4.2.2", - "prettier": "^2.6.2", - "sass-loader": "^12.6.0", + "prettier": "^3.0.1", + "sass-loader": "^13.3.2", "style-loader": "^3.3.1", - "ts-jest": "^28.0.2", + "ts-jest": "^29.1.1", "ts-loader": "^9.3.0", "ts-node": "^10.7.0", - "typescript": "^4.7.4", + "typescript": "^5.1.6", "url-loader": "^4.1.0" }, "dependencies": { @@ -130,7 +130,7 @@ "electron-debug": "^3.2.0", "electron-log": "^4.4.7", "electron-squirrel-startup": "^1.0.0", - "electron-updater": "^5.0.1", + "electron-updater": "^6.1.1", "history": "^5.3.0", "libdivecomputerjs": "^0.6.1", "react": "^18.1.0", @@ -138,8 +138,8 @@ "react-redux": "^8.0.1", "react-router-dom": "^6.3.0", "redux-saga": "^1.1.3", - "regenerator-runtime": "^0.13.9", - "styled-components": "^5.3.5" + "regenerator-runtime": "^0.14.0", + "styled-components": "^6.0.7" }, "devEngines": { "node": ">=10.x", diff --git a/src/components/Button.tsx b/src/components/Button.tsx index bf0cc27..5c35813 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -3,18 +3,18 @@ import styled, { css } from 'styled-components'; import style from '../styling'; export interface ButtonProps { - primary?: boolean; - flat?: boolean; - outline?: boolean; - disabled?: boolean; + $primary?: boolean; + $flat?: boolean; + $outline?: boolean; + $disabled?: boolean; } const color = (props: ButtonProps) => { - if (props.disabled) { + if (props.$disabled) { return style.colors.disabled; } - if (props.primary) { + if (props.$primary) { return style.colors.primary; } @@ -22,11 +22,11 @@ const color = (props: ButtonProps) => { }; const border = (props: ButtonProps) => - props.outline ? `1px solid ${color(props)}` : '0'; + props.$outline ? `1px solid ${color(props)}` : '0'; const background = (props: ButtonProps) => - props.flat || props.outline ? 'transparent' : color(props); + props.$flat || props.$outline ? 'transparent' : color(props); const fontColor = (props: ButtonProps) => - props.flat || props.outline ? color(props) : style.colors.background; + props.$flat || props.$outline ? color(props) : style.colors.background; export const ButtonCSS = css` color: ${fontColor}; diff --git a/src/components/ErrorNudge.tsx b/src/components/ErrorNudge.tsx index 98b42b0..0eb435a 100644 --- a/src/components/ErrorNudge.tsx +++ b/src/components/ErrorNudge.tsx @@ -28,7 +28,7 @@ export default function ErrorNudge({ return ( {message} - + diff --git a/src/components/FileInput.tsx b/src/components/FileInput.tsx index 69c21e2..73fe399 100644 --- a/src/components/FileInput.tsx +++ b/src/components/FileInput.tsx @@ -35,7 +35,7 @@ export default function SaveFileInput({ <>