diff --git a/apps/web/src/404.html b/apps/web/src/404.html index 5a650b367..275c34f72 100644 --- a/apps/web/src/404.html +++ b/apps/web/src/404.html @@ -28,7 +28,7 @@ @@ -42,11 +42,10 @@

- You can return to the web vault, check our - status page or - contact us. + You can return to the web vault, or + contact us.

- + diff --git a/apps/web/src/app/admin-console/organizations/create/organization-information.component.html b/apps/web/src/app/admin-console/organizations/create/organization-information.component.html index 6029cfd83..04324b7d1 100644 --- a/apps/web/src/app/admin-console/organizations/create/organization-information.component.html +++ b/apps/web/src/app/admin-console/organizations/create/organization-information.component.html @@ -12,7 +12,7 @@ - {{ "billingEmail" | i18n }} + {{ "email" | i18n }} diff --git a/apps/web/src/app/admin-console/organizations/settings/account.component.html b/apps/web/src/app/admin-console/organizations/settings/account.component.html index c7ac9910a..e03c8fedc 100644 --- a/apps/web/src/app/admin-console/organizations/settings/account.component.html +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.html @@ -15,7 +15,7 @@ - {{ "billingEmail" | i18n }} + {{ "email" | i18n }} diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index 9a22ea20b..4ce7fd4d8 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -184,6 +184,10 @@ export class AppComponent implements OnDestroy, OnInit { break; } case "showToast": + if (typeof message.text === "string" && typeof crypto.subtle === 'undefined') { + message.title = "This browser requires HTTPS to use the web vault"; + message.text = "Check the Vaultwarden wiki for details on how to enable it"; + } this.showToast(message); break; case "setFullWidth": diff --git a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts index 29cc6df15..3dbbfbd85 100644 --- a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts @@ -109,11 +109,11 @@ export class TwoFactorAuthenticatorComponent new window.QRious({ element: document.getElementById("qr"), value: - "otpauth://totp/Bitwarden:" + + "otpauth://totp/Vaultwarden:" + Utils.encodeRFC3986URIComponent(email) + "?secret=" + encodeURIComponent(this.key) + - "&issuer=Bitwarden", + "&issuer=Vaultwarden", size: 160, }); }, 100); diff --git a/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts b/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts index 22cea10ac..747f534bc 100644 --- a/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts +++ b/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts @@ -45,7 +45,7 @@ export class OrgBillingHistoryViewComponent implements OnInit, OnDestroy { return; } this.loading = true; - this.billing = await this.organizationApiService.getBilling(this.organizationId); + this.billing = null; this.loading = false; } } diff --git a/apps/web/src/app/components/environment-selector/environment-selector.component.ts b/apps/web/src/app/components/environment-selector/environment-selector.component.ts index 9f736a72e..ee4832958 100644 --- a/apps/web/src/app/components/environment-selector/environment-selector.component.ts +++ b/apps/web/src/app/components/environment-selector/environment-selector.component.ts @@ -30,7 +30,7 @@ export class EnvironmentSelectorComponent implements OnInit { this.isEuServer = domain.includes(RegionDomain.EU); this.isUsServer = domain.includes(RegionDomain.US) || domain.includes(RegionDomain.USQA); this.selectedRegionImageName = this.getRegionImage(); - this.showRegionSelector = !this.platformUtilsService.isSelfHost(); + this.showRegionSelector = false; } getRegionImage(): string { diff --git a/apps/web/src/app/core/init.service.ts b/apps/web/src/app/core/init.service.ts index 4a2ef2f49..b9d6d90a7 100644 --- a/apps/web/src/app/core/init.service.ts +++ b/apps/web/src/app/core/init.service.ts @@ -37,14 +37,26 @@ export class InitService { ) {} init() { + function getBaseUrl() { + // If the base URL is `https://vaultwarden.example.com/base/path/`, + // `window.location.href` should have one of the following forms: + // + // - `https://vaultwarden.example.com/base/path/` + // - `https://vaultwarden.example.com/base/path/#/some/route[?queryParam=...]` + // + // We want to get to just `https://vaultwarden.example.com/base/path`. + let baseUrl = window.location.href; + baseUrl = baseUrl.replace(/#.*/, ''); // Strip off `#` and everything after. + baseUrl = baseUrl.replace(/\/+$/, ''); // Trim any trailing `/` chars. + return baseUrl; + } return async () => { // Workaround to ignore stateService.activeAccount until process.env.URLS are set // TODO: Remove this when implementing ticket PM-2637 this.environmentService.initialized = false; await this.stateService.init(); - const urls = process.env.URLS as Urls; - urls.base ??= this.win.location.origin; + const urls = { base: getBaseUrl() }; this.environmentService.setUrls(urls); this.environmentService.initialized = true; diff --git a/apps/web/src/app/core/router.service.ts b/apps/web/src/app/core/router.service.ts index 279b94d4e..6667b7b3b 100644 --- a/apps/web/src/app/core/router.service.ts +++ b/apps/web/src/app/core/router.service.ts @@ -23,7 +23,7 @@ export class RouterService { .subscribe((event: NavigationEnd) => { this.currentUrl = event.url; - let title = i18nService.t("pageTitle", "Bitwarden"); + let title = i18nService.t("pageTitle", "Vaultwarden"); let child = this.activatedRoute.firstChild; while (child.firstChild) { child = child.firstChild; diff --git a/apps/web/src/app/core/web-platform-utils.service.ts b/apps/web/src/app/core/web-platform-utils.service.ts index ec829d71f..f3a362d0e 100644 --- a/apps/web/src/app/core/web-platform-utils.service.ts +++ b/apps/web/src/app/core/web-platform-utils.service.ts @@ -133,15 +133,15 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } isDev(): boolean { - return process.env.NODE_ENV === "development"; + return false; } isSelfHost(): boolean { - return WebPlatformUtilsService.isSelfHost(); + return false; } static isSelfHost(): boolean { - return process.env.ENV.toString() === "selfhosted"; + return false; } copyToClipboard(text: string, options?: any): void | boolean { diff --git a/apps/web/src/app/layouts/footer.component.html b/apps/web/src/app/layouts/footer.component.html index 8cacb4ceb..eee272822 100644 --- a/apps/web/src/app/layouts/footer.component.html +++ b/apps/web/src/app/layouts/footer.component.html @@ -1,8 +1,9 @@