mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
Compare commits
27 Commits
feature/re
...
v2.24.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f5f3dc5c8 | ||
|
|
c01d95f870 | ||
|
|
7b58b66e17 | ||
|
|
95b9e6fb24 | ||
|
|
52c057555c | ||
|
|
a6274fa56e | ||
|
|
c1ede75a98 | ||
|
|
16cf1c4a47 | ||
|
|
477bb997dc | ||
|
|
9e3d45da6c | ||
|
|
8892553e30 | ||
|
|
95ff586a47 | ||
|
|
342e09da9e | ||
|
|
32cecf6086 | ||
|
|
b122d24350 | ||
|
|
a620a3f84c | ||
|
|
3d30495ffb | ||
|
|
bb03595d02 | ||
|
|
ff11d0468c | ||
|
|
825b174007 | ||
|
|
39690a01ac | ||
|
|
905e39d060 | ||
|
|
9f83899480 | ||
|
|
a99d38a2f3 | ||
|
|
5dccf54611 | ||
|
|
ad872f4d15 | ||
|
|
247429ef37 |
84
.github/workflows/build.yml
vendored
84
.github/workflows/build.yml
vendored
@@ -182,7 +182,7 @@ jobs:
|
|||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
- name: Setup DCT
|
- name: Setup DCT
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/release'
|
||||||
id: setup-dct
|
id: setup-dct
|
||||||
uses: bitwarden/gh-actions/setup-docker-trust@a8c384a05a974c05c48374c818b004be221d43ff
|
uses: bitwarden/gh-actions/setup-docker-trust@a8c384a05a974c05c48374c818b004be221d43ff
|
||||||
with:
|
with:
|
||||||
@@ -228,26 +228,37 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: docker tag bitwarden/web bitwarden/web:dev
|
run: docker tag bitwarden/web bitwarden/web:dev
|
||||||
|
|
||||||
|
- name: Tag release branch
|
||||||
|
if: github.ref == 'refs/heads/release'
|
||||||
|
run: docker tag bitwarden/web bitwarden/web:latest
|
||||||
|
|
||||||
- name: List Docker images
|
- name: List Docker images
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/release'
|
||||||
run: docker images
|
run: docker images
|
||||||
|
|
||||||
- name: Push rc images
|
- name: Push rc image
|
||||||
if: github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/rc'
|
||||||
run: docker push bitwarden/web:rc
|
run: docker push bitwarden/web:rc
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTENT_TRUST: 1
|
DOCKER_CONTENT_TRUST: 1
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
|
||||||
|
|
||||||
- name: Push dev images
|
- name: Push dev image
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: docker push bitwarden/web:dev
|
run: docker push bitwarden/web:dev
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTENT_TRUST: 1
|
DOCKER_CONTENT_TRUST: 1
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
|
||||||
|
|
||||||
|
- name: Push latest image
|
||||||
|
if: github.ref == 'refs/heads/release'
|
||||||
|
run: docker push bitwarden/web:latest
|
||||||
|
env:
|
||||||
|
DOCKER_CONTENT_TRUST: 1
|
||||||
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
|
||||||
|
|
||||||
- name: Log out of Docker
|
- name: Log out of Docker
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/release'
|
||||||
run: docker logout
|
run: docker logout
|
||||||
|
|
||||||
|
|
||||||
@@ -403,66 +414,3 @@ jobs:
|
|||||||
|
|
||||||
- name: NPM build
|
- name: NPM build
|
||||||
run: npm run build:bit:cloud
|
run: npm run build:bit:cloud
|
||||||
|
|
||||||
|
|
||||||
check-failures:
|
|
||||||
name: Check for failures
|
|
||||||
if: always()
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs:
|
|
||||||
- cloc
|
|
||||||
- setup
|
|
||||||
- build-oss-selfhost
|
|
||||||
- build-cloud
|
|
||||||
- build-commercial-selfhost
|
|
||||||
- build-qa
|
|
||||||
- windows
|
|
||||||
steps:
|
|
||||||
- name: Check if any job failed
|
|
||||||
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }}
|
|
||||||
env:
|
|
||||||
CLOC_STATUS: ${{ needs.cloc.result }}
|
|
||||||
SETUP_STATUS: ${{ needs.setup.result }}
|
|
||||||
BUILD_OSS_SELFHOST_STATUS: ${{ needs.build-oss-selfhost.result }}
|
|
||||||
BUILD_CLOUD_STATUS: ${{ needs.build-cloud.result }}
|
|
||||||
BUILD_COMMERCIAL_SELFHOST_STATUS: ${{ needs.build-commercial-selfhost.result }}
|
|
||||||
BUILD_QA: ${{ needs.build-qa.result }}
|
|
||||||
WINDOWS: ${{ needs.windows.result }}
|
|
||||||
run: |
|
|
||||||
if [ "$CLOC_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$SETUP_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$BUILD_OSS_SELFHOST_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$BUILD_CLOUD_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$BUILD_COMMERCIAL_SELFHOST_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$BUILD_QA" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$WINDOWS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Login to Azure - Prod Subscription
|
|
||||||
uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
|
||||||
|
|
||||||
- name: Retrieve secrets
|
|
||||||
id: retrieve-secrets
|
|
||||||
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
keyvault: "bitwarden-prod-kv"
|
|
||||||
secrets: "devops-alerts-slack-webhook-url"
|
|
||||||
|
|
||||||
- name: Notify Slack on failure
|
|
||||||
uses: act10ns/slack@e4e71685b9b239384b0f676a63c32367f59c2522 # v1.2.2
|
|
||||||
if: failure()
|
|
||||||
env:
|
|
||||||
SLACK_WEBHOOK_URL: ${{ steps.retrieve-secrets.outputs.devops-alerts-slack-webhook-url }}
|
|
||||||
with:
|
|
||||||
status: ${{ job.status }}
|
|
||||||
|
|||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -15,9 +15,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_REF" != "refs/heads/rc" ]]; then
|
if [[ "$GITHUB_REF" != "refs/heads/release" ]]; then
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
echo "[!] Can only release from rc branch"
|
echo "[!] Can only release from the 'release' branch"
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
self-host:
|
self-host:
|
||||||
name: Build self-host docker
|
name: Release self-host docker
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
@@ -66,20 +66,18 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Pull latest selfhost rc image
|
- name: Pull latest selfhost Release image
|
||||||
run: docker pull bitwarden/web:rc
|
run: docker pull bitwarden/web:latest
|
||||||
|
|
||||||
- name: Tag version
|
- name: Tag version
|
||||||
run: |
|
run: |
|
||||||
docker tag bitwarden/web:rc bitwarden/web:latest
|
docker tag bitwarden/web:latest bitwarden/web:$_RELEASE_VERSION
|
||||||
docker tag bitwarden/web:rc bitwarden/web:$_RELEASE_VERSION
|
|
||||||
|
|
||||||
- name: List Docker images
|
- name: List Docker images
|
||||||
run: docker images
|
run: docker images
|
||||||
|
|
||||||
- name: Push images
|
- name: Push images
|
||||||
run: |
|
run: |
|
||||||
docker push bitwarden/web:latest
|
|
||||||
docker push bitwarden/web:$_RELEASE_VERSION
|
docker push bitwarden/web:$_RELEASE_VERSION
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTENT_TRUST: 1
|
DOCKER_CONTENT_TRUST: 1
|
||||||
@@ -108,7 +106,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git switch -c deploy-$_TAG_VERSION
|
git switch -c deploy-$_TAG_VERSION
|
||||||
git push -u origin deploy-$_TAG_VERSION
|
git push -u origin deploy-$_TAG_VERSION
|
||||||
git switch rc
|
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
with:
|
||||||
|
ref: release
|
||||||
|
|
||||||
- name: Setup git config
|
- name: Setup git config
|
||||||
run: |
|
run: |
|
||||||
@@ -122,7 +124,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: rc
|
branch: release
|
||||||
artifacts: web-*-cloud-COMMERCIAL.zip
|
artifacts: web-*-cloud-COMMERCIAL.zip
|
||||||
|
|
||||||
# This should result in a build directory in the current working directory
|
# This should result in a build directory in the current working directory
|
||||||
@@ -163,7 +165,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: rc
|
branch: release
|
||||||
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
||||||
web-*-selfhosted-open-source.zip"
|
web-*-selfhosted-open-source.zip"
|
||||||
|
|
||||||
@@ -182,3 +184,4 @@ jobs:
|
|||||||
artifacts: "web-${{ needs.setup.outputs.release_version }}-selfhosted-COMMERCIAL.zip,
|
artifacts: "web-${{ needs.setup.outputs.release_version }}-selfhosted-COMMERCIAL.zip,
|
||||||
web-${{ needs.setup.outputs.release_version }}-selfhosted-open-source.zip"
|
web-${{ needs.setup.outputs.release_version }}-selfhosted-open-source.zip"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
draft: true
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import {
|
|||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
import { LogService } from 'jslib-common/abstractions/log.service';
|
||||||
@@ -68,8 +66,11 @@ export class ClientsComponent implements OnInit {
|
|||||||
|
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.searchText = qParams.search;
|
this.searchText = qParams.search;
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="container page-content">
|
<div class="container page-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-3">
|
||||||
<div class="card" *ngIf="provider">
|
<div class="card" *ngIf="provider">
|
||||||
<div class="card-header">{{'manage' | i18n}}</div>
|
<div class="card-header">{{'manage' | i18n}}</div>
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 mt-4 mt-md-0">
|
<div class="col-9">
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import {
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
@@ -83,7 +81,7 @@ export class PeopleComponent extends BasePeopleComponent<ProviderUserUserDetails
|
|||||||
|
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.searchText = qParams.search;
|
this.searchText = qParams.search;
|
||||||
if (qParams.viewEvents != null) {
|
if (qParams.viewEvents != null) {
|
||||||
const user = this.users.filter(u => u.id === qParams.viewEvents);
|
const user = this.users.filter(u => u.id === qParams.viewEvents);
|
||||||
@@ -91,6 +89,9 @@ export class PeopleComponent extends BasePeopleComponent<ProviderUserUserDetails
|
|||||||
this.events(user[0]);
|
this.events(user[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { ProviderUserInviteRequest } from 'jslib-common/models/request/provider/providerUserInviteRequest';
|
import { ProviderUserInviteRequest } from 'jslib-common/models/request/provider/providerUserInviteRequest';
|
||||||
@@ -44,8 +43,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
userType = ProviderUserType;
|
userType = ProviderUserType;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService,
|
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.editMode = this.loading = this.providerUserId != null;
|
this.editMode = this.loading = this.providerUserId != null;
|
||||||
@@ -56,9 +54,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
try {
|
try {
|
||||||
const user = await this.apiService.getProviderUser(this.providerId, this.providerUserId);
|
const user = await this.apiService.getProviderUser(this.providerId, this.providerUserId);
|
||||||
this.type = user.type;
|
this.type = user.type;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.title = this.i18nService.t('inviteUser');
|
this.title = this.i18nService.t('inviteUser');
|
||||||
}
|
}
|
||||||
@@ -82,9 +78,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
||||||
this.onSavedUser.emit();
|
this.onSavedUser.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete() {
|
async delete() {
|
||||||
@@ -104,9 +98,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
await this.deletePromise;
|
await this.deletePromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', this.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', this.name));
|
||||||
this.onDeletedUser.emit();
|
this.onDeletedUser.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<form *ngIf="provider && !loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
<form *ngIf="provider && !loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">{{'providerName' | i18n}}</label>
|
<label for="name">{{'providerName' | i18n}}</label>
|
||||||
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="provider.name"
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="provider.name"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
[(ngModel)]="provider.billingEmail" [disabled]="selfHosted">
|
[(ngModel)]="provider.billingEmail" [disabled]="selfHosted">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<app-avatar data="{{provider.name}}" dynamic="true" size="75" fontSize="35"></app-avatar>
|
<app-avatar data="{{provider.name}}" dynamic="true" size="75" fontSize="35"></app-avatar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate *ngIf="loading">
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate *ngIf="loading">
|
||||||
<h2 class="mt-5">{{'generalInformation' | i18n}}</h2>
|
<h2 class="mt-5">{{'generalInformation' | i18n}}</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6 mt-4 mt-md-0">
|
<div class="form-group col-6">
|
||||||
<label for="name">{{'providerName' | i18n}}</label>
|
<label for="name">{{'providerName' | i18n}}</label>
|
||||||
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="name" required>
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="name" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 mt-4 mt-md-0">
|
<div class="form-group col-6">
|
||||||
<label for="billingEmail">{{'billingEmail' | i18n}}</label>
|
<label for="billingEmail">{{'billingEmail' | i18n}}</label>
|
||||||
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail" required>
|
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail" required>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import {
|
|||||||
ToasterService,
|
ToasterService,
|
||||||
} from 'angular2-toaster';
|
} from 'angular2-toaster';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
|
|
||||||
@@ -43,7 +41,12 @@ export class SetupComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
document.body.classList.remove('layout_frontend');
|
document.body.classList.remove('layout_frontend');
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
let fired = false;
|
||||||
|
this.route.queryParams.subscribe(async qParams => {
|
||||||
|
if (fired) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fired = true;
|
||||||
const error = qParams.providerId == null || qParams.email == null || qParams.token == null;
|
const error = qParams.providerId == null || qParams.email == null || qParams.token == null;
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 815b436f7c...5fb0247a6a
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden-web",
|
"name": "bitwarden-web",
|
||||||
"version": "2.23.0",
|
"version": "2.24.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bitwarden-web",
|
"name": "bitwarden-web",
|
||||||
"version": "2.23.0",
|
"version": "2.24.3",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden-web",
|
"name": "bitwarden-web",
|
||||||
"version": "2.23.0",
|
"version": "2.24.3",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": "https://github.com/bitwarden/web",
|
"repository": "https://github.com/bitwarden/web",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import {
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.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 { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -37,7 +36,7 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
|
|||||||
i18nService: I18nService, route: ActivatedRoute,
|
i18nService: I18nService, route: ActivatedRoute,
|
||||||
private apiService: ApiService, userService: UserService,
|
private apiService: ApiService, userService: UserService,
|
||||||
stateService: StateService, private cryptoService: CryptoService,
|
stateService: StateService, private cryptoService: CryptoService,
|
||||||
private policyService: PolicyService, private logService: LogService) {
|
private policyService: PolicyService) {
|
||||||
super(router, toasterService, i18nService, route, userService, stateService);
|
super(router, toasterService, i18nService, route, userService, stateService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,9 +101,7 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
|
|||||||
const policies = await this.apiService.getPoliciesByToken(qParams.organizationId, qParams.token,
|
const policies = await this.apiService.getPoliciesByToken(qParams.organizationId, qParams.token,
|
||||||
qParams.email, qParams.organizationUserId);
|
qParams.email, qParams.organizationUserId);
|
||||||
policyList = this.policyService.mapPoliciesFromToken(policies);
|
policyList = this.policyService.mapPoliciesFromToken(policies);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (policyList != null) {
|
if (policyList != null) {
|
||||||
const result = this.policyService.getResetPasswordPolicyOptions(policyList, qParams.organizationId);
|
const result = this.policyService.getResetPasswordPolicyOptions(policyList, qParams.organizationId);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Router } from '@angular/router';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hint.component';
|
import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hint.component';
|
||||||
@@ -14,8 +13,7 @@ import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hin
|
|||||||
})
|
})
|
||||||
export class HintComponent extends BaseHintComponent {
|
export class HintComponent extends BaseHintComponent {
|
||||||
constructor(router: Router, i18nService: I18nService,
|
constructor(router: Router, i18nService: I18nService,
|
||||||
apiService: ApiService, platformUtilsService: PlatformUtilsService,
|
apiService: ApiService, platformUtilsService: PlatformUtilsService) {
|
||||||
logService: LogService) {
|
super(router, i18nService, apiService, platformUtilsService);
|
||||||
super(router, i18nService, apiService, platformUtilsService, logService);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div class="col-10 col-md-5">
|
<div class="col-5">
|
||||||
<p class="text-center mb-4">
|
<p class="text-center mb-4">
|
||||||
<i class="fa fa-lock fa-4x text-muted" aria-hidden="true"></i>
|
<i class="fa fa-lock fa-4x text-muted" aria-hidden="true"></i>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { StateService } from 'jslib-common/abstractions/state.service';
|
import { StateService } from 'jslib-common/abstractions/state.service';
|
||||||
@@ -27,9 +26,9 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
userService: UserService, cryptoService: CryptoService,
|
userService: UserService, cryptoService: CryptoService,
|
||||||
storageService: StorageService, vaultTimeoutService: VaultTimeoutService,
|
storageService: StorageService, vaultTimeoutService: VaultTimeoutService,
|
||||||
environmentService: EnvironmentService, private routerService: RouterService,
|
environmentService: EnvironmentService, private routerService: RouterService,
|
||||||
stateService: StateService, apiService: ApiService, logService: LogService) {
|
stateService: StateService, apiService: ApiService) {
|
||||||
super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService,
|
super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService,
|
||||||
storageService, vaultTimeoutService, environmentService, stateService, apiService, logService);
|
storageService, vaultTimeoutService, environmentService, stateService, apiService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div class="col-10 col-md-5">
|
<div class="col-5">
|
||||||
<img class="mb-2 logo logo-themed" alt="Bitwarden">
|
<img class="mb-2 logo logo-themed" alt="Bitwarden">
|
||||||
<p class="lead text-center mx-4 mb-4">{{'loginOrCreateNewAccount' | i18n}}</p>
|
<p class="lead text-center mx-4 mb-4">{{'loginOrCreateNewAccount' | i18n}}</p>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
||||||
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
||||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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';
|
||||||
@@ -35,17 +32,17 @@ export class LoginComponent extends BaseLoginComponent {
|
|||||||
storageService: StorageService, stateService: StateService,
|
storageService: StorageService, stateService: StateService,
|
||||||
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
||||||
passwordGenerationService: PasswordGenerationService, cryptoFunctionService: CryptoFunctionService,
|
passwordGenerationService: PasswordGenerationService, cryptoFunctionService: CryptoFunctionService,
|
||||||
private apiService: ApiService, private policyService: PolicyService, logService: LogService) {
|
private apiService: ApiService, private policyService: PolicyService) {
|
||||||
super(authService, router,
|
super(authService, router,
|
||||||
platformUtilsService, i18nService,
|
platformUtilsService, i18nService,
|
||||||
stateService, environmentService,
|
stateService, environmentService,
|
||||||
passwordGenerationService, cryptoFunctionService,
|
passwordGenerationService, cryptoFunctionService,
|
||||||
storageService, logService);
|
storageService);
|
||||||
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
|
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
if (qParams.email != null && qParams.email.indexOf('@') > -1) {
|
if (qParams.email != null && qParams.email.indexOf('@') > -1) {
|
||||||
this.email = qParams.email;
|
this.email = qParams.email;
|
||||||
}
|
}
|
||||||
@@ -56,6 +53,9 @@ export class LoginComponent extends BaseLoginComponent {
|
|||||||
{ route: '/settings/create-organization', qParams: { plan: qParams.org } });
|
{ route: '/settings/create-organization', qParams: { plan: qParams.org } });
|
||||||
}
|
}
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const invite = await this.stateService.get<any>('orgInvitation');
|
const invite = await this.stateService.get<any>('orgInvitation');
|
||||||
@@ -65,9 +65,7 @@ export class LoginComponent extends BaseLoginComponent {
|
|||||||
const policies = await this.apiService.getPoliciesByToken(invite.organizationId, invite.token,
|
const policies = await this.apiService.getPoliciesByToken(invite.organizationId, invite.token,
|
||||||
invite.email, invite.organizationUserId);
|
invite.email, invite.organizationUserId);
|
||||||
policyList = this.policyService.mapPoliciesFromToken(policies);
|
policyList = this.policyService.mapPoliciesFromToken(policies);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (policyList != null) {
|
if (policyList != null) {
|
||||||
const result = this.policyService.getResetPasswordPolicyOptions(policyList, invite.organizationId);
|
const result = this.policyService.getResetPasswordPolicyOptions(policyList, invite.organizationId);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { DeleteRecoverRequest } from 'jslib-common/models/request/deleteRecoverRequest';
|
import { DeleteRecoverRequest } from 'jslib-common/models/request/deleteRecoverRequest';
|
||||||
|
|
||||||
@@ -18,8 +17,7 @@ export class RecoverDeleteComponent {
|
|||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private router: Router, private apiService: ApiService,
|
constructor(private router: Router, private apiService: ApiService,
|
||||||
private toasterService: ToasterService, private i18nService: I18nService,
|
private toasterService: ToasterService, private i18nService: I18nService) {
|
||||||
private logService: LogService) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
@@ -30,8 +28,6 @@ export class RecoverDeleteComponent {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('deleteRecoverEmailSent'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('deleteRecoverEmailSent'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { TwoFactorRecoveryRequest } from 'jslib-common/models/request/twoFactorRecoveryRequest';
|
import { TwoFactorRecoveryRequest } from 'jslib-common/models/request/twoFactorRecoveryRequest';
|
||||||
|
|
||||||
@@ -23,8 +22,7 @@ export class RecoverTwoFactorComponent {
|
|||||||
|
|
||||||
constructor(private router: Router, private apiService: ApiService,
|
constructor(private router: Router, private apiService: ApiService,
|
||||||
private toasterService: ToasterService, private i18nService: I18nService,
|
private toasterService: ToasterService, private i18nService: I18nService,
|
||||||
private cryptoService: CryptoService, private authService: AuthService,
|
private cryptoService: CryptoService, private authService: AuthService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
try {
|
try {
|
||||||
@@ -37,8 +35,6 @@ export class RecoverTwoFactorComponent {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('twoStepRecoverDisabled'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('twoStepRecoverDisabled'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<header class="header" *ngIf="layout === 'enterprise2'">
|
<header class="header" *ngIf="layout === 'enterprise2'">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7">
|
<div class="col-7">
|
||||||
<img alt="Bitwarden" class="logo mb-2" src="../../images/register-layout/logo-horizontal-white.png">
|
<img alt="Bitwarden" class="logo mb-2" src="../../images/register-layout/logo-horizontal-white.png">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7" *ngIf="layout">
|
<div class="col-7" *ngIf="layout">
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
<div *ngIf="layout === 'enterprise2'">
|
<div *ngIf="layout === 'enterprise2'">
|
||||||
<h2>Companies globally trust Bitwarden for password management.</h2>
|
<h2>Companies globally trust Bitwarden for password management.</h2>
|
||||||
@@ -38,9 +38,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div [ngClass]="{'col-md-6': layout, 'col-12': !layout}">
|
<div [ngClass]="{'col-5': layout, 'col-12': !layout}">
|
||||||
<div class="row justify-content-md-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div [ngClass]="{'col-md-6': !layout, 'col-12': layout}">
|
<div [ngClass]="{'col-5': !layout, 'col-12': layout}">
|
||||||
<p class="lead text-center mb-4" *ngIf="!layout">{{'createAccount' | i18n}}</p>
|
<p class="lead text-center mb-4" *ngIf="!layout">{{'createAccount' | i18n}}</p>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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';
|
||||||
@@ -41,13 +38,13 @@ export class RegisterComponent extends BaseRegisterComponent {
|
|||||||
apiService: ApiService, private route: ActivatedRoute,
|
apiService: ApiService, private route: ActivatedRoute,
|
||||||
stateService: StateService, platformUtilsService: PlatformUtilsService,
|
stateService: StateService, platformUtilsService: PlatformUtilsService,
|
||||||
passwordGenerationService: PasswordGenerationService, private policyService: PolicyService,
|
passwordGenerationService: PasswordGenerationService, private policyService: PolicyService,
|
||||||
environmentService: EnvironmentService, logService: LogService) {
|
environmentService: EnvironmentService) {
|
||||||
super(authService, router, i18nService, cryptoService, apiService, stateService, platformUtilsService,
|
super(authService, router, i18nService, cryptoService, apiService, stateService, platformUtilsService,
|
||||||
passwordGenerationService, environmentService, logService);
|
passwordGenerationService, environmentService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(qParams => {
|
||||||
this.referenceData = new ReferenceEventRequest();
|
this.referenceData = new ReferenceEventRequest();
|
||||||
if (qParams.email != null && qParams.email.indexOf('@') > -1) {
|
if (qParams.email != null && qParams.email.indexOf('@') > -1) {
|
||||||
this.email = qParams.email;
|
this.email = qParams.email;
|
||||||
@@ -71,6 +68,9 @@ export class RegisterComponent extends BaseRegisterComponent {
|
|||||||
if (this.referenceData.id === '') {
|
if (this.referenceData.id === '') {
|
||||||
this.referenceData.id = null;
|
this.referenceData.id = null;
|
||||||
}
|
}
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const invite = await this.stateService.get<any>('orgInvitation');
|
const invite = await this.stateService.get<any>('orgInvitation');
|
||||||
if (invite != null) {
|
if (invite != null) {
|
||||||
@@ -81,9 +81,7 @@ export class RegisterComponent extends BaseRegisterComponent {
|
|||||||
const policiesData = policies.data.map(p => new PolicyData(p));
|
const policiesData = policies.data.map(p => new PolicyData(p));
|
||||||
this.policies = policiesData.map(p => new Policy(p));
|
this.policies = policiesData.map(p => new Policy(p));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.policies != null) {
|
if (this.policies != null) {
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
||||||
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
||||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { StateService } from 'jslib-common/abstractions/state.service';
|
import { StateService } from 'jslib-common/abstractions/state.service';
|
||||||
@@ -31,16 +28,16 @@ export class SsoComponent extends BaseSsoComponent {
|
|||||||
storageService: StorageService, stateService: StateService,
|
storageService: StorageService, stateService: StateService,
|
||||||
platformUtilsService: PlatformUtilsService, apiService: ApiService,
|
platformUtilsService: PlatformUtilsService, apiService: ApiService,
|
||||||
cryptoFunctionService: CryptoFunctionService, environmentService: EnvironmentService,
|
cryptoFunctionService: CryptoFunctionService, environmentService: EnvironmentService,
|
||||||
passwordGenerationService: PasswordGenerationService, logService: LogService) {
|
passwordGenerationService: PasswordGenerationService) {
|
||||||
super(authService, router, i18nService, route, storageService, stateService, platformUtilsService,
|
super(authService, router, i18nService, route, storageService, stateService, platformUtilsService,
|
||||||
apiService, cryptoFunctionService, environmentService, passwordGenerationService, logService);
|
apiService, cryptoFunctionService, environmentService, passwordGenerationService);
|
||||||
this.redirectUri = window.location.origin + '/sso-connector.html';
|
this.redirectUri = window.location.origin + '/sso-connector.html';
|
||||||
this.clientId = 'web';
|
this.clientId = 'web';
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
if (qParams.identifier != null) {
|
if (qParams.identifier != null) {
|
||||||
this.identifier = qParams.identifier;
|
this.identifier = qParams.identifier;
|
||||||
} else {
|
} else {
|
||||||
@@ -49,6 +46,9 @@ export class SsoComponent extends BaseSsoComponent {
|
|||||||
this.identifier = storedIdentifier;
|
this.identifier = storedIdentifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate autocomplete="off">
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate autocomplete="off">
|
||||||
<div class="row justify-content-md-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div class="col-md-5"
|
<div class="col-5"
|
||||||
[ngClass]="{'col-md-9': selectedProviderType === providerType.Duo || selectedProviderType === providerType.OrganizationDuo}">
|
[ngClass]="{'col-9': selectedProviderType === providerType.Duo || selectedProviderType === providerType.OrganizationDuo}">
|
||||||
<p class="lead text-center mb-4">{{title}}</p>
|
<p class="lead text-center mb-4">{{title}}</p>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType'
|
|||||||
|
|
||||||
import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib-angular/components/two-factor.component';
|
import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib-angular/components/two-factor.component';
|
||||||
|
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { TwoFactorOptionsComponent } from './two-factor-options.component';
|
import { TwoFactorOptionsComponent } from './two-factor-options.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -37,9 +36,9 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
i18nService: I18nService, apiService: ApiService,
|
i18nService: I18nService, apiService: ApiService,
|
||||||
platformUtilsService: PlatformUtilsService, stateService: StateService,
|
platformUtilsService: PlatformUtilsService, stateService: StateService,
|
||||||
environmentService: EnvironmentService, private modalService: ModalService,
|
environmentService: EnvironmentService, private modalService: ModalService,
|
||||||
storageService: StorageService, route: ActivatedRoute, logService: LogService) {
|
storageService: StorageService, route: ActivatedRoute) {
|
||||||
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService,
|
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService,
|
||||||
stateService, storageService, route, logService);
|
stateService, storageService, route);
|
||||||
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
|
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
||||||
<div class="row justify-content-md-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div class="col-md-4">
|
<div class="col-4">
|
||||||
<p class="lead text-center mb-4">{{'updateMasterPassword' | i18n}}</p>
|
<p class="lead text-center mb-4">{{'updateMasterPassword' | i18n}}</p>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Component } from '@angular/core';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
@@ -23,8 +22,8 @@ export class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent
|
|||||||
passwordGenerationService: PasswordGenerationService, policyService: PolicyService,
|
passwordGenerationService: PasswordGenerationService, policyService: PolicyService,
|
||||||
cryptoService: CryptoService, userService: UserService,
|
cryptoService: CryptoService, userService: UserService,
|
||||||
messagingService: MessagingService, apiService: ApiService,
|
messagingService: MessagingService, apiService: ApiService,
|
||||||
syncService: SyncService, logService: LogService) {
|
syncService: SyncService) {
|
||||||
super(i18nService, platformUtilsService, passwordGenerationService, policyService, cryptoService,
|
super(i18nService, platformUtilsService, passwordGenerationService, policyService, cryptoService,
|
||||||
userService, messagingService, apiService, syncService, logService);
|
userService, messagingService, apiService, syncService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,10 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
import { VerifyEmailRequest } from 'jslib-common/models/request/verifyEmailRequest';
|
import { VerifyEmailRequest } from 'jslib-common/models/request/verifyEmailRequest';
|
||||||
@@ -25,11 +22,15 @@ import { VerifyEmailRequest } from 'jslib-common/models/request/verifyEmailReque
|
|||||||
export class VerifyEmailTokenComponent implements OnInit {
|
export class VerifyEmailTokenComponent implements OnInit {
|
||||||
constructor(private router: Router, private toasterService: ToasterService,
|
constructor(private router: Router, private toasterService: ToasterService,
|
||||||
private i18nService: I18nService, private route: ActivatedRoute,
|
private i18nService: I18nService, private route: ActivatedRoute,
|
||||||
private apiService: ApiService, private userService: UserService,
|
private apiService: ApiService, private userService: UserService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
let fired = false;
|
||||||
|
this.route.queryParams.subscribe(async qParams => {
|
||||||
|
if (fired) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fired = true;
|
||||||
if (qParams.userId != null && qParams.token != null) {
|
if (qParams.userId != null && qParams.token != null) {
|
||||||
try {
|
try {
|
||||||
await this.apiService.postAccountVerifyEmailToken(
|
await this.apiService.postAccountVerifyEmailToken(
|
||||||
@@ -41,9 +42,7 @@ export class VerifyEmailTokenComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null, this.i18nService.t('emailVerified'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('emailVerified'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.toasterService.popAsync('error', null, this.i18nService.t('emailVerifiedFailed'));
|
this.toasterService.popAsync('error', null, this.i18nService.t('emailVerifiedFailed'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
|
|||||||
@@ -7,13 +7,10 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { VerifyDeleteRecoverRequest } from 'jslib-common/models/request/verifyDeleteRecoverRequest';
|
import { VerifyDeleteRecoverRequest } from 'jslib-common/models/request/verifyDeleteRecoverRequest';
|
||||||
|
|
||||||
@@ -30,11 +27,16 @@ export class VerifyRecoverDeleteComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private router: Router, private apiService: ApiService,
|
constructor(private router: Router, private apiService: ApiService,
|
||||||
private toasterService: ToasterService, private i18nService: I18nService,
|
private toasterService: ToasterService, private i18nService: I18nService,
|
||||||
private route: ActivatedRoute, private logService: LogService) {
|
private route: ActivatedRoute) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
let fired = false;
|
||||||
|
this.route.queryParams.subscribe(async qParams => {
|
||||||
|
if (fired) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fired = true;
|
||||||
if (qParams.userId != null && qParams.token != null && qParams.email != null) {
|
if (qParams.userId != null && qParams.token != null && qParams.email != null) {
|
||||||
this.userId = qParams.userId;
|
this.userId = qParams.userId;
|
||||||
this.token = qParams.token;
|
this.token = qParams.token;
|
||||||
@@ -53,8 +55,6 @@ export class VerifyRecoverDeleteComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('accountDeleted'),
|
this.toasterService.popAsync('success', this.i18nService.t('accountDeleted'),
|
||||||
this.i18nService.t('accountDeletedDesc'));
|
this.i18nService.t('accountDeletedDesc'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import {
|
|||||||
ToasterService,
|
ToasterService,
|
||||||
} from 'angular2-toaster';
|
} from 'angular2-toaster';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { StateService } from 'jslib-common/abstractions/state.service';
|
import { StateService } from 'jslib-common/abstractions/state.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -37,7 +35,12 @@ export abstract class BaseAcceptComponent implements OnInit {
|
|||||||
abstract unauthedHandler(qParams: any): Promise<void>;
|
abstract unauthedHandler(qParams: any): Promise<void>;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
let fired = false;
|
||||||
|
this.route.queryParams.subscribe(async qParams => {
|
||||||
|
if (fired) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fired = true;
|
||||||
await this.stateService.remove('loginRedirect');
|
await this.stateService.remove('loginRedirect');
|
||||||
|
|
||||||
let error = this.requiredParameters.some(e => qParams?.[e] == null || qParams[e] === '');
|
let error = this.requiredParameters.some(e => qParams?.[e] == null || qParams[e] === '');
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
|||||||
protected toasterService: ToasterService, protected cryptoService: CryptoService,
|
protected toasterService: ToasterService, protected cryptoService: CryptoService,
|
||||||
private storageService: StorageService, protected validationService: ValidationService,
|
private storageService: StorageService, protected validationService: ValidationService,
|
||||||
protected modalService: ModalService, private logService: LogService,
|
protected modalService: ModalService, private logService: LogService,
|
||||||
private searchPipe: SearchPipe, protected userNamePipe: UserNamePipe ) { }
|
private searchPipe: SearchPipe, protected userNamePipe: UserNamePipe) { }
|
||||||
|
|
||||||
abstract edit(user: UserType): void;
|
abstract edit(user: UserType): void;
|
||||||
abstract getUsers(): Promise<ListResponse<UserType>>;
|
abstract getUsers(): Promise<ListResponse<UserType>>;
|
||||||
@@ -256,9 +256,7 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
|||||||
comp.formPromise = confirmUser(publicKey);
|
comp.formPromise = confirmUser(publicKey);
|
||||||
await comp.formPromise;
|
await comp.formPromise;
|
||||||
modal.close();
|
modal.close();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -267,9 +265,7 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
|||||||
try {
|
try {
|
||||||
const fingerprint = await this.cryptoService.getFingerprint(user.userId, publicKey.buffer);
|
const fingerprint = await this.cryptoService.getFingerprint(user.userId, publicKey.buffer);
|
||||||
this.logService.info(`User's fingerprint: ${fingerprint.join('-')}`);
|
this.logService.info(`User's fingerprint: ${fingerprint.join('-')}`);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
await confirmUser(publicKey);
|
await confirmUser(publicKey);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.error(`Handled exception: ${e}`);
|
this.logService.error(`Handled exception: ${e}`);
|
||||||
|
|||||||
138
src/app/components/avatar.component.ts
Normal file
138
src/app/components/avatar.component.ts
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
import {
|
||||||
|
Component,
|
||||||
|
Input,
|
||||||
|
OnChanges,
|
||||||
|
OnInit,
|
||||||
|
} from '@angular/core';
|
||||||
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
||||||
|
import { StateService } from 'jslib-common/abstractions/state.service';
|
||||||
|
|
||||||
|
import { Utils } from 'jslib-common/misc/utils';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-avatar',
|
||||||
|
template: '<img [src]="sanitizer.bypassSecurityTrustResourceUrl(src)" title="{{data}}" ' +
|
||||||
|
'[ngClass]="{\'rounded-circle\': circle}">',
|
||||||
|
})
|
||||||
|
export class AvatarComponent implements OnChanges, OnInit {
|
||||||
|
@Input() data: string;
|
||||||
|
@Input() email: string;
|
||||||
|
@Input() size = 45;
|
||||||
|
@Input() charCount = 2;
|
||||||
|
@Input() textColor = '#ffffff';
|
||||||
|
@Input() fontSize = 20;
|
||||||
|
@Input() fontWeight = 300;
|
||||||
|
@Input() dynamic = false;
|
||||||
|
@Input() circle = false;
|
||||||
|
|
||||||
|
src: string;
|
||||||
|
|
||||||
|
constructor(public sanitizer: DomSanitizer, private cryptoFunctionService: CryptoFunctionService,
|
||||||
|
private stateService: StateService) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if (!this.dynamic) {
|
||||||
|
this.generate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnChanges() {
|
||||||
|
if (this.dynamic) {
|
||||||
|
this.generate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async generate() {
|
||||||
|
const enableGravatars = await this.stateService.get<boolean>('enableGravatars');
|
||||||
|
if (enableGravatars && this.email != null) {
|
||||||
|
const hashBytes = await this.cryptoFunctionService.hash(this.email.toLowerCase().trim(), 'md5');
|
||||||
|
const hash = Utils.fromBufferToHex(hashBytes).toLowerCase();
|
||||||
|
this.src = 'https://www.gravatar.com/avatar/' + hash + '?s=' + this.size + '&r=pg&d=retro';
|
||||||
|
} else {
|
||||||
|
let chars: string = null;
|
||||||
|
const upperData = this.data.toUpperCase();
|
||||||
|
|
||||||
|
if (this.charCount > 1) {
|
||||||
|
chars = this.getFirstLetters(upperData, this.charCount);
|
||||||
|
}
|
||||||
|
if (chars == null) {
|
||||||
|
chars = this.unicodeSafeSubstring(upperData, this.charCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the chars contain an emoji, only show it.
|
||||||
|
if (chars.match(Utils.regexpEmojiPresentation)) {
|
||||||
|
chars = chars.match(Utils.regexpEmojiPresentation)[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const charObj = this.getCharText(chars);
|
||||||
|
const color = this.stringToColor(upperData);
|
||||||
|
const svg = this.getSvg(this.size, color);
|
||||||
|
svg.appendChild(charObj);
|
||||||
|
const html = window.document.createElement('div').appendChild(svg).outerHTML;
|
||||||
|
const svgHtml = window.btoa(unescape(encodeURIComponent(html)));
|
||||||
|
this.src = 'data:image/svg+xml;base64,' + svgHtml;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private stringToColor(str: string): string {
|
||||||
|
let hash = 0;
|
||||||
|
for (let i = 0; i < str.length; i++) {
|
||||||
|
// tslint:disable-next-line
|
||||||
|
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
||||||
|
}
|
||||||
|
let color = '#';
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
// tslint:disable-next-line
|
||||||
|
const value = (hash >> (i * 8)) & 0xFF;
|
||||||
|
color += ('00' + value.toString(16)).substr(-2);
|
||||||
|
}
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getFirstLetters(data: string, count: number): string {
|
||||||
|
const parts = data.split(' ');
|
||||||
|
if (parts.length > 1) {
|
||||||
|
let text = '';
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
text += this.unicodeSafeSubstring(parts[i], 1);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getSvg(size: number, color: string): HTMLElement {
|
||||||
|
const svgTag = window.document.createElement('svg');
|
||||||
|
svgTag.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
||||||
|
svgTag.setAttribute('pointer-events', 'none');
|
||||||
|
svgTag.setAttribute('width', size.toString());
|
||||||
|
svgTag.setAttribute('height', size.toString());
|
||||||
|
svgTag.style.backgroundColor = color;
|
||||||
|
svgTag.style.width = size + 'px';
|
||||||
|
svgTag.style.height = size + 'px';
|
||||||
|
return svgTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getCharText(character: string): HTMLElement {
|
||||||
|
const textTag = window.document.createElement('text');
|
||||||
|
textTag.setAttribute('text-anchor', 'middle');
|
||||||
|
textTag.setAttribute('y', '50%');
|
||||||
|
textTag.setAttribute('x', '50%');
|
||||||
|
textTag.setAttribute('dy', '0.35em');
|
||||||
|
textTag.setAttribute('pointer-events', 'auto');
|
||||||
|
textTag.setAttribute('fill', this.textColor);
|
||||||
|
textTag.setAttribute('font-family', '"Open Sans","Helvetica Neue",Helvetica,Arial,' +
|
||||||
|
'sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"');
|
||||||
|
textTag.textContent = character;
|
||||||
|
textTag.style.fontWeight = this.fontWeight.toString();
|
||||||
|
textTag.style.fontSize = this.fontSize + 'px';
|
||||||
|
return textTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
private unicodeSafeSubstring(str: string, count: number) {
|
||||||
|
const characters = str.match(/./ug);
|
||||||
|
return characters != null ? characters.slice(0, count).join('') : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -49,8 +48,7 @@ export class CollectionAddEditComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService,
|
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService,
|
||||||
private cryptoService: CryptoService, private userService: UserService,
|
private cryptoService: CryptoService, private userService: UserService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const organization = await this.userService.getOrganization(this.organizationId);
|
const organization = await this.userService.getOrganization(this.organizationId);
|
||||||
@@ -79,9 +77,7 @@ export class CollectionAddEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.title = this.i18nService.t('addCollection');
|
this.title = this.i18nService.t('addCollection');
|
||||||
}
|
}
|
||||||
@@ -131,9 +127,7 @@ export class CollectionAddEditComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t(this.editMode ? 'editedCollectionId' : 'createdCollectionId', this.name));
|
this.i18nService.t(this.editMode ? 'editedCollectionId' : 'createdCollectionId', this.name));
|
||||||
this.onSavedCollection.emit();
|
this.onSavedCollection.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete() {
|
async delete() {
|
||||||
@@ -153,8 +147,6 @@ export class CollectionAddEditComponent implements OnInit {
|
|||||||
await this.deletePromise;
|
await this.deletePromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('deletedCollectionId', this.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('deletedCollectionId', this.name));
|
||||||
this.onDeletedCollection.emit();
|
this.onDeletedCollection.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,9 @@ import {
|
|||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { SearchService } from 'jslib-common/abstractions/search.service';
|
import { SearchService } from 'jslib-common/abstractions/search.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -58,14 +55,17 @@ export class CollectionsComponent implements OnInit {
|
|||||||
private collectionService: CollectionService, private modalService: ModalService,
|
private collectionService: CollectionService, private modalService: ModalService,
|
||||||
private toasterService: ToasterService, private i18nService: I18nService,
|
private toasterService: ToasterService, private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService, private userService: UserService,
|
private platformUtilsService: PlatformUtilsService, private userService: UserService,
|
||||||
private searchService: SearchService, private logService: LogService) { }
|
private searchService: SearchService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.parent.parent.params.subscribe(async params => {
|
this.route.parent.parent.params.subscribe(async params => {
|
||||||
this.organizationId = params.organizationId;
|
this.organizationId = params.organizationId;
|
||||||
await this.load();
|
await this.load();
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.searchText = qParams.search;
|
this.searchText = qParams.search;
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -155,8 +155,7 @@ export class CollectionsComponent implements OnInit {
|
|||||||
await this.apiService.deleteCollection(this.organizationId, collection.id);
|
await this.apiService.deleteCollection(this.organizationId, collection.id);
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('deletedCollectionId', collection.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('deletedCollectionId', collection.name));
|
||||||
this.removeCollection(collection);
|
this.removeCollection(collection);
|
||||||
} catch (e) {
|
} catch {
|
||||||
this.logService.error(e);
|
|
||||||
this.toasterService.popAsync('error', null, this.i18nService.t('missingPermissions'));
|
this.toasterService.popAsync('error', null, this.i18nService.t('missingPermissions'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { EventService } from '../../services/event.service';
|
import { EventService } from '../../services/event.service';
|
||||||
|
|
||||||
@@ -43,7 +42,7 @@ export class EntityEventsComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private eventService: EventService, private toasterService: ToasterService,
|
private eventService: EventService, private toasterService: ToasterService,
|
||||||
private userNamePipe: UserNamePipe, private logService: LogService) { }
|
private userNamePipe: UserNamePipe) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const defaultDates = this.eventService.getDefaultDateFilters();
|
const defaultDates = this.eventService.getDefaultDateFilters();
|
||||||
@@ -99,9 +98,7 @@ export class EntityEventsComponent implements OnInit {
|
|||||||
this.morePromise = promise;
|
this.morePromise = promise;
|
||||||
}
|
}
|
||||||
response = await promise;
|
response = await promise;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.continuationToken = response.continuationToken;
|
this.continuationToken = response.continuationToken;
|
||||||
const events = await Promise.all(response.data.map(async r => {
|
const events = await Promise.all(response.data.map(async r => {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { OrganizationUserStatusType } from 'jslib-common/enums/organizationUserStatusType';
|
import { OrganizationUserStatusType } from 'jslib-common/enums/organizationUserStatusType';
|
||||||
import { OrganizationUserType } from 'jslib-common/enums/organizationUserType';
|
import { OrganizationUserType } from 'jslib-common/enums/organizationUserType';
|
||||||
@@ -42,7 +41,7 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await this.loadUsers();
|
await this.loadUsers();
|
||||||
@@ -131,8 +130,6 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('updatedUsers'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('updatedUsers'));
|
||||||
this.onEditedUsers.emit();
|
this.onEditedUsers.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { CollectionData } from 'jslib-common/models/data/collectionData';
|
import { CollectionData } from 'jslib-common/models/data/collectionData';
|
||||||
@@ -43,7 +42,7 @@ export class GroupAddEditComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private collectionService: CollectionService,
|
private toasterService: ToasterService, private collectionService: CollectionService,
|
||||||
private platformUtilsService: PlatformUtilsService, private logService: LogService) { }
|
private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.editMode = this.loading = this.groupId != null;
|
this.editMode = this.loading = this.groupId != null;
|
||||||
@@ -67,9 +66,7 @@ export class GroupAddEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.title = this.i18nService.t('addGroup');
|
this.title = this.i18nService.t('addGroup');
|
||||||
}
|
}
|
||||||
@@ -115,9 +112,7 @@ export class GroupAddEditComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t(this.editMode ? 'editedGroupId' : 'createdGroupId', this.name));
|
this.i18nService.t(this.editMode ? 'editedGroupId' : 'createdGroupId', this.name));
|
||||||
this.onSavedGroup.emit();
|
this.onSavedGroup.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete() {
|
async delete() {
|
||||||
@@ -137,8 +132,6 @@ export class GroupAddEditComponent implements OnInit {
|
|||||||
await this.deletePromise;
|
await this.deletePromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', this.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', this.name));
|
||||||
this.onDeletedGroup.emit();
|
this.onDeletedGroup.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,10 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { SearchService } from 'jslib-common/abstractions/search.service';
|
import { SearchService } from 'jslib-common/abstractions/search.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -52,7 +49,7 @@ export class GroupsComponent implements OnInit {
|
|||||||
private i18nService: I18nService, private modalService: ModalService,
|
private i18nService: I18nService, private modalService: ModalService,
|
||||||
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService,
|
private toasterService: ToasterService, private platformUtilsService: PlatformUtilsService,
|
||||||
private userService: UserService, private router: Router,
|
private userService: UserService, private router: Router,
|
||||||
private searchService: SearchService, private logService: LogService) { }
|
private searchService: SearchService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.parent.parent.params.subscribe(async params => {
|
this.route.parent.parent.params.subscribe(async params => {
|
||||||
@@ -63,8 +60,11 @@ export class GroupsComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await this.load();
|
await this.load();
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.searchText = qParams.search;
|
this.searchText = qParams.search;
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -125,9 +125,7 @@ export class GroupsComponent implements OnInit {
|
|||||||
await this.apiService.deleteGroup(this.organizationId, group.id);
|
await this.apiService.deleteGroup(this.organizationId, group.id);
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', group.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', group.name));
|
||||||
this.removeGroup(group);
|
this.removeGroup(group);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async users(group: GroupResponse) {
|
async users(group: GroupResponse) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="container page-content">
|
<div class="container page-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4 col-lg-3 mt-4 mt-md-0">
|
<div class="col-3">
|
||||||
<div class="card" *ngIf="organization">
|
<div class="card" *ngIf="organization">
|
||||||
<div class="card-header">{{'manage' | i18n}}</div>
|
<div class="card-header">{{'manage' | i18n}}</div>
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-8 col-lg-9 mt-4 mt-md-0">
|
<div class="col-9">
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import {
|
|||||||
ViewContainerRef,
|
ViewContainerRef,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ActivatedRoute,
|
ActivatedRoute,
|
||||||
Router,
|
Router,
|
||||||
@@ -122,7 +120,7 @@ export class PeopleComponent extends BasePeopleComponent<OrganizationUserUserDet
|
|||||||
|
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.searchText = qParams.search;
|
this.searchText = qParams.search;
|
||||||
if (qParams.viewEvents != null) {
|
if (qParams.viewEvents != null) {
|
||||||
const user = this.users.filter(u => u.id === qParams.viewEvents);
|
const user = this.users.filter(u => u.id === qParams.viewEvents);
|
||||||
@@ -130,6 +128,9 @@ export class PeopleComponent extends BasePeopleComponent<OrganizationUserUserDet
|
|||||||
this.events(user[0]);
|
this.events(user[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { PolicyType } from 'jslib-common/enums/policyType';
|
import { PolicyType } from 'jslib-common/enums/policyType';
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
@@ -60,7 +58,7 @@ export class PoliciesComponent implements OnInit {
|
|||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
// Handle policies component launch from Event message
|
// Handle policies component launch from Event message
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
if (qParams.policyId != null) {
|
if (qParams.policyId != null) {
|
||||||
const policyIdFromEvents: string = qParams.policyId;
|
const policyIdFromEvents: string = qParams.policyId;
|
||||||
for (const orgPolicy of this.orgPolicies) {
|
for (const orgPolicy of this.orgPolicies) {
|
||||||
@@ -75,6 +73,10 @@ export class PoliciesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { PolicyType } from 'jslib-common/enums/policyType';
|
import { PolicyType } from 'jslib-common/enums/policyType';
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ export class PolicyEditComponent {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private componentFactoryResolver: ComponentFactoryResolver,
|
private toasterService: ToasterService, private componentFactoryResolver: ComponentFactoryResolver,
|
||||||
private cdr: ChangeDetectorRef, private logService: LogService) {
|
private cdr: ChangeDetectorRef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngAfterViewInit() {
|
async ngAfterViewInit() {
|
||||||
@@ -87,8 +86,6 @@ export class PolicyEditComponent {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('editedPolicyId', this.i18nService.t(this.policy.name)));
|
this.toasterService.popAsync('success', null, this.i18nService.t('editedPolicyId', this.i18nService.t(this.policy.name)));
|
||||||
this.onSavedPolicy.emit();
|
this.onSavedPolicy.emit();
|
||||||
} catch (e) {
|
} catch {}
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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';
|
||||||
@@ -40,7 +39,7 @@ export class ResetPasswordComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService, private passwordGenerationService: PasswordGenerationService,
|
private platformUtilsService: PlatformUtilsService, private passwordGenerationService: PasswordGenerationService,
|
||||||
private policyService: PolicyService, private cryptoService: CryptoService, private logService: LogService) { }
|
private policyService: PolicyService, private cryptoService: CryptoService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
// Get Enforced Policy Options
|
// Get Enforced Policy Options
|
||||||
@@ -144,9 +143,7 @@ export class ResetPasswordComponent implements OnInit {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.platformUtilsService.showToast('success', null, this.i18nService.t('resetPasswordSuccess'));
|
this.platformUtilsService.showToast('success', null, this.i18nService.t('resetPasswordSuccess'));
|
||||||
this.onPasswordReset.emit();
|
this.onPasswordReset.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePasswordStrength() {
|
updatePasswordStrength() {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
{{'permissions' | i18n}}
|
{{'permissions' | i18n}}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="font-weight-bold mb-0">Manager Permissions</label>
|
<label class="font-weight-bold mb-0">Manager Permissions</label>
|
||||||
<hr class="my-0 mr-2" />
|
<hr class="my-0 mr-2" />
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</app-nested-checkbox>
|
</app-nested-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="font-weight-bold mb-0">Admin Permissions</label>
|
<label class="font-weight-bold mb-0">Admin Permissions</label>
|
||||||
<hr class="my-0 mr-2" />
|
<hr class="my-0 mr-2" />
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { CollectionData } from 'jslib-common/models/data/collectionData';
|
import { CollectionData } from 'jslib-common/models/data/collectionData';
|
||||||
@@ -86,7 +85,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private collectionService: CollectionService,
|
private toasterService: ToasterService, private collectionService: CollectionService,
|
||||||
private platformUtilsService: PlatformUtilsService, private logService: LogService) { }
|
private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.editMode = this.loading = this.organizationUserId != null;
|
this.editMode = this.loading = this.organizationUserId != null;
|
||||||
@@ -112,9 +111,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.title = this.i18nService.t('inviteUser');
|
this.title = this.i18nService.t('inviteUser');
|
||||||
}
|
}
|
||||||
@@ -183,9 +180,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
||||||
this.onSavedUser.emit();
|
this.onSavedUser.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete() {
|
async delete() {
|
||||||
@@ -205,8 +200,6 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
await this.deletePromise;
|
await this.deletePromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', this.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', this.name));
|
||||||
this.onDeletedUser.emit();
|
this.onDeletedUser.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
import { ConstantsService } from 'jslib-common/services/constants.service';
|
import { ConstantsService } from 'jslib-common/services/constants.service';
|
||||||
|
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -27,8 +26,7 @@ export class UserConfirmComponent implements OnInit {
|
|||||||
fingerprint: string;
|
fingerprint: string;
|
||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private cryptoService: CryptoService, private storageService: StorageService,
|
constructor(private cryptoService: CryptoService, private storageService: StorageService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
try {
|
try {
|
||||||
@@ -38,9 +36,7 @@ export class UserConfirmComponent implements OnInit {
|
|||||||
this.fingerprint = fingerprint.join('-');
|
this.fingerprint = fingerprint.join('-');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { OrganizationUserUpdateGroupsRequest } from 'jslib-common/models/request/organizationUserUpdateGroupsRequest';
|
import { OrganizationUserUpdateGroupsRequest } from 'jslib-common/models/request/organizationUserUpdateGroupsRequest';
|
||||||
import { GroupResponse } from 'jslib-common/models/response/groupResponse';
|
import { GroupResponse } from 'jslib-common/models/response/groupResponse';
|
||||||
@@ -32,7 +31,7 @@ export class UserGroupsComponent implements OnInit {
|
|||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const groupsResponse = await this.apiService.getGroups(this.organizationId);
|
const groupsResponse = await this.apiService.getGroups(this.organizationId);
|
||||||
@@ -51,9 +50,7 @@ export class UserGroupsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
@@ -79,8 +76,6 @@ export class UserGroupsComponent implements OnInit {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('editedGroupsForUser', this.name));
|
this.toasterService.popAsync('success', null, this.i18nService.t('editedGroupsForUser', this.name));
|
||||||
this.onSavedUser.emit();
|
this.onSavedUser.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minComplexity">{{'minComplexityScore' | i18n}}</label>
|
<label for="minComplexity">{{'minComplexityScore' | i18n}}</label>
|
||||||
<select id="minComplexity" name="minComplexity" formControlName="minComplexity" class="form-control">
|
<select id="minComplexity" name="minComplexity" formControlName="minComplexity" class="form-control">
|
||||||
<option *ngFor="let o of passwordScores" [ngValue]="o.value">{{o.name}}</option>
|
<option *ngFor="let o of passwordScores" [ngValue]="o.value">{{o.name}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minLength">{{'minLength' | i18n}}</label>
|
<label for="minLength">{{'minLength' | i18n}}</label>
|
||||||
<input id="minLength" class="form-control" type="number" min="8" name="minLength"
|
<input id="minLength" class="form-control" type="number" min="8" name="minLength"
|
||||||
formControlName="minLength">
|
formControlName="minLength">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group mb-0">
|
<div class="col-6 form-group mb-0">
|
||||||
<label for="defaultType">{{'defaultType' | i18n}}</label>
|
<label for="defaultType">{{'defaultType' | i18n}}</label>
|
||||||
<select id="defaultType" name="defaultType" formControlName="defaultType" class="form-control">
|
<select id="defaultType" name="defaultType" formControlName="defaultType" class="form-control">
|
||||||
<option *ngFor="let o of defaultTypes" [ngValue]="o.value">{{o.name}}</option>
|
<option *ngFor="let o of defaultTypes" [ngValue]="o.value">{{o.name}}</option>
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<h3 class="mt-4">{{'password' | i18n}}</h3>
|
<h3 class="mt-4">{{'password' | i18n}}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minLength">{{'minLength' | i18n}}</label>
|
<label for="minLength">{{'minLength' | i18n}}</label>
|
||||||
<input id="minLength" class="form-control" type="number" name="minLength" min="5" max="128"
|
<input id="minLength" class="form-control" type="number" name="minLength" min="5" max="128"
|
||||||
formControlName="minLength">
|
formControlName="minLength">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minNumbers">{{'minNumbers' | i18n}}</label>
|
<label for="minNumbers">{{'minNumbers' | i18n}}</label>
|
||||||
<input id="minNumbers" class="form-control" type="number" name="minNumbers" min="0" max="9"
|
<input id="minNumbers" class="form-control" type="number" name="minNumbers" min="0" max="9"
|
||||||
formControlName="minNumbers">
|
formControlName="minNumbers">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minSpecial">{{'minSpecial' | i18n}}</label>
|
<label for="minSpecial">{{'minSpecial' | i18n}}</label>
|
||||||
<input id="minSpecial" class="form-control" type="number" name="minSpecial" min="0" max="9"
|
<input id="minSpecial" class="form-control" type="number" name="minSpecial" min="0" max="9"
|
||||||
formControlName="minSpecial">
|
formControlName="minSpecial">
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h3 class="mt-4">{{'passphrase' | i18n}}</h3>
|
<h3 class="mt-4">{{'passphrase' | i18n}}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="minNumberWords">{{'minimumNumberOfWords' | i18n}}</label>
|
<label for="minNumberWords">{{'minimumNumberOfWords' | i18n}}</label>
|
||||||
<input id="minNumberWords" class="form-control" type="number" name="minNumberWords" min="3" max="20"
|
<input id="minNumberWords" class="form-control" type="number" name="minNumberWords" min="3" max="20"
|
||||||
formControlName="minNumberWords">
|
formControlName="minNumberWords">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<form *ngIf="org && !loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
<form *ngIf="org && !loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">{{'organizationName' | i18n}}</label>
|
<label for="name">{{'organizationName' | i18n}}</label>
|
||||||
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="org.name"
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="org.name"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
[(ngModel)]="org.identifier">
|
[(ngModel)]="org.identifier">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<app-avatar data="{{org.name}}" dynamic="true" size="75" fontSize="35"></app-avatar>
|
<app-avatar data="{{org.name}}" dynamic="true" size="75" fontSize="35"></app-avatar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ 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 { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { SyncService } from 'jslib-common/abstractions/sync.service';
|
import { SyncService } from 'jslib-common/abstractions/sync.service';
|
||||||
|
|
||||||
@@ -51,7 +50,7 @@ export class AccountComponent {
|
|||||||
private apiService: ApiService, private i18nService: I18nService,
|
private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private route: ActivatedRoute,
|
private toasterService: ToasterService, private route: ActivatedRoute,
|
||||||
private syncService: SyncService, private platformUtilsService: PlatformUtilsService,
|
private syncService: SyncService, private platformUtilsService: PlatformUtilsService,
|
||||||
private cryptoService: CryptoService, private logService: LogService) { }
|
private cryptoService: CryptoService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.selfHosted = this.platformUtilsService.isSelfHost();
|
this.selfHosted = this.platformUtilsService.isSelfHost();
|
||||||
@@ -60,9 +59,7 @@ export class AccountComponent {
|
|||||||
try {
|
try {
|
||||||
this.org = await this.apiService.getOrganization(this.organizationId);
|
this.org = await this.apiService.getOrganization(this.organizationId);
|
||||||
this.canUseApi = this.org.useApi;
|
this.canUseApi = this.org.useApi;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
@@ -87,9 +84,7 @@ export class AccountComponent {
|
|||||||
});
|
});
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('organizationUpdated'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('organizationUpdated'));
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async submitTaxInfo() {
|
async submitTaxInfo() {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { OrganizationSubscriptionUpdateRequest } from 'jslib-common/models/request/organizationSubscriptionUpdateRequest';
|
import { OrganizationSubscriptionUpdateRequest } from 'jslib-common/models/request/organizationSubscriptionUpdateRequest';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -31,7 +31,7 @@ export class AdjustSubscription {
|
|||||||
newMaxSeats: number;
|
newMaxSeats: number;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.limitSubscription = this.maxAutoscaleSeats != null;
|
this.limitSubscription = this.maxAutoscaleSeats != null;
|
||||||
@@ -48,9 +48,7 @@ export class AdjustSubscription {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
|
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('subscriptionUpdated'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('subscriptionUpdated'));
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
this.onAdjusted.emit();
|
this.onAdjusted.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { PlanType } from 'jslib-common/enums/planType';
|
import { PlanType } from 'jslib-common/enums/planType';
|
||||||
import { ProductType } from 'jslib-common/enums/productType';
|
import { ProductType } from 'jslib-common/enums/productType';
|
||||||
@@ -23,14 +24,12 @@ export class ChangePlanComponent {
|
|||||||
defaultUpgradePlan: PlanType = PlanType.FamiliesAnnually;
|
defaultUpgradePlan: PlanType = PlanType.FamiliesAnnually;
|
||||||
defaultUpgradeProduct: ProductType = ProductType.Families;
|
defaultUpgradeProduct: ProductType = ProductType.Families;
|
||||||
|
|
||||||
constructor(private logService: LogService) { }
|
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
try {
|
try {
|
||||||
this.onChanged.emit();
|
this.onChanged.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ export class DeleteOrganizationComponent {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private cryptoService: CryptoService,
|
private toasterService: ToasterService, private cryptoService: CryptoService,
|
||||||
private router: Router, private logService: LogService) { }
|
private router: Router) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.masterPassword == null || this.masterPassword === '') {
|
if (this.masterPassword == null || this.masterPassword === '') {
|
||||||
@@ -39,8 +38,6 @@ export class DeleteOrganizationComponent {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('organizationDeleted'),
|
this.toasterService.popAsync('success', this.i18nService.t('organizationDeleted'),
|
||||||
this.i18nService.t('organizationDeletedDesc'));
|
this.i18nService.t('organizationDeletedDesc'));
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
aria-hidden="true">×</span></button>
|
aria-hidden="true">×</span></button>
|
||||||
<h3 class="card-body-header">{{'downloadLicense' | i18n}}</h3>
|
<h3 class="card-body-header">{{'downloadLicense' | i18n}}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-12 col-md-6">
|
<div class="form-group col-6">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<label for="installationId">{{'enterInstallationId' | i18n}}</label>
|
<label for="installationId">{{'enterInstallationId' | i18n}}</label>
|
||||||
<a class="ml-auto" target="_blank" rel="noopener" appA11yTitle="{{'learnMore' | i18n}}"
|
<a class="ml-auto" target="_blank" rel="noopener" appA11yTitle="{{'learnMore' | i18n}}"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -21,8 +20,7 @@ export class DownloadLicenseComponent {
|
|||||||
installationId: string;
|
installationId: string;
|
||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService,
|
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.installationId == null || this.installationId === '') {
|
if (this.installationId == null || this.installationId === '') {
|
||||||
@@ -35,9 +33,7 @@ export class DownloadLicenseComponent {
|
|||||||
const licenseString = JSON.stringify(license, null, 2);
|
const licenseString = JSON.stringify(license, null, 2);
|
||||||
this.platformUtilsService.saveFile(window, licenseString, null, 'bitwarden_organization_license.json');
|
this.platformUtilsService.saveFile(window, licenseString, null, 'bitwarden_organization_license.json');
|
||||||
this.onDownloaded.emit();
|
this.onDownloaded.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { UserBillingComponent } from '../../settings/user-billing.component';
|
import { UserBillingComponent } from '../../settings/user-billing.component';
|
||||||
@@ -19,9 +18,8 @@ import { UserBillingComponent } from '../../settings/user-billing.component';
|
|||||||
})
|
})
|
||||||
export class OrganizationBillingComponent extends UserBillingComponent implements OnInit {
|
export class OrganizationBillingComponent extends UserBillingComponent implements OnInit {
|
||||||
constructor(apiService: ApiService, i18nService: I18nService, toasterService: ToasterService,
|
constructor(apiService: ApiService, i18nService: I18nService, toasterService: ToasterService,
|
||||||
private route: ActivatedRoute, platformUtilsService: PlatformUtilsService,
|
private route: ActivatedRoute, platformUtilsService: PlatformUtilsService) {
|
||||||
logService: LogService) {
|
super(apiService, i18nService, toasterService, platformUtilsService);
|
||||||
super(apiService, i18nService, toasterService, platformUtilsService, logService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8" *ngIf="subscription">
|
||||||
<strong class="d-block mb-1">{{'details' | i18n}}</strong>
|
<strong class="d-block mb-1">{{'details' | i18n}}</strong>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -70,6 +70,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
<ng-container>
|
||||||
|
<button type="button" class="btn btn-outline-secondary" (click)="changePlan()" *ngIf="showChangePlanButton">
|
||||||
|
{{'changeBillingPlan' | i18n}}
|
||||||
|
</button>
|
||||||
|
<app-change-plan [organizationId]="organizationId" (onChanged)="closeChangePlan(true)"
|
||||||
|
(onCanceled)="closeChangePlan(false)" *ngIf="showChangePlan"></app-change-plan>
|
||||||
|
</ng-container>
|
||||||
<h2 class="spaced-header">{{'manageSubscription' | i18n}}</h2>
|
<h2 class="spaced-header">{{'manageSubscription' | i18n}}</h2>
|
||||||
<p class="mb-4">{{subscriptionDesc}}</p>
|
<p class="mb-4">{{subscriptionDesc}}</p>
|
||||||
<ng-container *ngIf="subscription && canAdjustSeats && !subscription.cancelled && !subscriptionMarkedForCancel">
|
<ng-container *ngIf="subscription && canAdjustSeats && !subscription.cancelled && !subscriptionMarkedForCancel">
|
||||||
@@ -118,8 +125,6 @@
|
|||||||
<span>{{'cancelSubscription' | i18n}}</span>
|
<span>{{'cancelSubscription' | i18n}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<app-change-plan [organizationId]="organizationId" (onChanged)="closeChangePlan(true)"
|
|
||||||
(onCanceled)="closeChangePlan(false)" *ngIf="showChangePlan"></app-change-plan>
|
|
||||||
<div class="mt-3" *ngIf="showDownloadLicense">
|
<div class="mt-3" *ngIf="showDownloadLicense">
|
||||||
<app-download-license [organizationId]="organizationId" (onDownloaded)="closeDownloadLicense()"
|
<app-download-license [organizationId]="organizationId" (onDownloaded)="closeDownloadLicense()"
|
||||||
(onCanceled)="closeDownloadLicense()"></app-download-license>
|
(onCanceled)="closeDownloadLicense()"></app-download-license>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { OrganizationSubscriptionResponse } from 'jslib-common/models/response/o
|
|||||||
|
|
||||||
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 { 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 { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -44,7 +43,7 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
|||||||
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService,
|
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService,
|
||||||
private i18nService: I18nService, private toasterService: ToasterService,
|
private i18nService: I18nService, private toasterService: ToasterService,
|
||||||
private messagingService: MessagingService, private route: ActivatedRoute,
|
private messagingService: MessagingService, private route: ActivatedRoute,
|
||||||
private userService: UserService, private logService: LogService) {
|
private userService: UserService) {
|
||||||
this.selfHosted = platformUtilsService.isSelfHost();
|
this.selfHosted = platformUtilsService.isSelfHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,9 +82,7 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
|||||||
await this.reinstatePromise;
|
await this.reinstatePromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('reinstated'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('reinstated'));
|
||||||
this.load();
|
this.load();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async cancel() {
|
async cancel() {
|
||||||
@@ -104,21 +101,11 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
|||||||
await this.cancelPromise;
|
await this.cancelPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('canceledSubscription'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('canceledSubscription'));
|
||||||
this.load();
|
this.load();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async changePlan() {
|
async changePlan() {
|
||||||
if (this.subscription == null && this.sub.planType === PlanType.Free) {
|
this.showChangePlan = !this.showChangePlan;
|
||||||
this.showChangePlan = !this.showChangePlan;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const contactSupport = await this.platformUtilsService.showDialog(this.i18nService.t('changeBillingPlanDesc'),
|
|
||||||
this.i18nService.t('changeBillingPlan'), this.i18nService.t('contactSupport'), this.i18nService.t('close'));
|
|
||||||
if (contactSupport) {
|
|
||||||
this.platformUtilsService.launchUri('https://bitwarden.com/contact');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closeChangePlan(changed: boolean) {
|
closeChangePlan(changed: boolean) {
|
||||||
@@ -221,7 +208,11 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get subscriptionDesc() {
|
get subscriptionDesc() {
|
||||||
if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
|
if (this.sub.planType === PlanType.Free) {
|
||||||
|
return this.i18nService.t('subscriptionFreePlan', this.sub.seats.toString());
|
||||||
|
} else if (this.sub.planType === PlanType.FamiliesAnnually || this.sub.planType === PlanType.FamiliesAnnually2019) {
|
||||||
|
return this.i18nService.t('subscriptionFamiliesPlan', this.sub.seats.toString());
|
||||||
|
} else if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
|
||||||
return this.i18nService.t('subscriptionMaxReached', this.sub.seats.toString());
|
return this.i18nService.t('subscriptionMaxReached', this.sub.seats.toString());
|
||||||
} else if (this.sub.maxAutoscaleSeats == null) {
|
} else if (this.sub.maxAutoscaleSeats == null) {
|
||||||
return this.i18nService.t('subscriptionUserSeatsUnlimitedAutoscale');
|
return this.i18nService.t('subscriptionUserSeatsUnlimitedAutoscale');
|
||||||
@@ -229,4 +220,8 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
|||||||
return this.i18nService.t('subscriptionUserSeatsLimitedAutoscale', this.sub.maxAutoscaleSeats.toString());
|
return this.i18nService.t('subscriptionUserSeatsLimitedAutoscale', this.sub.maxAutoscaleSeats.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showChangePlanButton() {
|
||||||
|
return this.subscription == null && this.sub.planType === PlanType.Free && !this.showChangePlan;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="container page-content">
|
<div class="container page-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 col-lg-3 mt-4 mt-md-0">
|
<div class="col-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">{{'settings' | i18n}}</div>
|
<div class="card-header">{{'settings' | i18n}}</div>
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8 col-lg-9 mt-4 mt-md-0">
|
<div class="col-9">
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
|||||||
import { EventService } from 'jslib-common/abstractions/event.service';
|
import { EventService } from 'jslib-common/abstractions/event.service';
|
||||||
import { ExportService } from 'jslib-common/abstractions/export.service';
|
import { ExportService } from 'jslib-common/abstractions/export.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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';
|
||||||
|
|
||||||
@@ -18,10 +17,8 @@ import { ExportComponent as BaseExportComponent } from '../../tools/export.compo
|
|||||||
export class ExportComponent extends BaseExportComponent {
|
export class ExportComponent extends BaseExportComponent {
|
||||||
constructor(cryptoService: CryptoService, i18nService: I18nService,
|
constructor(cryptoService: CryptoService, i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService, exportService: ExportService,
|
platformUtilsService: PlatformUtilsService, exportService: ExportService,
|
||||||
eventService: EventService, private route: ActivatedRoute, policyService: PolicyService,
|
eventService: EventService, private route: ActivatedRoute, policyService: PolicyService) {
|
||||||
logService: LogService) {
|
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService);
|
||||||
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService,
|
|
||||||
logService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { ImportService } from 'jslib-common/abstractions/import.service';
|
import { ImportService } from 'jslib-common/abstractions/import.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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 { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -25,8 +24,8 @@ export class ImportComponent extends BaseImportComponent {
|
|||||||
constructor(i18nService: I18nService, toasterService: ToasterService,
|
constructor(i18nService: I18nService, toasterService: ToasterService,
|
||||||
importService: ImportService, router: Router, private route: ActivatedRoute,
|
importService: ImportService, router: Router, private route: ActivatedRoute,
|
||||||
platformUtilsService: PlatformUtilsService, policyService: PolicyService,
|
platformUtilsService: PlatformUtilsService, policyService: PolicyService,
|
||||||
private userService: UserService, logService: LogService) {
|
private userService: UserService) {
|
||||||
super(i18nService, toasterService, importService, router, platformUtilsService, policyService, logService);
|
super(i18nService, toasterService, importService, router, platformUtilsService, policyService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
|
|||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
import { CipherService } from 'jslib-common/abstractions/cipher.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 { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
|
import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
@@ -21,9 +20,9 @@ import { CipherView } from 'jslib-common/models/view/cipherView';
|
|||||||
})
|
})
|
||||||
export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorReportComponent {
|
export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorReportComponent {
|
||||||
constructor(cipherService: CipherService, modalService: ModalService,
|
constructor(cipherService: CipherService, modalService: ModalService,
|
||||||
messagingService: MessagingService, userService: UserService,
|
messagingService: MessagingService, userService: UserService, passwordRepromptService: PasswordRepromptService,
|
||||||
private route: ActivatedRoute, logService: LogService, passwordRepromptService: PasswordRepromptService) {
|
private route: ActivatedRoute) {
|
||||||
super(cipherService, modalService, messagingService, userService, logService, passwordRepromptService);
|
super(cipherService, modalService, messagingService, userService, passwordRepromptService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!loading">
|
<ng-container *ngIf="!loading">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4 col-lg-3">
|
<div class="col-3">
|
||||||
<div class="card mb-4" *ngIf="organization.canAccessImportExport">
|
<div class="card mb-4" *ngIf="organization.canAccessImportExport">
|
||||||
<div class="card-header">{{'tools' | i18n}}</div>
|
<div class="card-header">{{'tools' | i18n}}</div>
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-8 col-lg-9">
|
<div class="col-9">
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { CollectionService } from 'jslib-common/abstractions/collection.service'
|
|||||||
import { EventService } from 'jslib-common/abstractions/event.service';
|
import { EventService } from 'jslib-common/abstractions/event.service';
|
||||||
import { FolderService } from 'jslib-common/abstractions/folder.service';
|
import { FolderService } from 'jslib-common/abstractions/folder.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
@@ -38,10 +37,10 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
userService: UserService, collectionService: CollectionService,
|
userService: UserService, collectionService: CollectionService,
|
||||||
totpService: TotpService, passwordGenerationService: PasswordGenerationService,
|
totpService: TotpService, passwordGenerationService: PasswordGenerationService,
|
||||||
private apiService: ApiService, messagingService: MessagingService,
|
private apiService: ApiService, messagingService: MessagingService,
|
||||||
eventService: EventService, policyService: PolicyService, logService: LogService) {
|
eventService: EventService, policyService: PolicyService) {
|
||||||
super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService,
|
super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService,
|
||||||
userService, collectionService, totpService, passwordGenerationService, messagingService,
|
userService, collectionService, totpService, passwordGenerationService, messagingService,
|
||||||
eventService, policyService, logService);
|
eventService, policyService);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected allowOwnershipAssignment() {
|
protected allowOwnershipAssignment() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -26,10 +25,8 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
|||||||
|
|
||||||
constructor(cipherService: CipherService, i18nService: I18nService,
|
constructor(cipherService: CipherService, i18nService: I18nService,
|
||||||
cryptoService: CryptoService, userService: UserService,
|
cryptoService: CryptoService, userService: UserService,
|
||||||
platformUtilsService: PlatformUtilsService, apiService: ApiService,
|
platformUtilsService: PlatformUtilsService, apiService: ApiService) {
|
||||||
logService: LogService) {
|
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService);
|
||||||
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService,
|
|
||||||
logService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async reupload(attachment: AttachmentView) {
|
protected async reupload(attachment: AttachmentView) {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
||||||
import { EventService } from 'jslib-common/abstractions/event.service';
|
import { EventService } from 'jslib-common/abstractions/event.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
|
import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { SearchService } from 'jslib-common/abstractions/search.service';
|
import { SearchService } from 'jslib-common/abstractions/search.service';
|
||||||
@@ -37,10 +36,9 @@ export class CiphersComponent extends BaseCiphersComponent {
|
|||||||
constructor(searchService: SearchService, toasterService: ToasterService, i18nService: I18nService,
|
constructor(searchService: SearchService, toasterService: ToasterService, i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService, cipherService: CipherService,
|
platformUtilsService: PlatformUtilsService, cipherService: CipherService,
|
||||||
private apiService: ApiService, eventService: EventService, totpService: TotpService,
|
private apiService: ApiService, eventService: EventService, totpService: TotpService,
|
||||||
userService: UserService, passwordRepromptService: PasswordRepromptService,
|
userService: UserService, passwordRepromptService: PasswordRepromptService) {
|
||||||
logService: LogService) {
|
|
||||||
super(searchService, toasterService, i18nService, platformUtilsService, cipherService,
|
super(searchService, toasterService, i18nService, platformUtilsService, cipherService,
|
||||||
eventService, totpService, userService, passwordRepromptService, logService);
|
eventService, totpService, userService, passwordRepromptService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async load(filter: (cipher: CipherView) => boolean = null) {
|
async load(filter: (cipher: CipherView) => boolean = null) {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
||||||
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
import { CollectionService } from 'jslib-common/abstractions/collection.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { CipherData } from 'jslib-common/models/data/cipherData';
|
import { CipherData } from 'jslib-common/models/data/cipherData';
|
||||||
@@ -23,8 +22,8 @@ export class CollectionsComponent extends BaseCollectionsComponent {
|
|||||||
|
|
||||||
constructor(collectionService: CollectionService, platformUtilsService: PlatformUtilsService,
|
constructor(collectionService: CollectionService, platformUtilsService: PlatformUtilsService,
|
||||||
i18nService: I18nService, cipherService: CipherService,
|
i18nService: I18nService, cipherService: CipherService,
|
||||||
private apiService: ApiService, logService: LogService) {
|
private apiService: ApiService) {
|
||||||
super(collectionService, platformUtilsService, i18nService, cipherService, logService);
|
super(collectionService, platformUtilsService, i18nService, cipherService);
|
||||||
this.allowSelectNone = true;
|
this.allowSelectNone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<div class="container page-content">
|
<div class="container page-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4 col-lg-3">
|
<div class="col-3">
|
||||||
<app-org-vault-groupings [showFolders]="false" [showFavorites]="false" [showTrash]="true"
|
<app-org-vault-groupings [showFolders]="false" [showFavorites]="false" [showTrash]="true"
|
||||||
(onAllClicked)="clearGroupingFilters()" (onCipherTypeClicked)="filterCipherType($event)"
|
(onAllClicked)="clearGroupingFilters()" (onCipherTypeClicked)="filterCipherType($event)"
|
||||||
(onCollectionClicked)="filterCollection($event.id)" (onSearchTextChanged)="filterSearchText($event)"
|
(onCollectionClicked)="filterCollection($event.id)" (onSearchTextChanged)="filterSearchText($event)"
|
||||||
(onTrashClicked)="filterDeleted()">
|
(onTrashClicked)="filterDeleted()">
|
||||||
</app-org-vault-groupings>
|
</app-org-vault-groupings>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-8 col-lg-9">
|
<div class="col-9">
|
||||||
<div class="page-header d-flex">
|
<div class="page-header d-flex">
|
||||||
<h1>
|
<h1>
|
||||||
{{'vault' | i18n}}
|
{{'vault' | i18n}}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
@@ -67,12 +65,12 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
this.platformUtilsService.isSelfHost() ? 'trashCleanupWarningSelfHosted' : 'trashCleanupWarning'
|
this.platformUtilsService.isSelfHost() ? 'trashCleanupWarningSelfHosted' : 'trashCleanupWarning'
|
||||||
);
|
);
|
||||||
|
|
||||||
this.route.parent.params.pipe(first()).subscribe(async params => {
|
const queryParams = this.route.parent.params.subscribe(async params => {
|
||||||
this.organization = await this.userService.getOrganization(params.organizationId);
|
this.organization = await this.userService.getOrganization(params.organizationId);
|
||||||
this.groupingsComponent.organization = this.organization;
|
this.groupingsComponent.organization = this.organization;
|
||||||
this.ciphersComponent.organization = this.organization;
|
this.ciphersComponent.organization = this.organization;
|
||||||
|
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
this.ciphersComponent.searchText = this.groupingsComponent.searchText = qParams.search;
|
this.ciphersComponent.searchText = this.groupingsComponent.searchText = qParams.search;
|
||||||
if (!this.organization.canViewAllCollections) {
|
if (!this.organization.canViewAllCollections) {
|
||||||
await this.syncService.fullSync(false);
|
await this.syncService.fullSync(false);
|
||||||
@@ -120,7 +118,15 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
this.viewEvents(cipher[0]);
|
this.viewEvents(cipher[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (queryParams != null) {
|
||||||
|
queryParams.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { ToasterModule } from 'angular2-toaster';
|
import { ToasterModule } from 'angular2-toaster';
|
||||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||||
|
|
||||||
|
import { AvatarComponent } from './components/avatar.component';
|
||||||
import { NestedCheckboxComponent } from './components/nested-checkbox.component';
|
import { NestedCheckboxComponent } from './components/nested-checkbox.component';
|
||||||
import { PasswordRepromptComponent } from './components/password-reprompt.component';
|
import { PasswordRepromptComponent } from './components/password-reprompt.component';
|
||||||
import { PasswordStrengthComponent } from './components/password-strength.component';
|
import { PasswordStrengthComponent } from './components/password-strength.component';
|
||||||
@@ -174,7 +175,6 @@ import { VaultComponent } from './vault/vault.component';
|
|||||||
|
|
||||||
import { ProvidersComponent } from './providers/providers.component';
|
import { ProvidersComponent } from './providers/providers.component';
|
||||||
|
|
||||||
import { AvatarComponent } from 'jslib-angular/components/avatar.component';
|
|
||||||
import { CalloutComponent } from 'jslib-angular/components/callout.component';
|
import { CalloutComponent } from 'jslib-angular/components/callout.component';
|
||||||
import { IconComponent } from 'jslib-angular/components/icon.component';
|
import { IconComponent } from 'jslib-angular/components/icon.component';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
||||||
<p>{{'sendCreatorIdentifier' | i18n: creatorIdentifier }}</p>
|
<p>{{'sendCreatorIdentifier' | i18n: creatorIdentifier }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-8" *ngIf="hideEmail">
|
<div class="col-8" *ngIf="hideEmail">
|
||||||
<app-callout type="warning" title="{{'warning' | i18n}}">
|
<app-callout type="warning" title="{{'warning' | i18n}}">
|
||||||
{{'viewSendHiddenEmailWarning' | i18n }}
|
{{'viewSendHiddenEmailWarning' | i18n }}
|
||||||
<a href="https://bitwarden.com/help/article/receive-send/" target="_blank">{{'learnMore' | i18n}}</a>.
|
<a href="https://bitwarden.com/help/article/receive-send/" target="_blank">{{'learnMore' | i18n}}</a>.
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-12 col-md-5">
|
<div class="col-5">
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body" *ngIf="loading" class="text-center">
|
<div class="card-body" *ngIf="loading" class="text-center">
|
||||||
<i class="fa fa-spinner fa-spin fa-2x text-muted" title="{{'loading' | i18n}}"
|
<i class="fa fa-spinner fa-spin fa-2x text-muted" title="{{'loading' | i18n}}"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</app-callout>
|
</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="name">{{'name' | i18n}}</label>
|
<label for="name">{{'name' | i18n}}</label>
|
||||||
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="send.name" required
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="send.name" required
|
||||||
[readOnly]="disableSend">
|
[readOnly]="disableSend">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" *ngIf="!editMode">
|
<div class="row" *ngIf="!editMode">
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label>{{'whatTypeOfSend' | i18n}}</label>
|
<label>{{'whatTypeOfSend' | i18n}}</label>
|
||||||
<div class="form-check" *ngFor="let o of typeOptions">
|
<div class="form-check" *ngFor="let o of typeOptions">
|
||||||
<input class="form-check-input" type="radio" [(ngModel)]="send.type" name="Type_{{o.value}}"
|
<input class="form-check-input" type="radio" [(ngModel)]="send.type" name="Type_{{o.value}}"
|
||||||
@@ -97,20 +97,20 @@
|
|||||||
[editMode]="editMode" [disabled]="disableSend" (datesChanged)="setDates($event)">
|
[editMode]="editMode" [disabled]="disableSend" (datesChanged)="setDates($event)">
|
||||||
</app-send-efflux-dates>
|
</app-send-efflux-dates>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="maxAccessCount">{{'maxAccessCount' | i18n}}</label>
|
<label for="maxAccessCount">{{'maxAccessCount' | i18n}}</label>
|
||||||
<input id="maxAccessCount" class="form-control" type="number" name="MaxAccessCount"
|
<input id="maxAccessCount" class="form-control" type="number" name="MaxAccessCount"
|
||||||
[(ngModel)]="send.maxAccessCount" min="1" [readOnly]="disableSend">
|
[(ngModel)]="send.maxAccessCount" min="1" [readOnly]="disableSend">
|
||||||
<div class="form-text text-muted small">{{'maxAccessCountDesc' | i18n}}</div>
|
<div class="form-text text-muted small">{{'maxAccessCountDesc' | i18n}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group" *ngIf="editMode">
|
<div class="col-6 form-group" *ngIf="editMode">
|
||||||
<label for="accessCount">{{'currentAccessCount' | i18n}}</label>
|
<label for="accessCount">{{'currentAccessCount' | i18n}}</label>
|
||||||
<input id="accessCount" class="form-control" type="text" name="AccessCount" readonly
|
<input id="accessCount" class="form-control" type="text" name="AccessCount" readonly
|
||||||
[(ngModel)]="send.accessCount">
|
[(ngModel)]="send.accessCount">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="password" *ngIf="!hasPassword">{{'password' | i18n}}</label>
|
<label for="password" *ngIf="!hasPassword">{{'password' | i18n}}</label>
|
||||||
<label for="password" *ngIf="hasPassword">{{'newPassword' | i18n}}</label>
|
<label for="password" *ngIf="hasPassword">{{'newPassword' | i18n}}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { SendService } from 'jslib-common/abstractions/send.service';
|
|||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from 'jslib-angular/components/send/add-edit.component';
|
import { AddEditComponent as BaseAddEditComponent } from 'jslib-angular/components/send/add-edit.component';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-send-add-edit',
|
selector: 'app-send-add-edit',
|
||||||
@@ -21,10 +20,9 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService,
|
constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService,
|
||||||
environmentService: EnvironmentService, datePipe: DatePipe,
|
environmentService: EnvironmentService, datePipe: DatePipe,
|
||||||
sendService: SendService, userService: UserService,
|
sendService: SendService, userService: UserService,
|
||||||
messagingService: MessagingService, policyService: PolicyService,
|
messagingService: MessagingService, policyService: PolicyService) {
|
||||||
logService: LogService) {
|
|
||||||
super(i18nService, platformUtilsService, environmentService, datePipe, sendService, userService,
|
super(i18nService, platformUtilsService, environmentService, datePipe, sendService, userService,
|
||||||
messagingService, policyService, logService);
|
messagingService, policyService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async copyLinkToClipboard(link: string): Promise<void | boolean> {
|
async copyLinkToClipboard(link: string): Promise<void | boolean> {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="row" [formGroup]="datesForm">
|
<div class="row" [formGroup]="datesForm">
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="deletionDate">{{'deletionDate' | i18n}}</label>
|
<label for="deletionDate">{{'deletionDate' | i18n}}</label>
|
||||||
<ng-template #deletionDateCustom>
|
<ng-template #deletionDateCustom>
|
||||||
<ng-container [ngSwitch]="browserPath">
|
<ng-container [ngSwitch]="browserPath">
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-text text-muted small">{{'deletionDateDesc' | i18n}}</div>
|
<div class="form-text text-muted small">{{'deletionDateDesc' | i18n}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 mt-4 mt-md-0 form-group">
|
<div class="col-6 form-group">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<label for="expirationDate">{{'expirationDate' | i18n}}</label>
|
<label for="expirationDate">{{'expirationDate' | i18n}}</label>
|
||||||
<a href="#" appStopClick (click)="clearExpiration()" class="ml-auto"
|
<a href="#" appStopClick (click)="clearExpiration()" class="ml-auto"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<span>{{'sendDisabledWarning' | i18n}}</span>
|
<span>{{'sendDisabledWarning' | i18n}}</span>
|
||||||
</app-callout>
|
</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-3 groupings">
|
<div class="col-3 groupings">
|
||||||
<div class="card vault-filters">
|
<div class="card vault-filters">
|
||||||
<div class="card-header d-flex">
|
<div class="card-header d-flex">
|
||||||
{{'filters' | i18n}}
|
{{'filters' | i18n}}
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-9 mt-4 mt-md-0">
|
<div class="col-9">
|
||||||
<div class="page-header d-flex">
|
<div class="page-header d-flex">
|
||||||
<h1>
|
<h1>
|
||||||
{{'send' | i18n}}
|
{{'send' | i18n}}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { AddEditComponent } from './add-edit.component';
|
|||||||
|
|
||||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.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 { SearchService } from 'jslib-common/abstractions/search.service';
|
import { SearchService } from 'jslib-common/abstractions/search.service';
|
||||||
@@ -35,10 +34,9 @@ export class SendComponent extends BaseSendComponent {
|
|||||||
constructor(sendService: SendService, i18nService: I18nService,
|
constructor(sendService: SendService, i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
||||||
ngZone: NgZone, searchService: SearchService, policyService: PolicyService, userService: UserService,
|
ngZone: NgZone, searchService: SearchService, policyService: PolicyService, userService: UserService,
|
||||||
private modalService: ModalService, private broadcasterService: BroadcasterService,
|
private modalService: ModalService, private broadcasterService: BroadcasterService) {
|
||||||
logService: LogService) {
|
|
||||||
super(sendService, i18nService, platformUtilsService, environmentService, ngZone, searchService,
|
super(sendService, i18nService, platformUtilsService, environmentService, ngZone, searchService,
|
||||||
policyService, userService, logService);
|
policyService, userService);
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const settingsService = new SettingsService(userService, storageService);
|
|||||||
export let searchService: SearchService = null;
|
export let searchService: SearchService = null;
|
||||||
const fileUploadService = new FileUploadService(consoleLogService, apiService);
|
const fileUploadService = new FileUploadService(consoleLogService, apiService);
|
||||||
const cipherService = new CipherService(cryptoService, userService, settingsService,
|
const cipherService = new CipherService(cryptoService, userService, settingsService,
|
||||||
apiService, fileUploadService, storageService, i18nService, () => searchService, consoleLogService);
|
apiService, fileUploadService, storageService, i18nService, () => searchService);
|
||||||
const folderService = new FolderService(cryptoService, userService, apiService, storageService,
|
const folderService = new FolderService(cryptoService, userService, apiService, storageService,
|
||||||
i18nService, cipherService);
|
i18nService, cipherService);
|
||||||
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
||||||
@@ -129,9 +129,9 @@ const vaultTimeoutService = new VaultTimeoutService(cipherService, folderService
|
|||||||
policyService, null, async () => messagingService.send('logout', { expired: false }));
|
policyService, null, async () => messagingService.send('logout', { expired: false }));
|
||||||
const syncService = new SyncService(userService, apiService, settingsService,
|
const syncService = new SyncService(userService, apiService, settingsService,
|
||||||
folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService,
|
folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService,
|
||||||
sendService, consoleLogService, async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
sendService, async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
||||||
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService, policyService);
|
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService, policyService);
|
||||||
const totpService = new TotpService(storageService, cryptoFunctionService, consoleLogService);
|
const totpService = new TotpService(storageService, cryptoFunctionService);
|
||||||
const containerService = new ContainerService(cryptoService);
|
const containerService = new ContainerService(cryptoService);
|
||||||
const authService = new AuthService(cryptoService, apiService,
|
const authService = new AuthService(cryptoService, apiService,
|
||||||
userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService,
|
userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService,
|
||||||
@@ -142,7 +142,7 @@ const importService = new ImportService(cipherService, folderService, apiService
|
|||||||
const notificationsService = new NotificationsService(userService, syncService, appIdService, apiService, vaultTimeoutService,
|
const notificationsService = new NotificationsService(userService, syncService, appIdService, apiService, vaultTimeoutService,
|
||||||
environmentService, async () => messagingService.send('logout', { expired: true }), consoleLogService);
|
environmentService, async () => messagingService.send('logout', { expired: true }), consoleLogService);
|
||||||
const auditService = new AuditService(cryptoFunctionService, apiService);
|
const auditService = new AuditService(cryptoFunctionService, apiService);
|
||||||
const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService, consoleLogService);
|
const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService);
|
||||||
|
|
||||||
containerService.attachToWindow(window);
|
containerService.attachToWindow(window);
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4 mt-4 mt-md-0">
|
<div class="col-4">
|
||||||
<label for="creditAmount">{{'amount' | i18n}}</label>
|
<label for="creditAmount">{{'amount' | i18n}}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend"><span class="input-group-text">$USD</span></div>
|
<div class="input-group-prepend"><span class="input-group-text">$USD</span></div>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { PayPalConfig } from 'jslib-common/abstractions/environment.service';
|
import { PayPalConfig } from 'jslib-common/abstractions/environment.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ export class AddCreditComponent implements OnInit {
|
|||||||
private email: string;
|
private email: string;
|
||||||
|
|
||||||
constructor(private userService: UserService, private apiService: ApiService,
|
constructor(private userService: UserService, private apiService: ApiService,
|
||||||
private platformUtilsService: PlatformUtilsService, private logService: LogService) {
|
private platformUtilsService: PlatformUtilsService) {
|
||||||
const payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;
|
const payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;
|
||||||
this.ppButtonFormAction = payPalConfig.buttonAction;
|
this.ppButtonFormAction = payPalConfig.buttonAction;
|
||||||
this.ppButtonBusinessId = payPalConfig.businessId;
|
this.ppButtonBusinessId = payPalConfig.businessId;
|
||||||
@@ -99,16 +98,12 @@ export class AddCreditComponent implements OnInit {
|
|||||||
this.formPromise = this.apiService.postBitPayInvoice(req);
|
this.formPromise = this.apiService.postBitPayInvoice(req);
|
||||||
const bitPayUrl: string = await this.formPromise;
|
const bitPayUrl: string = await this.formPromise;
|
||||||
this.platformUtilsService.launchUri(bitPayUrl);
|
this.platformUtilsService.launchUri(bitPayUrl);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.onAdded.emit();
|
this.onAdded.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -125,9 +120,7 @@ export class AddCreditComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
this.creditAmount = '';
|
this.creditAmount = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,9 +128,7 @@ export class AddCreditComponent implements OnInit {
|
|||||||
if (this.creditAmount != null && this.creditAmount !== '') {
|
if (this.creditAmount != null && this.creditAmount !== '') {
|
||||||
try {
|
try {
|
||||||
return parseFloat(this.creditAmount);
|
return parseFloat(this.creditAmount);
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { PaymentRequest } from 'jslib-common/models/request/paymentRequest';
|
import { PaymentRequest } from 'jslib-common/models/request/paymentRequest';
|
||||||
|
|
||||||
@@ -36,7 +35,7 @@ export class AdjustPaymentComponent {
|
|||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
try {
|
try {
|
||||||
@@ -61,9 +60,7 @@ export class AdjustPaymentComponent {
|
|||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('updatedPaymentMethod'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('updatedPaymentMethod'));
|
||||||
this.onAdjusted.emit();
|
this.onAdjusted.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
aria-hidden="true">×</span></button>
|
aria-hidden="true">×</span></button>
|
||||||
<h3 class="card-body-header">{{(add ? 'addStorage' : 'removeStorage') | i18n}}</h3>
|
<h3 class="card-body-header">{{(add ? 'addStorage' : 'removeStorage') | i18n}}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-6">
|
||||||
<label for="storageAdjustment">{{(add ? 'gbStorageAdd' : 'gbStorageRemove') | i18n}}</label>
|
<label for="storageAdjustment">{{(add ? 'gbStorageAdd' : 'gbStorageRemove') | i18n}}</label>
|
||||||
<input id="storageAdjustment" class="form-control" type="number" name="StroageGbAdjustment"
|
<input id="storageAdjustment" class="form-control" type="number" name="StroageGbAdjustment"
|
||||||
[(ngModel)]="storageAdjustment" min="0" max="99" step="1" required>
|
[(ngModel)]="storageAdjustment" min="0" max="99" step="1" required>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { StorageRequest } from 'jslib-common/models/request/storageRequest';
|
import { StorageRequest } from 'jslib-common/models/request/storageRequest';
|
||||||
|
|
||||||
@@ -42,7 +41,7 @@ export class AdjustStorageComponent {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private router: Router,
|
private toasterService: ToasterService, private router: Router,
|
||||||
private activatedRoute: ActivatedRoute, private logService: LogService) { }
|
private activatedRoute: ActivatedRoute) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
try {
|
try {
|
||||||
@@ -83,9 +82,7 @@ export class AdjustStorageComponent {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t('adjustedStorage', request.storageGbAdjustment.toString()));
|
this.i18nService.t('adjustedStorage', request.storageGbAdjustment.toString()));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ export class ApiKeyComponent {
|
|||||||
clientSecret: string;
|
clientSecret: string;
|
||||||
|
|
||||||
constructor(private i18nService: I18nService, private toasterService: ToasterService,
|
constructor(private i18nService: I18nService, private toasterService: ToasterService,
|
||||||
private cryptoService: CryptoService, private logService: LogService) { }
|
private cryptoService: CryptoService) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.masterPassword == null || this.masterPassword === '') {
|
if (this.masterPassword == null || this.masterPassword === '') {
|
||||||
@@ -47,8 +46,6 @@ export class ApiKeyComponent {
|
|||||||
const response = await this.formPromise;
|
const response = await this.formPromise;
|
||||||
this.clientSecret = response.apiKey;
|
this.clientSecret = response.apiKey;
|
||||||
this.clientId = `${this.keyType}.${this.entityId}`;
|
this.clientId = `${this.keyType}.${this.entityId}`;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{'changeEmailTwoFactorWarning' | i18n}}
|
{{'changeEmailTwoFactorWarning' | i18n}}
|
||||||
</app-callout>
|
</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
||||||
<input id="masterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
<input id="masterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<p>{{'changeEmailDesc' | i18n : newEmail}}</p>
|
<p>{{'changeEmailDesc' | i18n : newEmail}}</p>
|
||||||
<app-callout type="warning">{{'loggedOutWarning' | i18n}}</app-callout>
|
<app-callout type="warning">{{'loggedOutWarning' | i18n}}</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="token">{{'code' | i18n}}</label>
|
<label for="token">{{'code' | i18n}}</label>
|
||||||
<input id="token" class="form-control" type="text" name="Token" [(ngModel)]="token" required
|
<input id="token" class="form-control" type="text" name="Token" [(ngModel)]="token" required
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -32,8 +31,7 @@ export class ChangeEmailComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private cryptoService: CryptoService,
|
private toasterService: ToasterService, private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService, private userService: UserService,
|
private messagingService: MessagingService, private userService: UserService) { }
|
||||||
private logService: LogService) { }
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const twoFactorProviders = await this.apiService.getTwoFactorProviders();
|
const twoFactorProviders = await this.apiService.getTwoFactorProviders();
|
||||||
@@ -57,9 +55,7 @@ export class ChangeEmailComponent implements OnInit {
|
|||||||
this.formPromise = this.apiService.postEmailToken(request);
|
this.formPromise = this.apiService.postEmailToken(request);
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.tokenSent = true;
|
this.tokenSent = true;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const request = new EmailRequest();
|
const request = new EmailRequest();
|
||||||
request.token = this.token;
|
request.token = this.token;
|
||||||
@@ -78,9 +74,7 @@ export class ChangeEmailComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('emailChanged'),
|
this.toasterService.popAsync('success', this.i18nService.t('emailChanged'),
|
||||||
this.i18nService.t('logBackIn'));
|
this.i18nService.t('logBackIn'));
|
||||||
this.messagingService.send('logout');
|
this.messagingService.send('logout');
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<app-callout type="warning">{{'loggedOutWarning' | i18n}}</app-callout>
|
<app-callout type="warning">{{'loggedOutWarning' | i18n}}</app-callout>
|
||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="kdfMasterPassword">{{'masterPass' | i18n}}</label>
|
<label for="kdfMasterPassword">{{'masterPass' | i18n}}</label>
|
||||||
<input id="kdfMasterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
<input id="kdfMasterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group mb-0">
|
<div class="form-group mb-0">
|
||||||
<label for="kdf">{{'kdfAlgorithm' | i18n}}</label>
|
<label for="kdf">{{'kdfAlgorithm' | i18n}}</label>
|
||||||
<a class="ml-auto" href="https://en.wikipedia.org/wiki/Key_derivation_function" target="_blank"
|
<a class="ml-auto" href="https://en.wikipedia.org/wiki/Key_derivation_function" target="_blank"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group mb-0">
|
<div class="form-group mb-0">
|
||||||
<label for="kdfIterations">{{'kdfIterations' | i18n}}</label>
|
<label for="kdfIterations">{{'kdfIterations' | i18n}}</label>
|
||||||
<a class="ml-auto" href="https://bitwarden.com/help/article/what-encryption-is-used/#pbkdf2" target="_blank" rel="noopener"
|
<a class="ml-auto" href="https://bitwarden.com/help/article/what-encryption-is-used/#pbkdf2" target="_blank" rel="noopener"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -29,8 +28,7 @@ export class ChangeKdfComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private cryptoService: CryptoService,
|
private toasterService: ToasterService, private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService, private userService: UserService,
|
private messagingService: MessagingService, private userService: UserService) {
|
||||||
private logService: LogService) {
|
|
||||||
this.kdfOptions = [
|
this.kdfOptions = [
|
||||||
{ name: 'PBKDF2 SHA-256', value: KdfType.PBKDF2_SHA256 },
|
{ name: 'PBKDF2 SHA-256', value: KdfType.PBKDF2_SHA256 },
|
||||||
];
|
];
|
||||||
@@ -63,8 +61,6 @@ export class ChangeKdfComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('encKeySettingsChanged'),
|
this.toasterService.popAsync('success', this.i18nService.t('encKeySettingsChanged'),
|
||||||
this.i18nService.t('logBackIn'));
|
this.i18nService.t('logBackIn'));
|
||||||
this.messagingService.send('logout');
|
this.messagingService.send('logout');
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="currentMasterPassword">{{'currentMasterPass' | i18n}}</label>
|
<label for="currentMasterPassword">{{'currentMasterPass' | i18n}}</label>
|
||||||
<input id="currentMasterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
<input id="currentMasterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="newMasterPassword">{{'newMasterPass' | i18n}}</label>
|
<label for="newMasterPassword">{{'newMasterPass' | i18n}}</label>
|
||||||
<input id="newMasterPassword" type="password" name="NewMasterPasswordHash" class="form-control mb-1"
|
<input id="newMasterPassword" type="password" name="NewMasterPasswordHash" class="form-control mb-1"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<app-password-strength [score]="masterPasswordScore" [showText]="true"></app-password-strength>
|
<app-password-strength [score]="masterPasswordScore" [showText]="true"></app-password-strength>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="masterPasswordRetype">{{'confirmNewMasterPass' | i18n}}</label>
|
<label for="masterPasswordRetype">{{'confirmNewMasterPass' | i18n}}</label>
|
||||||
<input id="masterPasswordRetype" type="password" name="MasterPasswordRetype" class="form-control"
|
<input id="masterPasswordRetype" type="password" name="MasterPasswordRetype" class="form-control"
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
import { first } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { PlanType } from 'jslib-common/enums/planType';
|
import { PlanType } from 'jslib-common/enums/planType';
|
||||||
import { ProductType } from 'jslib-common/enums/productType';
|
import { ProductType } from 'jslib-common/enums/productType';
|
||||||
|
|
||||||
@@ -22,7 +20,7 @@ export class CreateOrganizationComponent implements OnInit {
|
|||||||
constructor(private route: ActivatedRoute) { }
|
constructor(private route: ActivatedRoute) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.queryParams.pipe(first()).subscribe(async qParams => {
|
const queryParamsSub = this.route.queryParams.subscribe(async qParams => {
|
||||||
if (qParams.plan === 'families') {
|
if (qParams.plan === 'families') {
|
||||||
this.orgPlansComponent.plan = PlanType.FamiliesAnnually;
|
this.orgPlansComponent.plan = PlanType.FamiliesAnnually;
|
||||||
this.orgPlansComponent.product = ProductType.Families;
|
this.orgPlansComponent.product = ProductType.Families;
|
||||||
@@ -33,6 +31,9 @@ export class CreateOrganizationComponent implements OnInit {
|
|||||||
this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;
|
this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;
|
||||||
this.orgPlansComponent.product = ProductType.Enterprise;
|
this.orgPlansComponent.product = ProductType.Enterprise;
|
||||||
}
|
}
|
||||||
|
if (queryParamsSub != null) {
|
||||||
|
queryParamsSub.unsubscribe();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
||||||
@@ -20,7 +19,7 @@ export class DeauthorizeSessionsComponent {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private cryptoService: CryptoService,
|
private toasterService: ToasterService, private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService, private logService: LogService) { }
|
private messagingService: MessagingService) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.masterPassword == null || this.masterPassword === '') {
|
if (this.masterPassword == null || this.masterPassword === '') {
|
||||||
@@ -37,8 +36,6 @@ export class DeauthorizeSessionsComponent {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('sessionsDeauthorized'),
|
this.toasterService.popAsync('success', this.i18nService.t('sessionsDeauthorized'),
|
||||||
this.i18nService.t('logBackIn'));
|
this.i18nService.t('logBackIn'));
|
||||||
this.messagingService.send('logout');
|
this.messagingService.send('logout');
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
import { PasswordVerificationRequest } from 'jslib-common/models/request/passwordVerificationRequest';
|
||||||
@@ -20,7 +19,7 @@ export class DeleteAccountComponent {
|
|||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private cryptoService: CryptoService,
|
private toasterService: ToasterService, private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService, private logService: LogService) { }
|
private messagingService: MessagingService) { }
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.masterPassword == null || this.masterPassword === '') {
|
if (this.masterPassword == null || this.masterPassword === '') {
|
||||||
@@ -37,8 +36,6 @@ export class DeleteAccountComponent {
|
|||||||
this.toasterService.popAsync('success', this.i18nService.t('accountDeleted'),
|
this.toasterService.popAsync('success', this.i18nService.t('accountDeleted'),
|
||||||
this.i18nService.t('accountDeletedDesc'));
|
this.i18nService.t('accountDeletedDesc'));
|
||||||
this.messagingService.send('logout');
|
this.messagingService.send('logout');
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { UpdateDomainsRequest } from 'jslib-common/models/request/updateDomainsRequest';
|
import { UpdateDomainsRequest } from 'jslib-common/models/request/updateDomainsRequest';
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ export class DomainRulesComponent implements OnInit {
|
|||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const response = await this.apiService.getSettingsDomains();
|
const response = await this.apiService.getSettingsDomains();
|
||||||
@@ -75,9 +74,7 @@ export class DomainRulesComponent implements OnInit {
|
|||||||
this.formPromise = this.apiService.putSettingsDomains(request);
|
this.formPromise = this.apiService.putSettingsDomains(request);
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('domainsUpdated'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('domainsUpdated'));
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
indexTrackBy(index: number, obj: any): any {
|
indexTrackBy(index: number, obj: any): any {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<small>{{'takeoverDesc' | i18n}}</small>
|
<small>{{'takeoverDesc' | i18n}}</small>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-12 col-md-6 mt-4">
|
<div class="form-group col-6 mt-4">
|
||||||
<label for="waitTime">{{'waitTime' | i18n}}</label>
|
<label for="waitTime">{{'waitTime' | i18n}}</label>
|
||||||
<select id="waitTime" name="waitTime" [(ngModel)]="waitTime" class="form-control" [disabled]="readOnly">
|
<select id="waitTime" name="waitTime" [(ngModel)]="waitTime" class="form-control" [disabled]="readOnly">
|
||||||
<option *ngFor="let o of waitTimes" [ngValue]="o.value">{{o.name}}</option>
|
<option *ngFor="let o of waitTimes" [ngValue]="o.value">{{o.name}}</option>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
|
|
||||||
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 { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
|
|
||||||
import { EmergencyAccessType } from 'jslib-common/enums/emergencyAccessType';
|
import { EmergencyAccessType } from 'jslib-common/enums/emergencyAccessType';
|
||||||
import { EmergencyAccessInviteRequest } from 'jslib-common/models/request/emergencyAccessInviteRequest';
|
import { EmergencyAccessInviteRequest } from 'jslib-common/models/request/emergencyAccessInviteRequest';
|
||||||
@@ -40,7 +39,7 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
|||||||
waitTime: number;
|
waitTime: number;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
private toasterService: ToasterService, private logService: LogService) { }
|
private toasterService: ToasterService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.editMode = this.loading = this.emergencyAccessId != null;
|
this.editMode = this.loading = this.emergencyAccessId != null;
|
||||||
@@ -61,9 +60,7 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
|||||||
const emergencyAccess = await this.apiService.getEmergencyAccess(this.emergencyAccessId);
|
const emergencyAccess = await this.apiService.getEmergencyAccess(this.emergencyAccessId);
|
||||||
this.type = emergencyAccess.type;
|
this.type = emergencyAccess.type;
|
||||||
this.waitTime = emergencyAccess.waitTimeDays;
|
this.waitTime = emergencyAccess.waitTimeDays;
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.title = this.i18nService.t('inviteEmergencyContact');
|
this.title = this.i18nService.t('inviteEmergencyContact');
|
||||||
this.waitTime = this.waitTimes[2].value;
|
this.waitTime = this.waitTimes[2].value;
|
||||||
@@ -93,9 +90,7 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
|||||||
this.toasterService.popAsync('success', null,
|
this.toasterService.popAsync('success', null,
|
||||||
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
||||||
this.onSaved.emit();
|
this.onSaved.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete() {
|
async delete() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ApiService } from 'jslib-common/abstractions/api.service';
|
|||||||
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
@@ -22,10 +21,8 @@ export class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponen
|
|||||||
|
|
||||||
constructor(cipherService: CipherService, i18nService: I18nService,
|
constructor(cipherService: CipherService, i18nService: I18nService,
|
||||||
cryptoService: CryptoService, userService: UserService,
|
cryptoService: CryptoService, userService: UserService,
|
||||||
platformUtilsService: PlatformUtilsService, apiService: ApiService,
|
platformUtilsService: PlatformUtilsService, apiService: ApiService) {
|
||||||
logService: LogService) {
|
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService, window);
|
||||||
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService, window,
|
|
||||||
logService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async init() {
|
protected async init() {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { ConstantsService } from 'jslib-common/services/constants.service';
|
|||||||
|
|
||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
|
||||||
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
||||||
|
|
||||||
import { Utils } from 'jslib-common/misc/utils';
|
import { Utils } from 'jslib-common/misc/utils';
|
||||||
@@ -31,7 +30,7 @@ export class EmergencyAccessConfirmComponent implements OnInit {
|
|||||||
fingerprint: string;
|
fingerprint: string;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private cryptoService: CryptoService,
|
constructor(private apiService: ApiService, private cryptoService: CryptoService,
|
||||||
private storageService: StorageService, private logService: LogService) { }
|
private storageService: StorageService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
try {
|
try {
|
||||||
@@ -43,9 +42,7 @@ export class EmergencyAccessConfirmComponent implements OnInit {
|
|||||||
this.fingerprint = fingerprint.join('-');
|
this.fingerprint = fingerprint.join('-');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,8 +57,6 @@ export class EmergencyAccessConfirmComponent implements OnInit {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.onConfirmed.emit();
|
this.onConfirmed.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<app-callout type="info" [enforcedPolicyOptions]="enforcedPolicyOptions" *ngIf="enforcedPolicyOptions">
|
<app-callout type="info" [enforcedPolicyOptions]="enforcedPolicyOptions" *ngIf="enforcedPolicyOptions">
|
||||||
</app-callout>
|
</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="masterPassword">{{'newMasterPass' | i18n}}</label>
|
<label for="masterPassword">{{'newMasterPass' | i18n}}</label>
|
||||||
<input id="masterPassword" type="password" name="NewMasterPasswordHash"
|
<input id="masterPassword" type="password" name="NewMasterPasswordHash"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</app-password-strength>
|
</app-password-strength>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mt-4 mt-md-0">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="masterPasswordRetype">{{'confirmNewMasterPass' | i18n}}</label>
|
<label for="masterPasswordRetype">{{'confirmNewMasterPass' | i18n}}</label>
|
||||||
<input id="masterPasswordRetype" type="password" name="MasterPasswordRetype"
|
<input id="masterPasswordRetype" type="password" name="MasterPasswordRetype"
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.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 { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
@@ -45,7 +44,7 @@ export class EmergencyAccessTakeoverComponent extends ChangePasswordComponent im
|
|||||||
messagingService: MessagingService, userService: UserService,
|
messagingService: MessagingService, userService: UserService,
|
||||||
passwordGenerationService: PasswordGenerationService,
|
passwordGenerationService: PasswordGenerationService,
|
||||||
platformUtilsService: PlatformUtilsService, policyService: PolicyService,
|
platformUtilsService: PlatformUtilsService, policyService: PolicyService,
|
||||||
private apiService: ApiService, private toasterService: ToasterService, private logService: LogService) {
|
private apiService: ApiService, private toasterService: ToasterService) {
|
||||||
super(i18nService, cryptoService, messagingService, userService, passwordGenerationService,
|
super(i18nService, cryptoService, messagingService, userService, passwordGenerationService,
|
||||||
platformUtilsService, policyService);
|
platformUtilsService, policyService);
|
||||||
}
|
}
|
||||||
@@ -86,8 +85,6 @@ export class EmergencyAccessTakeoverComponent extends ChangePasswordComponent im
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.onDone.emit();
|
this.onDone.emit();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,10 +42,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!loaded">
|
|
||||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
|
||||||
<span class="sr-only">{{'loading' | i18n}}</span>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
<ng-template #cipherAddEdit></ng-template>
|
<ng-template #cipherAddEdit></ng-template>
|
||||||
<ng-template #attachments></ng-template>
|
<ng-template #attachments></ng-template>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user