mirror of
https://github.com/bitwarden/web
synced 2025-12-18 01:03:16 +00:00
Compare commits
10 Commits
PS-589-add
...
PS-326-mis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a30878774 | ||
|
|
ad0512e344 | ||
|
|
8fe9504cd1 | ||
|
|
b8aa25b981 | ||
|
|
5d09ddbc8d | ||
|
|
bde9a28f2b | ||
|
|
dfb03a53c0 | ||
|
|
b98b391283 | ||
|
|
f195aee90c | ||
|
|
eefcda7e41 |
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -19,8 +19,8 @@ jobs:
|
|||||||
name: Setup
|
name: Setup
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
release_version: ${{ steps.version.outputs.package }}
|
release_version: ${{ steps.version.outputs.version }}
|
||||||
tag_version: ${{ steps.version.outputs.tag }}
|
tag_version: ${{ steps.version.outputs.version }}
|
||||||
branch_name: ${{ steps.branch.outputs.branch_name }}
|
branch_name: ${{ steps.branch.outputs.branch_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
@@ -38,20 +38,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Check Release Version
|
- name: Check Release Version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
uses: bitwarden/gh-actions/release-version-check@ea9fab01d76940267b4147cc1c4542431246b9f6
|
||||||
version=$( jq -r ".version" package.json)
|
with:
|
||||||
previous_release_tag_version=$(
|
release-type: ${{ github.event.inputs.release_type }}
|
||||||
curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r ".tag_name"
|
project-type: ts
|
||||||
)
|
file: package.json
|
||||||
|
|
||||||
if [ "v$version" == "$previous_release_tag_version" ] && \
|
|
||||||
[ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then
|
|
||||||
echo "[!] Already released v$version. Please bump version to continue"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "::set-output name=package::$version"
|
|
||||||
echo "::set-output name=tag::v$version"
|
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch
|
id: branch
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 52cc640537...0d658ba26d
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.28.1",
|
"version": "2022.05.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.28.1",
|
"version": "2022.05.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.28.1",
|
"version": "2022.05.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": "https://github.com/bitwarden/web",
|
"repository": "https://github.com/bitwarden/web",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
import { Component, NgZone, OnDestroy, OnInit, SecurityContext } from "@angular/core";
|
import { DOCUMENT } from "@angular/common";
|
||||||
|
import {
|
||||||
|
Component,
|
||||||
|
Inject,
|
||||||
|
LOCALE_ID,
|
||||||
|
NgZone,
|
||||||
|
OnDestroy,
|
||||||
|
OnInit,
|
||||||
|
SecurityContext,
|
||||||
|
} from "@angular/core";
|
||||||
import { DomSanitizer } from "@angular/platform-browser";
|
import { DomSanitizer } from "@angular/platform-browser";
|
||||||
import { NavigationEnd, Router } from "@angular/router";
|
import { NavigationEnd, Router } from "@angular/router";
|
||||||
import * as jq from "jquery";
|
import * as jq from "jquery";
|
||||||
@@ -50,6 +59,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
private isIdle = false;
|
private isIdle = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@Inject(LOCALE_ID) public locale: string,
|
||||||
|
@Inject(DOCUMENT) private document: Document,
|
||||||
private broadcasterService: BroadcasterService,
|
private broadcasterService: BroadcasterService,
|
||||||
private tokenService: TokenService,
|
private tokenService: TokenService,
|
||||||
private folderService: FolderService,
|
private folderService: FolderService,
|
||||||
@@ -78,6 +89,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.document.documentElement.lang = this.locale;
|
||||||
|
|
||||||
this.ngZone.runOutsideAngular(() => {
|
this.ngZone.runOutsideAngular(() => {
|
||||||
window.onmousemove = () => this.recordActivity();
|
window.onmousemove = () => this.recordActivity();
|
||||||
window.onmousedown = () => this.recordActivity();
|
window.onmousedown = () => this.recordActivity();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchTextChanged() {
|
searchTextChanged() {
|
||||||
this.onSearchTextChanged.emit(this.searchText.normalize("NFD").replace(/[\u0300-\u036f]/g, ""));
|
this.onSearchTextChanged.emit(this.searchText);
|
||||||
}
|
}
|
||||||
|
|
||||||
async initCollections() {
|
async initCollections() {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.se
|
|||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
import { SyncService } from "jslib-common/abstractions/sync.service";
|
import { SyncService } from "jslib-common/abstractions/sync.service";
|
||||||
import { TokenService } from "jslib-common/abstractions/token.service";
|
import { TokenService } from "jslib-common/abstractions/token.service";
|
||||||
import { CipherType } from "jslib-common/enums/cipherType";
|
|
||||||
import { CipherView } from "jslib-common/models/view/cipherView";
|
import { CipherView } from "jslib-common/models/view/cipherView";
|
||||||
|
|
||||||
import { UpdateKeyComponent } from "../../../../settings/update-key.component";
|
import { UpdateKeyComponent } from "../../../../settings/update-key.component";
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ import { ActivatedRoute } from "@angular/router";
|
|||||||
|
|
||||||
import { ModalService } from "jslib-angular/services/modal.service";
|
import { ModalService } from "jslib-angular/services/modal.service";
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
|
||||||
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
|
||||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
import { TwoFactorProviderType } from "jslib-common/enums/twoFactorProviderType";
|
import { TwoFactorProviderType } from "jslib-common/enums/twoFactorProviderType";
|
||||||
@@ -25,21 +22,9 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
|
|||||||
messagingService: MessagingService,
|
messagingService: MessagingService,
|
||||||
policyService: PolicyService,
|
policyService: PolicyService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
stateService: StateService,
|
stateService: StateService
|
||||||
platformUtilsService: PlatformUtilsService,
|
|
||||||
i18nService: I18nService,
|
|
||||||
logService: LogService
|
|
||||||
) {
|
) {
|
||||||
super(
|
super(apiService, modalService, messagingService, policyService, stateService);
|
||||||
apiService,
|
|
||||||
modalService,
|
|
||||||
messagingService,
|
|
||||||
policyService,
|
|
||||||
stateService,
|
|
||||||
platformUtilsService,
|
|
||||||
i18nService,
|
|
||||||
logService
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -55,40 +55,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form *ngIf="!loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<h2 class="mt-5 spaced-header">
|
|
||||||
{{ "deviceVerification" | i18n }}
|
|
||||||
</h2>
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-check">
|
|
||||||
<input
|
|
||||||
class="form-check-input"
|
|
||||||
type="checkbox"
|
|
||||||
id="enableDeviceVerification"
|
|
||||||
name="enableDeviceVerification"
|
|
||||||
disabled="{{ !isDeviceVerificationSectionEnabled }}"
|
|
||||||
[(ngModel)]="enableDeviceVerification"
|
|
||||||
/>
|
|
||||||
<label class="form-check-label" for="enableDeviceVerification">
|
|
||||||
{{ "enableDeviceVerification" | i18n }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<small class="form-text text-muted">{{ "deviceVerificationDesc" | i18n }}</small>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="btn btn-primary btn-submit"
|
|
||||||
[disabled]="form.loading"
|
|
||||||
*ngIf="isDeviceVerificationSectionEnabled"
|
|
||||||
>
|
|
||||||
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
|
||||||
<span>{{ "save" | i18n }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<ng-template #authenticatorTemplate></ng-template>
|
<ng-template #authenticatorTemplate></ng-template>
|
||||||
<ng-template #recoveryTemplate></ng-template>
|
<ng-template #recoveryTemplate></ng-template>
|
||||||
|
|||||||
@@ -3,15 +3,11 @@ import { Component, OnInit, Type, ViewChild, ViewContainerRef } from "@angular/c
|
|||||||
import { ModalRef } from "jslib-angular/components/modal/modal.ref";
|
import { ModalRef } from "jslib-angular/components/modal/modal.ref";
|
||||||
import { ModalService } from "jslib-angular/services/modal.service";
|
import { ModalService } from "jslib-angular/services/modal.service";
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
|
||||||
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
|
||||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
import { PolicyType } from "jslib-common/enums/policyType";
|
import { PolicyType } from "jslib-common/enums/policyType";
|
||||||
import { TwoFactorProviderType } from "jslib-common/enums/twoFactorProviderType";
|
import { TwoFactorProviderType } from "jslib-common/enums/twoFactorProviderType";
|
||||||
import { DeviceVerificationRequest } from "jslib-common/models/request/DeviceVerificationRequest";
|
|
||||||
import { TwoFactorProviders } from "jslib-common/services/twoFactor.service";
|
import { TwoFactorProviders } from "jslib-common/services/twoFactor.service";
|
||||||
|
|
||||||
import { TwoFactorAuthenticatorComponent } from "./two-factor-authenticator.component";
|
import { TwoFactorAuthenticatorComponent } from "./two-factor-authenticator.component";
|
||||||
@@ -43,32 +39,18 @@ export class TwoFactorSetupComponent implements OnInit {
|
|||||||
canAccessPremium: boolean;
|
canAccessPremium: boolean;
|
||||||
showPolicyWarning = false;
|
showPolicyWarning = false;
|
||||||
loading = true;
|
loading = true;
|
||||||
enableDeviceVerification: boolean;
|
|
||||||
isDeviceVerificationSectionEnabled: boolean;
|
|
||||||
modal: ModalRef;
|
modal: ModalRef;
|
||||||
formPromise: Promise<any>;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected apiService: ApiService,
|
protected apiService: ApiService,
|
||||||
protected modalService: ModalService,
|
protected modalService: ModalService,
|
||||||
protected messagingService: MessagingService,
|
protected messagingService: MessagingService,
|
||||||
protected policyService: PolicyService,
|
protected policyService: PolicyService,
|
||||||
private stateService: StateService,
|
private stateService: StateService
|
||||||
private platformUtilsService: PlatformUtilsService,
|
|
||||||
private i18nService: I18nService,
|
|
||||||
private logService: LogService
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.canAccessPremium = await this.stateService.getCanAccessPremium();
|
this.canAccessPremium = await this.stateService.getCanAccessPremium();
|
||||||
try {
|
|
||||||
const deviceVerificationSettings = await this.apiService.getDeviceVerificationSettings();
|
|
||||||
this.isDeviceVerificationSectionEnabled =
|
|
||||||
deviceVerificationSettings.isDeviceVerificationSectionEnabled;
|
|
||||||
this.enableDeviceVerification = deviceVerificationSettings.unknownDeviceVerificationEnabled;
|
|
||||||
} catch (e) {
|
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const key in TwoFactorProviders) {
|
for (const key in TwoFactorProviders) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
@@ -204,37 +186,4 @@ export class TwoFactorSetupComponent implements OnInit {
|
|||||||
this.showPolicyWarning = false;
|
this.showPolicyWarning = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
|
||||||
try {
|
|
||||||
if (this.enableDeviceVerification) {
|
|
||||||
const email = await this.stateService.getEmail();
|
|
||||||
const confirmed = await this.platformUtilsService.showDialog(
|
|
||||||
this.i18nService.t(
|
|
||||||
"areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX",
|
|
||||||
email
|
|
||||||
),
|
|
||||||
this.i18nService.t("deviceVerification"),
|
|
||||||
this.i18nService.t("yes"),
|
|
||||||
this.i18nService.t("no"),
|
|
||||||
"warning"
|
|
||||||
);
|
|
||||||
if (!confirmed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.formPromise = this.apiService.putDeviceVerificationSettings(
|
|
||||||
new DeviceVerificationRequest(this.enableDeviceVerification)
|
|
||||||
);
|
|
||||||
await this.formPromise;
|
|
||||||
this.platformUtilsService.showToast(
|
|
||||||
"success",
|
|
||||||
null,
|
|
||||||
this.i18nService.t("updatedDeviceVerification")
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4674,8 +4674,8 @@
|
|||||||
"removeSponsorshipSuccess": {
|
"removeSponsorshipSuccess": {
|
||||||
"message": "Sponsorship Removed"
|
"message": "Sponsorship Removed"
|
||||||
},
|
},
|
||||||
"ssoKeyConnectorUnavailable": {
|
"ssoKeyConnectorError": {
|
||||||
"message": "Unable to reach the Key Connector, try again later."
|
"message": "Key Connector error: make sure Key Connector is available and working correctly."
|
||||||
},
|
},
|
||||||
"keyConnectorUrl": {
|
"keyConnectorUrl": {
|
||||||
"message": "Key Connector URL"
|
"message": "Key Connector URL"
|
||||||
@@ -5069,26 +5069,5 @@
|
|||||||
},
|
},
|
||||||
"apiAccessToken": {
|
"apiAccessToken": {
|
||||||
"message": "API Access Token"
|
"message": "API Access Token"
|
||||||
},
|
|
||||||
"deviceVerification": {
|
|
||||||
"message": "Device Verification"
|
|
||||||
},
|
|
||||||
"enableDeviceVerification": {
|
|
||||||
"message": "Enable Device Verification"
|
|
||||||
},
|
|
||||||
"deviceVerificationDesc": {
|
|
||||||
"message": "When enabled, verification codes are sent to your email address when logging in from an unrecognized device"
|
|
||||||
},
|
|
||||||
"updatedDeviceVerification": {
|
|
||||||
"message": "Updated Device Verification"
|
|
||||||
},
|
|
||||||
"areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX": {
|
|
||||||
"message": "Are you sure you want to enable Device Verification? The verification code emails will arrive at: $EMAIL$",
|
|
||||||
"placeholders": {
|
|
||||||
"email": {
|
|
||||||
"content": "$1",
|
|
||||||
"example": "My Email"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user