Merge branch 'master' into feature-aopl-options

This commit is contained in:
Thomas Rittson 2021-05-18 10:11:40 +10:00
commit 56e127d20c
7 changed files with 26 additions and 56 deletions

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up cloc - name: Set up cloc
run: | run: |
@ -30,7 +30,7 @@ jobs:
adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Get Package Version - name: Get Package Version
id: gen_vars id: gen_vars
@ -46,7 +46,7 @@ jobs:
needs: setup needs: setup
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Testing locales - extName length - name: Testing locales - extName length
run: | run: |
@ -80,12 +80,12 @@ jobs:
BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v1 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
with: with:
node-version: '14.x' node-version: '14'
- name: Print environment - name: Print environment
run: | run: |
@ -102,31 +102,31 @@ jobs:
run: gulp ci run: gulp ci
- name: Upload opera artifact - name: Upload opera artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with: with:
name: dist-opera-${{ env.BUILD_NUMBER }}.zip name: dist-opera-${{ env.BUILD_NUMBER }}.zip
path: dist/dist-opera-${{ env.BUILD_NUMBER }}.zip path: dist/dist-opera-${{ env.BUILD_NUMBER }}.zip
- name: Upload chrome artifact - name: Upload chrome artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with: with:
name: dist-chrome-${{ env.BUILD_NUMBER }}.zip name: dist-chrome-${{ env.BUILD_NUMBER }}.zip
path: dist/dist-chrome-${{ env.BUILD_NUMBER }}.zip path: dist/dist-chrome-${{ env.BUILD_NUMBER }}.zip
- name: Upload firefox artifact - name: Upload firefox artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with: with:
name: dist-firefox-${{ env.BUILD_NUMBER }}.zip name: dist-firefox-${{ env.BUILD_NUMBER }}.zip
path: dist/dist-firefox-${{ env.BUILD_NUMBER }}.zip path: dist/dist-firefox-${{ env.BUILD_NUMBER }}.zip
- name: Upload edge artifact - name: Upload edge artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with: with:
name: dist-edge-${{ env.BUILD_NUMBER }}.zip name: dist-edge-${{ env.BUILD_NUMBER }}.zip
path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip
- name: Upload coverage artifact - name: Upload coverage artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with: with:
name: coverage-${{ env.BUILD_NUMBER }}.zip name: coverage-${{ env.BUILD_NUMBER }}.zip
path: coverage/coverage-${{ env.BUILD_NUMBER }}.zip path: coverage/coverage-${{ env.BUILD_NUMBER }}.zip

View File

@ -18,7 +18,7 @@ jobs:
adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Get Package Version - name: Get Package Version
id: gen_vars id: gen_vars
@ -54,7 +54,7 @@ jobs:
- name: Create Draft Release - name: Create Draft Release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -69,7 +69,7 @@ jobs:
needs: setup needs: setup
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Testing locales - extName length - name: Testing locales - extName length
run: | run: |
@ -103,12 +103,12 @@ jobs:
BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v1 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
with: with:
node-version: '14.x' node-version: '14'
- name: Print environment - name: Print environment
run: | run: |
@ -137,7 +137,7 @@ jobs:
call 7z a browser-source-%BUILD_NUMBER%.zip "Source\*" call 7z a browser-source-%BUILD_NUMBER%.zip "Source\*"
- name: upload opera release asset - name: upload opera release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -147,7 +147,7 @@ jobs:
asset_content_type: application asset_content_type: application
- name: upload chrome release asset - name: upload chrome release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -157,7 +157,7 @@ jobs:
asset_content_type: application/zip asset_content_type: application/zip
- name: upload firefox release asset - name: upload firefox release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -167,7 +167,7 @@ jobs:
asset_content_type: application/zip asset_content_type: application/zip
- name: upload edge release asset - name: upload edge release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -177,7 +177,7 @@ jobs:
asset_content_type: application/zip asset_content_type: application/zip
- name: upload browser source zip release asset - name: upload browser source zip release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -187,7 +187,7 @@ jobs:
asset_content_type: application/zip asset_content_type: application/zip
- name: upload coverage release asset - name: upload coverage release asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:

2
jslib

@ -1 +1 @@
Subproject commit 306aef73d459dfad8a7a06c32442c9ed2d56922e Subproject commit 8659d0975ddb7dc70c0246b4b9acf81e013cdde3

View File

@ -898,12 +898,6 @@
"enableAutoFillOnPageLoadDesc": { "enableAutoFillOnPageLoadDesc": {
"message": "If a login form is detected, automatically perform an auto-fill when the web page loads." "message": "If a login form is detected, automatically perform an auto-fill when the web page loads."
}, },
"enableAutoTotpCopyOnAutoFill": {
"message": "Automatic TOTP Copy after Page Load"
},
"enableAutoTotpCopyOnAutoFillDesc": {
"message": "If Auto-fill On Page Load is enabled, the TOTP verification code is automatically copied to your clipboard after loading the web page. This is overridden by Disable Automatic TOTP Copy."
},
"experimentalFeature": { "experimentalFeature": {
"message": "This is currently an experimental feature. Use at your own risk." "message": "This is currently an experimental feature. Use at your own risk."
}, },

