mirror of
https://github.com/XFox111/PasswordGeneratorExtension.git
synced 2026-07-02 19:52:43 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a11ebbb45 | |||
| 86c4e0498b | |||
| c7869010b6 | |||
| 6f9c13587d |
@@ -16,7 +16,8 @@ updates:
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
@@ -26,4 +27,5 @@ updates:
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
|
||||
+7
-6
@@ -1,4 +1,5 @@
|
||||
import { CracoConfig, CracoContext } from "@craco/craco";
|
||||
import { CracoConfig, WebpackContext } from "@craco/types";
|
||||
import { Configuration as WebpackConfig } from "webpack";
|
||||
import HtmlWebapckPlugin, { MinifyOptions } from "html-webpack-plugin";
|
||||
import { Configuration } from "webpack";
|
||||
|
||||
@@ -8,16 +9,16 @@ const cracoConfig: CracoConfig =
|
||||
{
|
||||
webpack:
|
||||
{
|
||||
configure: (webpackConfig: Configuration, { env, paths }: CracoContext): Configuration =>
|
||||
configure: ((webpackConfig: WebpackConfig, { env, paths }: WebpackContext): WebpackConfig =>
|
||||
{
|
||||
const isProduction: boolean = env === "production";
|
||||
|
||||
const config: Configuration =
|
||||
const config: WebpackConfig =
|
||||
{
|
||||
...webpackConfig,
|
||||
entry:
|
||||
{
|
||||
main: paths.appIndexJs,
|
||||
main: paths!.appIndexJs,
|
||||
background: "./src/Services/BackgroundService.ts",
|
||||
contentScript: "./src/Services/ContentService.ts",
|
||||
},
|
||||
@@ -53,13 +54,13 @@ const cracoConfig: CracoConfig =
|
||||
config.plugins.push(new HtmlWebapckPlugin({
|
||||
inject: true,
|
||||
chunks: ["main"],
|
||||
template: paths.appHtml,
|
||||
template: paths!.appHtml,
|
||||
filename: "index.html",
|
||||
minify: isProduction && minifyOptions
|
||||
}));
|
||||
|
||||
return config;
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+23
-14
@@ -1,28 +1,31 @@
|
||||
{
|
||||
"name": "password-generator",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.5",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@craco/craco": "^6.4.5",
|
||||
"@fluentui/react-components": "^9.13.0",
|
||||
"@fluentui/react-icons": "^2.0.193",
|
||||
"@craco/craco": "^7.1.0",
|
||||
"@fluentui/react-components": "^9.19.1",
|
||||
"@fluentui/react-icons": "^2.0.199",
|
||||
"react": "^18.2.0",
|
||||
"react-device-detect": "^2.2.3",
|
||||
"react-dom": "^18.2.0",
|
||||
"sass": "^1.56.1",
|
||||
"typescript": "^4.9.4",
|
||||
"sass": "^1.60.0",
|
||||
"typescript": "^5.0.4",
|
||||
"webextension-polyfill": "^0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@craco/types": "^7.1.0",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/craco__craco": "^6.4.0",
|
||||
"@types/jest": "^29.2.3",
|
||||
"@types/node": "^18.11.19",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@types/webextension-polyfill": "^0.9.2",
|
||||
"react-scripts": "5.0.1"
|
||||
"@types/jest": "^29.5.2",
|
||||
"@types/node": "^20.2.5",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.4",
|
||||
"@types/webextension-polyfill": "^0.10.0",
|
||||
"html-webpack-plugin": "^5.5.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"webpack": "^5.85.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "craco start",
|
||||
@@ -47,5 +50,11 @@
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"json5": "1.0.2",
|
||||
"loader-utils": "2.0.4",
|
||||
"minimatch": "3.0.5",
|
||||
"nth-check": "2.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { InfoRegular, PersonFeedbackRegular } from "@fluentui/react-icons";
|
||||
import { ReactComponent as BuyMeACoffee } from "../Assets/BuyMeACoffee.svg";
|
||||
import React from "react";
|
||||
import { loc } from "../Utils/Localization";
|
||||
import browser from "../Utils/Browser";
|
||||
import * as Platform from "react-device-detect";
|
||||
|
||||
export default class AboutSection extends React.Component
|
||||
{
|
||||
@@ -55,25 +55,13 @@ export default class AboutSection extends React.Component
|
||||
|
||||
private GetFeedbackLink(): string
|
||||
{
|
||||
let manifest: { [key: string]: string | any } = browser?.runtime?.getManifest();
|
||||
|
||||
if (!manifest)
|
||||
return "mailto:feedback@xfox111.net";
|
||||
if (Platform.isEdgeChromium)
|
||||
return "https://microsoftedge.microsoft.com/addons/detail/password-generator/manimdhobjbkfpeeehlhhneookiokpbj";
|
||||
else if (Platform.isChrome)
|
||||
return "https://chrome.google.com/webstore/detail/password-generator/jnjobgjobffgmgfnkpkjfjkkfhfikmfl";
|
||||
else if (Platform.isFirefox)
|
||||
return "https://addons.mozilla.org/en-US/firefox/addon/easy-password-generator";
|
||||
else
|
||||
{
|
||||
if (manifest.update_url)
|
||||
{
|
||||
let host: string = new URL(manifest.update_url).host;
|
||||
|
||||
if (host.endsWith("edge.microsoft.com"))
|
||||
return "https://microsoftedge.microsoft.com/addons/detail/password-generator/manimdhobjbkfpeeehlhhneookiokpbj";
|
||||
else if (host.endsWith("google.com"))
|
||||
return "https://chrome.google.com/webstore/detail/password-generator/jnjobgjobffgmgfnkpkjfjkkfhfikmfl";
|
||||
else
|
||||
return "mailto:feedback@xfox111.net";
|
||||
}
|
||||
else
|
||||
return "mailto:feedback@xfox111.net";
|
||||
}
|
||||
return "mailto:feedback@xfox111.net";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Button, Text, Dialog, DialogTrigger, DialogSurface, DialogTitle, DialogBody, DialogActions, DialogContent } from "@fluentui/react-components";
|
||||
import { Table, TableHeader, TableRow, TableHeaderCell, TableBody, TableCell } from "@fluentui/react-components/unstable";
|
||||
import { Button, Text, Dialog, DialogTrigger, DialogSurface, DialogTitle, DialogBody, DialogActions, DialogContent, Table, TableHeader, TableRow, TableHeaderCell, TableBody, TableCell } from "@fluentui/react-components";
|
||||
import { QuestionCircleRegular } from "@fluentui/react-icons";
|
||||
import React from "react";
|
||||
import Generator from "../Utils/Generator";
|
||||
|
||||
@@ -108,7 +108,9 @@ export default class Generator
|
||||
// min is inclusive, max is exclusive
|
||||
private static GetRandomInt(min: number, max: number): number
|
||||
{
|
||||
return Math.floor(Math.random() * (max - min)) + min;
|
||||
let arr = new Uint8Array(1);
|
||||
crypto.getRandomValues(arr);
|
||||
return Math.floor((arr[0] / 255) * (max - min)) + min;
|
||||
}
|
||||
|
||||
private static PickRandomFromArray(array: string): string
|
||||
|
||||
Reference in New Issue
Block a user