Skip to content

Commit 86c4e04

Browse files
Patch 2.2.4 (#169)
* Bump @types/react from 18.0.32 to 18.0.33 (#160) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.0.32 to 18.0.33. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * CodeQL URL sanitization fix (#162) * Redone feedback link determination (CodeQL#7, CodeQL#8) * Removed unused import to fix CI pipeline * Changed RNG method for password generator (CodeQL#1, CodeQL#2) (#163) * Bump @fluentui/react-components from 9.18.6 to 9.19.1 (#168) Bumps [@fluentui/react-components](https://github.com/microsoft/fluentui) from 9.18.6 to 9.19.1. - [Release notes](https://github.com/microsoft/fluentui/releases) - [Changelog](https://github.com/microsoft/fluentui/blob/master/azure-pipelines.release-fluentui.yml) - [Commits](https://github.com/microsoft/fluentui/compare/@fluentui/react-components_v9.18.6...@fluentui/react-components_v9.19.1) --- updated-dependencies: - dependency-name: "@fluentui/react-components" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump typescript from 5.0.3 to 5.0.4 (#167) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.3 to 5.0.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v5.0.3...v5.0.4) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump webpack from 5.77.0 to 5.81.0 (#166) Bumps [webpack](https://github.com/webpack/webpack) from 5.77.0 to 5.81.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.77.0...v5.81.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @types/react from 18.0.33 to 18.2.0 (#165) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.0.33 to 18.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @types/react-dom from 18.0.11 to 18.2.1 (#164) Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.0.11 to 18.2.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) --- updated-dependencies: - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eugene Fox <eugene.xfox@outlook.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent c786901 commit 86c4e04

File tree

4 files changed

+597
-685
lines changed

4 files changed

+597
-685
lines changed

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "password-generator",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"private": true,
55
"dependencies": {
66
"@craco/craco": "^7.1.0",
7-
"@fluentui/react-components": "^9.18.6",
7+
"@fluentui/react-components": "^9.19.1",
88
"@fluentui/react-icons": "^2.0.199",
99
"react": "^18.2.0",
10+
"react-device-detect": "^2.2.3",
1011
"react-dom": "^18.2.0",
1112
"sass": "^1.60.0",
12-
"typescript": "^5.0.3",
13+
"typescript": "^5.0.4",
1314
"webextension-polyfill": "^0.10.0"
1415
},
1516
"devDependencies": {
@@ -19,12 +20,12 @@
1920
"@testing-library/user-event": "^14.4.3",
2021
"@types/jest": "^29.5.0",
2122
"@types/node": "^18.15.11",
22-
"@types/react": "^18.0.32",
23-
"@types/react-dom": "^18.0.11",
23+
"@types/react": "^18.2.0",
24+
"@types/react-dom": "^18.2.1",
2425
"@types/webextension-polyfill": "^0.10.0",
2526
"html-webpack-plugin": "^5.5.0",
2627
"react-scripts": "5.0.1",
27-
"webpack": "^5.77.0"
28+
"webpack": "^5.81.0"
2829
},
2930
"scripts": {
3031
"start": "craco start",

src/Components/AboutSection.tsx

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InfoRegular, PersonFeedbackRegular } from "@fluentui/react-icons";
33
import { ReactComponent as BuyMeACoffee } from "../Assets/BuyMeACoffee.svg";
44
import React from "react";
55
import { loc } from "../Utils/Localization";
6-
import browser from "../Utils/Browser";
6+
import * as Platform from "react-device-detect";
77

88
export default class AboutSection extends React.Component
99
{
@@ -55,25 +55,13 @@ export default class AboutSection extends React.Component
5555

5656
private GetFeedbackLink(): string
5757
{
58-
let manifest: { [key: string]: string | any } = browser?.runtime?.getManifest();
59-
60-
if (!manifest)
61-
return "mailto:feedback@xfox111.net";
58+
if (Platform.isEdgeChromium)
59+
return "https://microsoftedge.microsoft.com/addons/detail/password-generator/manimdhobjbkfpeeehlhhneookiokpbj";
60+
else if (Platform.isChrome)
61+
return "https://chrome.google.com/webstore/detail/password-generator/jnjobgjobffgmgfnkpkjfjkkfhfikmfl";
62+
else if (Platform.isFirefox)
63+
return "https://addons.mozilla.org/en-US/firefox/addon/easy-password-generator";
6264
else
63-
{
64-
if (manifest.update_url)
65-
{
66-
let host: string = new URL(manifest.update_url).host;
67-
68-
if (host.endsWith("edge.microsoft.com"))
69-
return "https://microsoftedge.microsoft.com/addons/detail/password-generator/manimdhobjbkfpeeehlhhneookiokpbj";
70-
else if (host.endsWith("google.com"))
71-
return "https://chrome.google.com/webstore/detail/password-generator/jnjobgjobffgmgfnkpkjfjkkfhfikmfl";
72-
else
73-
return "mailto:feedback@xfox111.net";
74-
}
75-
else
76-
return "mailto:feedback@xfox111.net";
77-
}
65+
return "mailto:feedback@xfox111.net";
7866
}
7967
}

src/Utils/Generator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ export default class Generator
108108
// min is inclusive, max is exclusive
109109
private static GetRandomInt(min: number, max: number): number
110110
{
111-
return Math.floor(Math.random() * (max - min)) + min;
111+
let arr = new Uint8Array(1);
112+
crypto.getRandomValues(arr);
113+
return Math.floor((arr[0] / 255) * (max - min)) + min;
112114
}
113115

114116
private static PickRandomFromArray(array: string): string

0 commit comments

Comments
 (0)