View File

@ -173,17 +173,5 @@
</div> </div>
<div class="box-footer">{{'defaultAutoFillOnPageLoadDesc' | i18n}}</div> <div class="box-footer">{{'defaultAutoFillOnPageLoadDesc' | i18n}}</div>
</div> </div>
<div class="box">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="autoCopyTotp">{{'enableAutoTotpCopyOnAutoFill' | i18n}}</label>
<input id="autoCopyTotp" type="checkbox" (change)="updateAutoTotpCopyOnAutoFill()"
[(ngModel)]="enableAutoTotpCopyOnAutoFill" [disabled]="!enableAutoFillOnPageLoad">
</div>
</div>
<div class="box-footer">
{{'enableAutoTotpCopyOnAutoFillDesc' | i18n}}
</div>
</div>
</ng-container> </ng-container>
</content> </content>

View File

@ -7,7 +7,6 @@ import { UriMatchType } from 'jslib/enums/uriMatchType';
import { I18nService } from 'jslib/abstractions/i18n.service'; import { I18nService } from 'jslib/abstractions/i18n.service';
import { MessagingService } from 'jslib/abstractions/messaging.service'; import { MessagingService } from 'jslib/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { StateService } from 'jslib/abstractions/state.service'; import { StateService } from 'jslib/abstractions/state.service';
import { StorageService } from 'jslib/abstractions/storage.service'; import { StorageService } from 'jslib/abstractions/storage.service';
import { TotpService } from 'jslib/abstractions/totp.service'; import { TotpService } from 'jslib/abstractions/totp.service';
@ -24,7 +23,6 @@ export class OptionsComponent implements OnInit {
enableAutoFillOnPageLoad = false; enableAutoFillOnPageLoad = false;
autoFillOnPageLoadDefault = false; autoFillOnPageLoadDefault = false;
autoFillOnPageLoadOptions: any[]; autoFillOnPageLoadOptions: any[];
enableAutoTotpCopyOnAutoFill = false;
disableAutoTotpCopy = false; disableAutoTotpCopy = false;
disableContextMenuItem = false; disableContextMenuItem = false;
disableAddLoginNotification = false; disableAddLoginNotification = false;
@ -81,8 +79,6 @@ export class OptionsComponent implements OnInit {
this.autoFillOnPageLoadDefault = await this.storageService.get<boolean>( this.autoFillOnPageLoadDefault = await this.storageService.get<boolean>(
ConstantsService.autoFillOnPageLoadDefaultKey) ?? false; ConstantsService.autoFillOnPageLoadDefaultKey) ?? false;
this.enableAutoTotpCopyOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled();
this.disableAddLoginNotification = await this.storageService.get<boolean>( this.disableAddLoginNotification = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey); ConstantsService.disableAddLoginNotificationKey);
@ -133,10 +129,6 @@ export class OptionsComponent implements OnInit {
await this.storageService.save(ConstantsService.enableAutoFillOnPageLoadKey, this.enableAutoFillOnPageLoad); await this.storageService.save(ConstantsService.enableAutoFillOnPageLoadKey, this.enableAutoFillOnPageLoad);
} }
async updateAutoTotpCopyOnAutoFill() {
await this.storageService.save(ConstantsService.enableAutoTotpCopyOnAutoFillKey, this.enableAutoTotpCopyOnAutoFill);
}
async updateAutoFillOnPageLoadDefault() { async updateAutoFillOnPageLoadDefault() {
await this.storageService.save(ConstantsService.autoFillOnPageLoadDefaultKey, this.autoFillOnPageLoadDefault); await this.storageService.save(ConstantsService.autoFillOnPageLoadDefaultKey, this.autoFillOnPageLoadDefault);
} }

View File

@ -211,8 +211,8 @@ export default class AutofillService implements AutofillServiceInterface {
url: tab.url, url: tab.url,
}, { frameId: pd.frameId }); }, { frameId: pd.frameId });
if (options.cipher.type !== CipherType.Login || totpPromise || options.skipTotp || if (options.cipher.type !== CipherType.Login || totpPromise || !options.cipher.login.totp ||
!options.cipher.login.totp || (!canAccessPremium && !options.cipher.organizationUseTotp)) { (!canAccessPremium && !options.cipher.organizationUseTotp)) {
return; return;
} }
@ -263,13 +263,9 @@ export default class AutofillService implements AutofillServiceInterface {
return; return;
} }
const copyTotpOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled();
const shouldCopyTotp = fromCommand || copyTotpOnAutoFill;
const totpCode = await this.doAutoFill({ const totpCode = await this.doAutoFill({
cipher: cipher, cipher: cipher,
pageDetails: pageDetails, pageDetails: pageDetails,
skipTotp: !shouldCopyTotp,
skipLastUsed: !fromCommand, skipLastUsed: !fromCommand,
skipUsernameOnlyFill: !fromCommand, skipUsernameOnlyFill: !fromCommand,
onlyEmptyFields: !fromCommand, onlyEmptyFields: !fromCommand,