mirror of
https://github.com/XFox111/PasswordGeneratorExtension.git
synced 2026-07-02 19:52:43 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a11ebbb45 | |||
| 86c4e0498b | |||
| c7869010b6 | |||
| 6f9c13587d | |||
| 5d4088dd1a | |||
| 917884b883 |
@@ -10,20 +10,22 @@ updates:
|
||||
|
||||
- package-ecosystem: "npm" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
target-branch: "main"
|
||||
target-branch: "next"
|
||||
assignees:
|
||||
- "xfox111"
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
target-branch: "main"
|
||||
target-branch: "next"
|
||||
assignees:
|
||||
- "xfox111"
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
name: Release pipeline
|
||||
|
||||
on:
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
types: [ released ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -37,7 +36,7 @@ jobs:
|
||||
- run: yarn build
|
||||
|
||||
- name: Drop artifacts (build)
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -57,12 +56,12 @@ jobs:
|
||||
script: Remove-Item "manifest.v2.json"
|
||||
|
||||
- name: Pack extension
|
||||
uses: TheDoctor0/zip-release@0.6.2
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
filename: PasswordGenerator-Chromium.zip
|
||||
|
||||
- name: Drop artifacts (Chromium)
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Chromium
|
||||
path: PasswordGenerator-Chromium.zip
|
||||
@@ -92,13 +91,20 @@ jobs:
|
||||
Remove-Item "manifest.json"
|
||||
Rename-Item "manifest.v2.json" "manifest.json"
|
||||
|
||||
- name: "web-ext lint"
|
||||
uses: kewisch/action-web-ext@e0ea88d527a8a90bc10d600f80ac667d219e6bf1
|
||||
with:
|
||||
cmd: lint
|
||||
source: .
|
||||
channel: listed
|
||||
|
||||
- name: Pack extension
|
||||
uses: TheDoctor0/zip-release@0.6.2
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
filename: PasswordGenerator-Firefox.zip
|
||||
|
||||
- name: Drop artifacts (Firefox)
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Firefox
|
||||
path: PasswordGenerator-Firefox.zip
|
||||
|
||||
@@ -13,7 +13,7 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: [ "main", "next" ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
@@ -23,7 +23,7 @@ on:
|
||||
- '**/pr_pipeline.yaml'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "main" ]
|
||||
branches: [ "main", "next" ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
|
||||
@@ -2,8 +2,7 @@ name: PR check pipeline
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
branches: [ "main", "next" ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
@@ -42,7 +41,7 @@ jobs:
|
||||
- run: yarn build
|
||||
|
||||
- name: Drop artifacts (build)
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -71,12 +70,12 @@ jobs:
|
||||
channel: listed
|
||||
|
||||
- name: Pack extension
|
||||
uses: TheDoctor0/zip-release@0.6.2
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
filename: PasswordGenerator-Firefox.zip
|
||||
|
||||
- name: Drop artifacts (Firefox)
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Firefox
|
||||
path: PasswordGenerator-Firefox.zip
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Password generator
|
||||
[](https://github.com/xfox111/PasswordGeneratorExtension/releases/latest)
|
||||
[](https://github.com/xfox111/PasswordGeneratorExtension/commits/master)
|
||||
[](https://github.com/XFox111/PasswordGeneratorExtension/commits/main)
|
||||
|
||||
[](https://twitter.com/xfox111)
|
||||
[](https://github.com/xfox111)
|
||||
@@ -56,6 +56,6 @@ If you are interested in fixing issues and contributing directly to the code bas
|
||||
This project has adopted the Contributor Covenant. For more information see the [Code of Conduct](https://github.com/XFox111/PasswordGeneratorExtension/blob/master/CODE_OF_CONDUCT.md)
|
||||
|
||||
## Copyrights
|
||||
> ©2022 Eugene Fox
|
||||
> ©2023 Eugene Fox
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
+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.0",
|
||||
"version": "2.2.5",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@craco/craco": "^6.4.5",
|
||||
"@fluentui/react-components": "^9.7.2",
|
||||
"@fluentui/react-icons": "^2.0.186",
|
||||
"@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.9",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@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