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

Compare commits

...

10 Commits

Author SHA1 Message Date
Carlos J. Muentes
db22f5dc92 Removing errand console.log 2022-02-01 12:45:23 -05:00
Carlos J. Muentes
bb8e982767 Limiting license download to allowed org types 2022-01-31 15:33:32 -05:00
Addison Beck
caad11c571 [chore] Update jslib (#1403) 2022-01-20 09:38:34 -05:00
Daniel James Smith
b73449159d Update copy on fingerprint phrase prompt (#1399) 2022-01-20 10:07:47 +01:00
Oscar Hinton
bf48434d0f Rename package to @bitwarden/web-vault (#1396) 2022-01-17 17:23:14 +01:00
Oscar Hinton
b6d2d5bf71 [BEEEP] Use shared tsconfig (#1393) 2022-01-17 15:53:19 +01:00
Oscar Hinton
dfd62c7c3a Fix webpack assets using wrong name (#1391) 2022-01-14 13:35:44 +01:00
github-actions[bot]
41d3bd8cf2 Autosync the updated translations (#1389)
Co-authored-by: github-actions <>
2022-01-14 11:21:40 +01:00
Vince Grassia
3292d119fe Update Version Bump action (#1388) 2022-01-12 16:06:50 -05:00
Christian Oliff
b8de92435b Add Inputmode for tel and email (identities) (#1384) 2022-01-12 10:07:56 +01:00
12 changed files with 54 additions and 31 deletions

View File

@@ -27,13 +27,13 @@ jobs:
ref: version_bump_${{ github.event.inputs.version_number }}
- name: Bump Version - package.json
uses: bitwarden/gh-actions/version-bump@0c263b3963211ccaf5804313c3b3a0bcc52d4b19
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
with:
version: ${{ github.event.inputs.version_number }}
file_path: "./package.json"
- name: Bump Version - package-lock.json
uses: bitwarden/gh-actions/version-bump@0c263b3963211ccaf5804313c3b3a0bcc52d4b19
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
with:
version: ${{ github.event.inputs.version_number }}
file_path: "./package-lock.json"

2
jslib

Submodule jslib updated: e4cd0af2f9...54c6a4b3c3

4
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{
"name": "bitwarden-web",
"name": "@bitwarden/web-vault",
"version": "2.25.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "bitwarden-web",
"name": "@bitwarden/web-vault",
"version": "2.25.1",
"hasInstallScript": true,
"license": "GPL-3.0",

View File

@@ -1,5 +1,5 @@
{
"name": "bitwarden-web",
"name": "@bitwarden/web-vault",
"version": "2.25.1",
"license": "GPL-3.0",
"repository": "https://github.com/bitwarden/web",

View File

@@ -12,6 +12,8 @@ import { OrganizationService } from "jslib-common/abstractions/organization.serv
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { PlanType } from "jslib-common/enums/planType";
import { StateService } from "jslib-common/abstractions/state.service";
import { ProductType } from "jslib-common/enums/productType";
@Component({
selector: "app-org-subscription",
@@ -27,6 +29,7 @@ export class OrganizationSubscriptionComponent implements OnInit {
adjustStorageAdd = true;
showAdjustStorage = false;
showUpdateLicense = false;
canDownloadLicense = false;
showDownloadLicense = false;
showChangePlan = false;
sub: OrganizationSubscriptionResponse;
@@ -42,6 +45,7 @@ export class OrganizationSubscriptionComponent implements OnInit {
private apiService: ApiService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private stateService: StateService,
private messagingService: MessagingService,
private route: ActivatedRoute,
private organizationService: OrganizationService,
@@ -66,6 +70,13 @@ export class OrganizationSubscriptionComponent implements OnInit {
this.loading = true;
this.userOrg = await this.organizationService.get(this.organizationId);
this.sub = await this.apiService.getOrganizationSubscription(this.organizationId);
const orgs = await this.stateService.getOrganizations();
const isAllowedOrgType = Object.values(orgs).some(org => org.planProductType === (ProductType.Enterprise | ProductType.Families));
const canDownload = (this.sub.planType !== PlanType.Free && this.subscription == null) ||
(this.subscription != null && !this.subscription.cancelled);
this.canDownloadLicense = canDownload && isAllowedOrgType;
this.loading = false;
}
@@ -211,7 +222,15 @@ export class OrganizationSubscriptionComponent implements OnInit {
}
get subscription() {
return this.sub != null ? this.sub.subscription : null;
const now = new Date();
const fiveDays = now.setDate(now.getDate() + 5);
if(this.sub === null) return null;
if(this.sub.subscription == null) {
this.sub.subscription = ({ cancelled: true, cancelAtEndDate: (fiveDays as any)} as any);
this.sub.subscription.items = new Array({sponsoredSubscriptionItem: false} as any);
}
return this.sub.subscription;
}
get nextInvoice() {
@@ -257,13 +276,6 @@ export class OrganizationSubscriptionComponent implements OnInit {
return this.sub.subscription?.items.some((i) => i.sponsoredSubscriptionItem);
}
get canDownloadLicense() {
return (
(this.sub.planType !== PlanType.Free && this.subscription == null) ||
(this.subscription != null && !this.subscription.cancelled)
);
}
get subscriptionDesc() {
if (this.sub.planType === PlanType.Free) {
return this.i18nService.t("subscriptionFreePlan", this.sub.seats.toString());

View File

@@ -52,6 +52,10 @@ import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "jslib-com
import { ThemeType } from "jslib-common/enums/themeType";
import { AccountFactory } from "jslib-common/models/domain/account";
import { Account } from "../../models/account";
export function initFactory(
window: Window,
storageService: StorageServiceAbstraction,
@@ -178,7 +182,19 @@ export function initFactory(
},
{
provide: StateServiceAbstraction,
useClass: StateService,
useFactory: (
storageService: StorageServiceAbstraction,
secureStorageService: StorageServiceAbstraction,
logService: LogService,
stateMigrationService: StateMigrationServiceAbstraction
) =>
new StateService(
storageService,
secureStorageService,
logService,
stateMigrationService,
new AccountFactory(Account)
),
deps: [
StorageServiceAbstraction,
"SECURE_STORAGE",

View File

@@ -587,6 +587,7 @@
id="idEmail"
class="form-control"
type="text"
inputmode="email"
name="Identity.Email"
[(ngModel)]="cipher.identity.email"
appInputVerbatim
@@ -599,6 +600,7 @@
id="idPhone"
class="form-control"
type="text"
inputmode="tel"
name="Identity.Phone"
[(ngModel)]="cipher.identity.phone"
[disabled]="cipher.isDeleted || viewOnly"

View File

@@ -3445,7 +3445,7 @@
"message": "Αποσύνδεση SSO"
},
"unlinkSsoConfirmation": {
"message": "Are you sure you want to unlink SSO for this organization?"
"message": "Είστε βέβαιοι ότι θέλετε να αποσυνδέσετε το SSO για αυτόν τον οργανισμό;"
},
"linkSso": {
"message": "Σύνδεσμος SSO"

View File

@@ -3164,7 +3164,7 @@
"description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing."
},
"dontAskFingerprintAgain": {
"message": "Don't ask to verify fingerprint phrase again",
"message": "Never prompt to verify fingerprint phrases for invited users (Not recommended)",
"description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing."
},
"free": {

View File

@@ -2078,7 +2078,7 @@
"message": "Samodzielnie hostowane środowisko (opcjonalnie)"
},
"usersGetPremium": {
"message": "Użytkownicy uzyskują dostęp do funkcji Premium"
"message": "Użytkownicy uzyskują dostęp do kont Premium"
},
"controlAccessWithGroups": {
"message": "Kontroluj dostęp z użyciem grup użytkowników"
@@ -4504,7 +4504,7 @@
"message": "Plan Bitwarden Families zawiera"
},
"sponsoredFamiliesPremiumAccess": {
"message": "Dostęp premium dla maksymalnie 6 użytkowników"
"message": "Konto Premium dla maksymalnie 6 użytkowników"
},
"sponsoredFamiliesSharedCollections": {
"message": "Udostępnione kolekcje dla sekretów rodziny"
@@ -4597,7 +4597,7 @@
"message": "Utworzono sponsorowanie"
},
"revoke": {
"message": "Odwołaj"
"message": "Unieważnij"
},
"emailSent": {
"message": "Wiadomość została wysłana"

View File

@@ -1,13 +1,6 @@
{
"extends": "./jslib/shared/tsconfig",
"compilerOptions": {
"moduleResolution": "node",
"noImplicitAny": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"target": "es2015",
"lib": ["es5", "es6", "dom"],
"sourceMap": true,
"baseUrl": ".",
"paths": {
"tldjs": ["jslib/common/src/misc/tldjs.noop"],

View File

@@ -31,7 +31,7 @@ const moduleRules = [
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
exclude: /loading(|-white).svg/,
generator: {
filename: "fonts/[name].[ext]",
filename: "fonts/[name][ext]",
},
type: "asset/resource",
},
@@ -39,7 +39,7 @@ const moduleRules = [
test: /\.(jpe?g|png|gif|svg|webp|avif)$/i,
exclude: /.*(fontawesome-webfont)\.svg/,
generator: {
filename: "images/[name].[ext]",
filename: "images/[name][ext]",
},
type: "asset/resource",
},