+
+
- Save the settings
- Go back to the commit page and open the popup again
@@ -110,12 +127,12 @@ You are good to go! You can also pin the extension to the toolbar for easy acces
- Files that cannot be diffed with the ecu.test Diff-Viewer can still be opened individually for both the old and new versions
- Click on a file and click on "Show new" or "Show old"
-
+
- Files supported by the ecu.test Diff-Viewer will open directly in the viewer
- Click on a file and click on "Show diff"
-
+
- ecu.test Diff-Viewer will be opened
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 589a970..29fb02c 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -51,7 +51,7 @@ Open the ecu.test diff project in your IDE of choice and run the following termi
If you want to build the ecu.test diff extension locally for development purposes or for production use, you have access to different scripts:
-**Note:** All of these scripts can be found and modified within the './package.json' of the project.
+**Note:** All of these scripts can be found and modified within the `./package.json` of the project.
**Firefox:**
@@ -76,18 +76,9 @@ For integration and testing into your browser, you have to note some differences
In **Chrome/Edge** you can select the `./dist` folder inside you browser windows for importing the extension.
-In **Firefox**, you can test the extension only in debug-mode.
-You have to klick on 'debug add-ons' and can afterward select a .zip file for the import.
-You can create the .zip file on your own or use the tool web-ext (from mozilla).
-
-```
-npm install web-ext
-cd ./dist
-web-ext build
-```
-
-This tooling also provides help in the [signing process](https://extensionworkshop.com/documentation/develop/extensions-and-the-add-on-id/)
-which is required for the use of add-ons without a debug-mode in firefox.
+In **Firefox**, you can test the extension only in debug-mode on the [debugging page](about:debugging#/runtime/this-firefox) (click on 'debug add-ons' when managing addons).
+You have to . The [debugging page](about:debugging#/runtime/this-firefox) opens.
+Select a typical file in `./dist` folder, e.g. `./dist/manifest.json`.
## Testing / Linting / Code formatting
@@ -100,7 +91,7 @@ Select the files you want to format and run the following command:
```bash
# check all files
-npm prettier:check
+npm run prettier:check
# fix findings for all files
npm run prettier:write .
@@ -192,6 +183,15 @@ See the following store-specific information, to handle release specification in
- a mozilla developer account is required
- any secrets that are necessary for the publication process are set as `Actions secret`
- any additional information, see [Submitting an add-on](https://extensionworkshop.com/documentation/publish/submitting-an-add-on/)
+ - _Note_:
+ - The tool `web-ext` (from mozilla) will help you in the [signing process](https://extensionworkshop.com/documentation/develop/extensions-and-the-add-on-id/) which is required for the use of add-ons without a debug-mode in firefox.
+
+ For example, install it globally.
+ ```
+ npm install web-ext -g
+ cd ./dist
+ web-ext build
+ ```
- after publishing the application, a review is usually pending and will be published afterward
- _Note_:
- the add-on may be subject to additional review.
diff --git a/docs/images/chrome/add_host_dialog.png b/docs/images/chrome/add_host_dialog.png
new file mode 100644
index 0000000..96b4c90
Binary files /dev/null and b/docs/images/chrome/add_host_dialog.png differ
diff --git a/docs/images/chrome/configuration.png b/docs/images/chrome/configuration.png
index 606d514..808db62 100644
Binary files a/docs/images/chrome/configuration.png and b/docs/images/chrome/configuration.png differ
diff --git a/docs/images/chrome/dialog.png b/docs/images/chrome/dialog.png
index 12910ad..31d34df 100644
Binary files a/docs/images/chrome/dialog.png and b/docs/images/chrome/dialog.png differ
diff --git a/docs/images/chrome/dialog_download.png b/docs/images/chrome/dialog_download.png
index 47b1deb..dee4216 100644
Binary files a/docs/images/chrome/dialog_download.png and b/docs/images/chrome/dialog_download.png differ
diff --git a/src/HostDialog.ts b/src/HostDialog.ts
new file mode 100644
index 0000000..8d0dc93
--- /dev/null
+++ b/src/HostDialog.ts
@@ -0,0 +1,396 @@
+import browser from 'webextension-polyfill';
+import { Action, AuthType, ScmHost, ServiceWorkerRequest } from './types';
+import { normalizeHost } from './utils';
+
+const IP_REGEX =
+ /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;
+const HOSTNAME_REGEX =
+ /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/;
+const BITBUCKET_BEARER_REGEX =
+ /^bitbucket\.org\/[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)?$/i;
+const BITBUCKET_BASIC_REGEX = /^bitbucket\.org$/i;
+const TOKEN_DOC_URLS = {
+ github:
+ 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens',
+ gitlab: 'https://docs.gitlab.com/security/tokens',
+ bitbucket: 'https://support.atlassian.com/bitbucket-cloud/docs/access-tokens',
+};
+
+type Scm = 'github' | 'gitlab' | 'bitbucket';
+
+export class HostDialog {
+ private dialog: HTMLDialogElement;
+ private title: HTMLElement;
+ private scmSelect: HTMLSelectElement;
+ private scmIcon: HTMLImageElement;
+ private hostInput: HTMLInputElement;
+ private emailInput: HTMLInputElement;
+ private tokenInput: HTMLInputElement;
+ private tokenToggle: HTMLElement;
+ private saveButton: HTMLButtonElement;
+ private cancelButton: HTMLButtonElement;
+ private bitbucketAuth: HTMLDivElement;
+ private emailRow: HTMLDivElement;
+ private authRadios: NodeListOf| Platform | URL | -Token | |
|---|---|---|---|
| @@ -45,7 +53,6 @@ Check settings | -|||