1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Thomas Rittson
35034c2ced Revert jslib 2022-05-20 15:26:04 +10:00
Thomas Rittson
27977ff4fe Revert jslib 2022-05-20 15:25:24 +10:00
Thomas Rittson
2ba01990a2 Revert jslib 2022-05-20 15:22:10 +10:00
Thomas Rittson
b45d249a7d Update to use new VaultFilter model 2022-05-20 15:22:10 +10:00
Thomas Rittson
48508ef87a Remove unneeded subclass method 2022-05-20 15:22:10 +10:00
Thomas Rittson
bcfc09a173 Revert "Get all collections from server if required"
This reverts commit eae38e2f9c.
2022-05-20 15:22:10 +10:00
Thomas Rittson
ddcd6d1137 Remove unused code 2022-05-20 15:22:10 +10:00
Thomas Rittson
7c3f0320e7 Autoresolve dependencies 2022-05-20 15:22:10 +10:00
Thomas Rittson
b3f9136aea Get all collections from server if required 2022-05-20 15:22:10 +10:00
19 changed files with 65 additions and 78 deletions

View File

@@ -19,8 +19,8 @@ jobs:
name: Setup
runs-on: ubuntu-20.04
outputs:
release_version: ${{ steps.version.outputs.version }}
tag_version: ${{ steps.version.outputs.version }}
release_version: ${{ steps.version.outputs.package }}
tag_version: ${{ steps.version.outputs.tag }}
branch_name: ${{ steps.branch.outputs.branch_name }}
steps:
- name: Branch check
@@ -38,11 +38,20 @@ jobs:
- name: Check Release Version
id: version
uses: bitwarden/gh-actions/release-version-check@ea9fab01d76940267b4147cc1c4542431246b9f6
with:
release-type: ${{ github.event.inputs.release_type }}
project-type: ts
file: package.json
run: |
version=$( jq -r ".version" package.json)
previous_release_tag_version=$(
curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r ".tag_name"
)
if [ "v$version" == "$previous_release_tag_version" ] && \
[ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then
echo "[!] Already released v$version. Please bump version to continue"
exit 1
fi
echo "::set-output name=package::$version"
echo "::set-output name=tag::v$version"
- name: Get branch name
id: branch

2
jslib

Submodule jslib updated: 0d658ba26d...3cb94623e2

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@bitwarden/web-vault",
"version": "2022.05.0",
"version": "2.28.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@bitwarden/web-vault",
"version": "2022.05.0",
"version": "2.28.1",
"hasInstallScript": true,
"license": "GPL-3.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@bitwarden/web-vault",
"version": "2022.05.0",
"version": "2.28.1",
"license": "GPL-3.0",
"repository": "https://github.com/bitwarden/web",
"scripts": {

View File

@@ -101,7 +101,7 @@
<div [ngClass]="{ 'col-5': layout, 'col-12': !layout }">
<div class="row justify-content-md-center mt-5">
<div [ngClass]="{ 'col-5': !layout, 'col-12': layout }">
<h1 class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</h1>
<p class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</p>
<div class="card d-block">
<div class="card-body">
<app-callout

View File

@@ -1,13 +1,4 @@
import { DOCUMENT } from "@angular/common";
import {
Component,
Inject,
LOCALE_ID,
NgZone,
OnDestroy,
OnInit,
SecurityContext,
} from "@angular/core";
import { Component, NgZone, OnDestroy, OnInit, SecurityContext } from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser";
import { NavigationEnd, Router } from "@angular/router";
import * as jq from "jquery";
@@ -59,8 +50,6 @@ export class AppComponent implements OnDestroy, OnInit {
private isIdle = false;
constructor(
@Inject(LOCALE_ID) public locale: string,
@Inject(DOCUMENT) private document: Document,
private broadcasterService: BroadcasterService,
private tokenService: TokenService,
private folderService: FolderService,
@@ -89,8 +78,6 @@ export class AppComponent implements OnDestroy, OnInit {
) {}
ngOnInit() {
this.document.documentElement.lang = this.locale;
this.ngZone.runOutsideAngular(() => {
window.onmousemove = () => this.recordActivity();
window.onmousedown = () => this.recordActivity();

View File

@@ -114,6 +114,7 @@ import { EmergencyAccessTakeoverComponent } from "../settings/emergency-access-t
import { EmergencyAccessViewComponent } from "../settings/emergency-access-view.component";
import { EmergencyAccessComponent } from "../settings/emergency-access.component";
import { EmergencyAddEditComponent } from "../settings/emergency-add-edit.component";
import { LinkSsoComponent } from "../settings/link-sso.component";
import { OrganizationPlansComponent } from "../settings/organization-plans.component";
import { PaymentMethodComponent } from "../settings/payment-method.component";
import { PaymentComponent } from "../settings/payment.component";
@@ -222,6 +223,7 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
HintComponent,
ImportComponent,
InactiveTwoFactorReportComponent,
LinkSsoComponent,
LockComponent,
LoginComponent,
MasterPasswordPolicyComponent,
@@ -381,6 +383,7 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
HintComponent,
ImportComponent,
InactiveTwoFactorReportComponent,
LinkSsoComponent,
LockComponent,
LoginComponent,
MasterPasswordPolicyComponent,

View File

@@ -14,7 +14,7 @@
<span class="filter-buttons">
<a href="#" routerLink="/create-organization" class="filter-button">
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
&nbsp;{{ "newOrganization" | i18n }}
{{ "newOrganization" | i18n }}
</a>
</span>
</li>
@@ -45,6 +45,14 @@
>
&nbsp;{{ organizationGrouping.name | i18n }}
</button>
<a
href="#"
routerLink="/create-organization"
class="text-muted ml-auto create-organization-link"
appA11yTitle="{{ 'newOrganization' | i18n }}"
>
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
</a>
</div>
<ul id="organization-filters" *ngIf="!isCollapsed" class="filter-options">
<li
@@ -67,14 +75,6 @@
</ng-container>
</span>
</li>
<li class="filter-option">
<span class="filter-buttons">
<a href="#" routerLink="/create-organization" class="filter-button">
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
&nbsp;{{ "newOrganization" | i18n }}
</a>
</span>
</li>
</ul>
</ng-container>
<ng-container *ngSwitchCase="'singleOrganizationAndPersonalOwnershipPolicies'">
@@ -110,6 +110,15 @@
>
&nbsp;{{ organizationGrouping.name | i18n }}
</button>
<a
href="#"
routerLink="/create-organization"
class="text-muted ml-auto create-organization-link"
appA11yTitle="{{ 'newOrganization' | i18n }}"
*ngIf="!(displayMode === 'singleOrganizationPolicy')"
>
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
</a>
</div>
<ul id="organization-filters" *ngIf="!isCollapsed" class="filter-options">
<li class="filter-option" [ngClass]="{ active: activeFilter.myVaultOnly }">
@@ -140,14 +149,6 @@
</ng-container>
</span>
</li>
<li class="filter-option" *ngIf="!(displayMode === 'singleOrganizationPolicy')">
<span class="filter-buttons">
<a href="#" routerLink="/create-organization" class="filter-button">
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
&nbsp;{{ "newOrganization" | i18n }}
</a>
</span>
</li>
</ul>
</ng-container>
</ng-container>

View File

@@ -27,8 +27,4 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
searchTextChanged() {
this.onSearchTextChanged.emit(this.searchText);
}
async initCollections() {
return await this.vaultFilterService.buildCollections(this.organization?.id);
}
}

View File

@@ -1,18 +1,11 @@
import { NgModule } from "@angular/core";
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
import { CipherService } from "jslib-common/abstractions/cipher.service";
import { CollectionService } from "jslib-common/abstractions/collection.service";
import { FolderService } from "jslib-common/abstractions/folder.service";
import { OrganizationService } from "jslib-common/abstractions/organization.service";
import { PolicyService } from "jslib-common/abstractions/policy.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { SharedModule } from "../shared.module";
import { CollectionFilterComponent } from "./components/collection-filter.component";
import { FolderFilterComponent } from "./components/folder-filter.component";
import { LinkSsoComponent } from "./components/link-sso.component";
import { OrganizationFilterComponent } from "./components/organization-filter.component";
import { OrganizationOptionsComponent } from "./components/organization-options.component";
import { StatusFilterComponent } from "./components/status-filter.component";
@@ -29,22 +22,8 @@ import { VaultFilterComponent } from "./vault-filter.component";
OrganizationOptionsComponent,
StatusFilterComponent,
TypeFilterComponent,
LinkSsoComponent,
],
exports: [VaultFilterComponent],
providers: [
{
provide: VaultFilterService,
useClass: VaultFilterService,
deps: [
StateService,
OrganizationService,
FolderService,
CipherService,
CollectionService,
PolicyService,
],
},
],
providers: [VaultFilterService],
})
export class VaultFilterModule {}

View File

@@ -1,3 +0,0 @@
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
export class VaultFilterService extends BaseVaultFilterService {}

View File

@@ -23,6 +23,7 @@ import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.se
import { StateService } from "jslib-common/abstractions/state.service";
import { SyncService } from "jslib-common/abstractions/sync.service";
import { TokenService } from "jslib-common/abstractions/token.service";
import { CipherType } from "jslib-common/enums/cipherType";
import { CipherView } from "jslib-common/models/view/cipherView";
import { UpdateKeyComponent } from "../../../../settings/update-key.component";
@@ -57,6 +58,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
updateKeyModalRef: ViewContainerRef;
favorites = false;
type: CipherType = null;
folderId: string = null;
collectionId: string = null;
organizationId: string = null;
@@ -325,7 +327,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
async addCipher() {
const component = await this.editCipher(null);
component.type = this.activeFilter.cipherType;
component.type = this.type;
component.folderId = this.folderId === "none" ? null : this.folderId;
if (this.activeFilter.selectedCollectionId != null) {
const collection = this.filterComponent.collections.fullList.filter(
@@ -397,7 +399,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
if (queryParams == null) {
queryParams = {
favorites: this.favorites ? true : null,
type: this.activeFilter.cipherType,
type: this.type,
folderId: this.folderId,
collectionId: this.collectionId,
deleted: this.deleted ? true : null,

View File

@@ -98,6 +98,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
this.vaultFilterComponent.reloadCollectionsAndFolders(
new VaultFilter({
selectedOrganizationId: this.organization.id,
useAdminCollections: this.organization.canEditAnyCollection,
} as Partial<VaultFilter>)
),
this.ciphersComponent.refresh(),
@@ -110,7 +111,10 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
});
}
await this.vaultFilterComponent.reloadCollectionsAndFolders(
new VaultFilter({ selectedOrganizationId: this.organization.id } as Partial<VaultFilter>)
new VaultFilter({
selectedOrganizationId: this.organization.id,
useAdminCollections: this.organization.canEditAnyCollection,
} as Partial<VaultFilter>)
);
await this.ciphersComponent.reload();

View File

@@ -1,7 +1,7 @@
<form #form (ngSubmit)="load()" [appApiAction]="formPromise" class="container" ngNativeValidate>
<div class="row justify-content-center mt-5">
<div class="col-12">
<h1 class="lead text-center mb-4">Bitwarden Send</h1>
<p class="lead text-center mb-4">Bitwarden Send</p>
</div>
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
<p>{{ "sendCreatorIdentifier" | i18n: creatorIdentifier }}</p>

View File

@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
import { ApiService } from "jslib-common/abstractions/api.service";
import { LogService } from "jslib-common/abstractions/log.service";
import { OrganizationConnectionType } from "jslib-common/enums/organizationConnectionType";
import { Utils } from "jslib-common/misc/utils";
import { BillingSyncConfigApi } from "jslib-common/models/api/billingSyncConfigApi";
import { BillingSyncConfigRequest } from "jslib-common/models/request/billingSyncConfigRequest";
import { OrganizationConnectionRequest } from "jslib-common/models/request/organizationConnectionRequest";

View File

@@ -4674,8 +4674,8 @@
"removeSponsorshipSuccess": {
"message": "Sponsorship Removed"
},
"ssoKeyConnectorError": {
"message": "Key Connector error: make sure Key Connector is available and working correctly."
"ssoKeyConnectorUnavailable": {
"message": "Unable to reach the Key Connector, try again later."
},
"keyConnectorUrl": {
"message": "Key Connector URL"

View File

@@ -14,6 +14,14 @@
font-size: $font-size-base;
}
a.create-organization-link {
&:hover {
@include themify($themes) {
color: themed("iconHover") !important;
}
}
}
button {
@extend .no-btn;
}