diff --git a/.dockerignore b/.dockerignore index 3a8d385..8bb6aa8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,7 +12,6 @@ Dockerfile .eslintcache .eslintrc.json .prettierignore -eslint.config.js .idea .vscode dist diff --git a/Dockerfile b/Dockerfile index 62e86ff..59573f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM node:current-alpine as build +FROM node:current-alpine AS build WORKDIR /app -ENV PATH /app/node_modules/.bin:$PATH +ENV PATH=/app/node_modules/.bin:$PATH COPY package.json ./ diff --git a/package.json b/package.json index fbaeed8..fbb90a2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "graphemer": "^1.4.0", "react": "^19.1.0", "react-dom": "^19.1.0", - "react-ga4": "^2.1.0", "react-router-dom": "^7.5.3" }, "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 106a15c..38ffc98 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -372,9 +372,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.20" +version = "1.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" +checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" dependencies = [ "shlex", ] @@ -754,9 +754,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" dependencies = [ "serde", ] @@ -4120,7 +4120,7 @@ dependencies = [ "serde_spanned", "toml_datetime", "toml_write", - "winnow 0.7.8", + "winnow 0.7.9", ] [[package]] @@ -5143,9 +5143,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e27d6ad3dac991091e4d35de9ba2d2d00647c5d0fc26c5496dee55984ae111b" +checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3" dependencies = [ "memchr", ] @@ -5339,7 +5339,7 @@ dependencies = [ "tracing", "uds_windows", "windows-sys 0.59.0", - "winnow 0.7.8", + "winnow 0.7.9", "xdg-home", "zbus_macros", "zbus_names", @@ -5369,7 +5369,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", - "winnow 0.7.8", + "winnow 0.7.9", "zvariant", ] @@ -5447,7 +5447,7 @@ dependencies = [ "serde", "static_assertions", "url", - "winnow 0.7.8", + "winnow 0.7.9", "zvariant_derive", "zvariant_utils", ] @@ -5476,5 +5476,5 @@ dependencies = [ "serde", "static_assertions", "syn 2.0.101", - "winnow 0.7.8", + "winnow 0.7.9", ] diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9c81e73..cbdaf60 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -78,15 +78,15 @@ async fn generate_passwords( } } - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); let chars = graphemes.collect::>(); for _n in 0..amount { let mut can_continue = false; while !can_continue { let mut password = String::from(""); - let length = rng.gen_range(min_length..(max_length + 1)); + let length = rng.random_range(min_length..(max_length + 1)); for _j in 0..length { - let index = rng.gen_range(0..char_count); + let index = rng.random_range(0..char_count); password.push_str(chars.clone()[index]); } diff --git a/src/components/App/index.jsx b/src/components/App/index.jsx index 0f1dd32..adddb3a 100644 --- a/src/components/App/index.jsx +++ b/src/components/App/index.jsx @@ -8,13 +8,11 @@ import { createTheme, ThemeProvider } from '@mui/material/styles'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import { platform } from '@tauri-apps/plugin-os'; -import ReactGA from 'react-ga4'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; import packageJson from '../../../package.json'; import { MainContext } from '../../contexts/MainContextProvider'; import { openWebSite, - setAllowCookies, setCheckedForUpdates, setError, setLoading, @@ -47,11 +45,8 @@ const App = () => { error, loading, checkedForUpdates, - allowCookies, - hasSetCookies, } = state; - const [cookieBannerOpen, setCookieBannerOpen] = useState(!hasSetCookies); const [drawerOpen, setDrawerOpen] = useState(false); const [snackOpen, setSnackOpen] = useState(false); const language = state.languages[languageIndex]; @@ -105,29 +100,6 @@ const App = () => { setSnackOpen(false); }; - /** - * Close the cookie snack bar - */ - const closeCookieSnack = () => { - setCookieBannerOpen(false); - }; - - /** - * Accept cookies - */ - const acceptCookies = () => { - d1(setAllowCookies(true)); - setCookieBannerOpen(false); - }; - - /** - * Decline cookies - */ - const declineCookies = () => { - d1(setAllowCookies(false)); - setCookieBannerOpen(false); - }; - /** * Close the dialog that displays a message that no updates are available */ @@ -146,17 +118,6 @@ const App = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - useEffect(() => { - if (!window.__TAURI__) { - if (allowCookies) { - ReactGA.initialize('G-M3DEBWW06X'); - window['ga-disable-G-M3DEBWW06X'] = false; - } else { - window['ga-disable-G-M3DEBWW06X'] = true; - } - } - }, [allowCookies]); - return ( @@ -221,31 +182,7 @@ const App = () => { agreeLabel={language.ok} /> ) : null} - {} - {!window.__TAURI__ && cookieBannerOpen ? ( - - {language.cookieNoticeText} - - - - ) : null} - + {language.downloadApp}