From 9f8f93ef9786386af5a49f2068649932b6a1f532 Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:23:12 -0400 Subject: [PATCH 01/10] Resolved subscription page problem for free org (#8622) --- .../subscription-status.component.html | 2 +- .../subscription-status.component.ts | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/billing/organizations/subscription-status.component.html b/apps/web/src/app/billing/organizations/subscription-status.component.html index 4bb2c91b85..99673a228e 100644 --- a/apps/web/src/app/billing/organizations/subscription-status.component.html +++ b/apps/web/src/app/billing/organizations/subscription-status.component.html @@ -14,7 +14,7 @@
{{ "billingPlan" | i18n }}
{{ planName }}
- +
{{ data.status.label }}
diff --git a/apps/web/src/app/billing/organizations/subscription-status.component.ts b/apps/web/src/app/billing/organizations/subscription-status.component.ts index 54af940be5..9a0b634edc 100644 --- a/apps/web/src/app/billing/organizations/subscription-status.component.ts +++ b/apps/web/src/app/billing/organizations/subscription-status.component.ts @@ -5,11 +5,11 @@ import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/mode import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; type ComponentData = { - status: { + status?: { label: string; value: string; }; - date: { + date?: { label: string; value: string; }; @@ -44,13 +44,15 @@ export class SubscriptionStatusComponent { } get status(): string { - return this.subscription.status != "canceled" && this.subscription.cancelAtEndDate - ? "pending_cancellation" - : this.subscription.status; + return this.subscription + ? this.subscription.status != "canceled" && this.subscription.cancelAtEndDate + ? "pending_cancellation" + : this.subscription.status + : "free"; } get subscription() { - return this.organizationSubscriptionResponse.subscription; + return this.organizationSubscriptionResponse?.subscription; } get data(): ComponentData { @@ -61,6 +63,9 @@ export class SubscriptionStatusComponent { const cancellationDateLabel = this.i18nService.t("cancellationDate"); switch (this.status) { + case "free": { + return {}; + } case "trialing": { return { status: { From fb51aa570d2ba4096ba94c1fbc50093f4a90cf61 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Fri, 5 Apr 2024 10:52:21 -0400 Subject: [PATCH 02/10] SM-1159: Rename Service Accounts to Machine Accounts (#8444) * SM-1159: Rename service accounts to machine accounts. Visible text only. * SM-1159: Second round of adding service to machine account renames * SM-1159: Change title * SM-1159: Fix typo * SM-1159: Add more keys * SM-1159: Reordered keys * SM-1159: Keys update --- .../organizations/manage/events.component.ts | 2 +- .../sm-adjust-subscription.component.html | 16 +- .../shared/sm-subscribe.component.html | 10 +- .../onboarding/onboarding.stories.ts | 2 +- apps/web/src/locales/en/messages.json | 163 ++++++++++++++++++ .../layout/navigation.component.html | 2 +- .../overview/overview.component.html | 2 +- .../project-service-accounts.component.html | 10 +- .../projects/project/project.component.html | 2 +- ...rvice-account-delete-dialog.component.html | 2 +- ...service-account-delete-dialog.component.ts | 20 +-- .../service-account-dialog.component.html | 2 +- .../service-account-dialog.component.ts | 8 +- .../service-accounts-events.component.ts | 2 +- .../service-account-people.component.html | 2 +- .../service-account-people.component.ts | 8 +- .../service-account-projects.component.html | 4 +- .../service-account.component.html | 2 +- .../service-account.component.ts | 2 +- .../service-accounts-list.component.html | 14 +- .../service-accounts.component.html | 2 +- .../shared/new-menu.component.html | 2 +- .../app/secrets-manager/sm-routing.module.ts | 2 +- 23 files changed, 222 insertions(+), 59 deletions(-) diff --git a/apps/web/src/app/admin-console/organizations/manage/events.component.ts b/apps/web/src/app/admin-console/organizations/manage/events.component.ts index 20a0ef6e42..9fb9015155 100644 --- a/apps/web/src/app/admin-console/organizations/manage/events.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/events.component.ts @@ -154,7 +154,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe if (r.serviceAccountId) { return { - name: this.i18nService.t("serviceAccount") + " " + this.getShortId(r.serviceAccountId), + name: this.i18nService.t("machineAccount") + " " + this.getShortId(r.serviceAccountId), }; } diff --git a/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html b/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html index c10ef9af28..4c8ea28284 100644 --- a/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html +++ b/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html @@ -33,7 +33,7 @@ - {{ "additionalServiceAccounts" | i18n }} + {{ "additionalMachineAccounts" | i18n }}
- {{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }} - {{ "addAdditionalServiceAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }} + {{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }} + {{ "addAdditionalMachineAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }}
{{ "total" | i18n }}: @@ -56,7 +56,7 @@ - {{ "limitServiceAccounts" | i18n }} + {{ "limitMachineAccounts" | i18n }} - {{ "limitServiceAccountsDesc" | i18n }} + {{ "limitMachineAccountsDesc" | i18n }} - {{ "serviceAccountLimit" | i18n }} + {{ "machineAccountLimit" | i18n }}
- {{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }} + {{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
- {{ "maxServiceAccountCost" | i18n }}: + {{ "maxMachineAccountCost" | i18n }}: {{ maxAdditionalServiceAccounts }} × {{ options.additionalServiceAccountPrice | currency: "$" }} = {{ maxServiceAccountTotalCost | currency: "$" }} / {{ options.interval | i18n }} diff --git a/apps/web/src/app/billing/shared/sm-subscribe.component.html b/apps/web/src/app/billing/shared/sm-subscribe.component.html index c9243e29a6..6cdaeb9476 100644 --- a/apps/web/src/app/billing/shared/sm-subscribe.component.html +++ b/apps/web/src/app/billing/shared/sm-subscribe.component.html @@ -20,10 +20,10 @@
  • {{ "unlimitedProjects" | i18n }}
  • -
  • {{ "serviceAccountsIncluded" | i18n: serviceAccountsIncluded }}
  • +
  • {{ "machineAccountsIncluded" | i18n: serviceAccountsIncluded }}
  • {{ - "additionalServiceAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$") + "additionalMachineAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$") }}
  • @@ -54,12 +54,12 @@
    - {{ "additionalServiceAccounts" | i18n }} + {{ "additionalMachineAccounts" | i18n }} - {{ "includedServiceAccounts" | i18n: serviceAccountsIncluded }} + {{ "includedMachineAccounts" | i18n: serviceAccountsIncluded }} {{ - "addAdditionalServiceAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$") + "addAdditionalMachineAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$") }} diff --git a/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts b/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts index c1529dc81e..4088b7335c 100644 --- a/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts +++ b/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts @@ -39,7 +39,7 @@ const Template: Story = (args) => ({ template: ` diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 05697461a9..1604057f70 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -7730,5 +7730,168 @@ "cancellationDate": { "message": "Cancellation date", "description": "The date header used when a subscription is cancelled." + }, + "machineAccountsCannotCreate": { + "message": "Machine accounts cannot be created in suspended organizations. Please contact your organization owner for assistance." + }, + "machineAccount": { + "message": "Machine account", + "description": "A machine user which can be used to automate processes and access secrets in the system." + }, + "machineAccounts": { + "message": "Machine accounts", + "description": "The title for the section that deals with machine accounts." + }, + "newMachineAccount": { + "message": "New machine account", + "description": "Title for creating a new machine account." + }, + "machineAccountsNoItemsMessage": { + "message": "Create a new machine account to get started automating secret access.", + "description": "Message to encourage the user to start creating machine accounts." + }, + "machineAccountsNoItemsTitle": { + "message": "Nothing to show yet", + "description": "Title to indicate that there are no machine accounts to display." + }, + "deleteMachineAccounts": { + "message": "Delete machine accounts", + "description": "Title for the action to delete one or multiple machine accounts." + }, + "deleteMachineAccount": { + "message": "Delete machine account", + "description": "Title for the action to delete a single machine account." + }, + "viewMachineAccount": { + "message": "View machine account", + "description": "Action to view the details of a machine account." + }, + "deleteMachineAccountDialogMessage": { + "message": "Deleting machine account $MACHINE_ACCOUNT$ is permanent and irreversible.", + "placeholders": { + "machine_account": { + "content": "$1", + "example": "Machine account name" + } + } + }, + "deleteMachineAccountsDialogMessage": { + "message": "Deleting machine accounts is permanent and irreversible." + }, + "deleteMachineAccountsConfirmMessage": { + "message": "Delete $COUNT$ machine accounts", + "placeholders": { + "count": { + "content": "$1", + "example": "2" + } + } + }, + "deleteMachineAccountToast": { + "message": "Machine account deleted" + }, + "deleteMachineAccountsToast": { + "message": "Machine accounts deleted" + }, + "searchMachineAccounts": { + "message": "Search machine accounts", + "description": "Placeholder text for searching machine accounts." + }, + "editMachineAccount": { + "message": "Edit machine account", + "description": "Title for editing a machine account." + }, + "machineAccountName": { + "message": "Machine account name", + "description": "Label for the name of a machine account" + }, + "machineAccountCreated": { + "message": "Machine account created", + "description": "Notifies that a new machine account has been created" + }, + "machineAccountUpdated": { + "message": "Machine account updated", + "description": "Notifies that a machine account has been updated" + }, + "projectMachineAccountsDescription": { + "message": "Grant machine accounts access to this project." + }, + "projectMachineAccountsSelectHint": { + "message": "Type or select machine accounts" + }, + "projectEmptyMachineAccountAccessPolicies": { + "message": "Add machine accounts to grant access" + }, + "machineAccountPeopleDescription": { + "message": "Grant groups or people access to this machine account." + }, + "machineAccountProjectsDescription": { + "message": "Assign projects to this machine account. " + }, + "createMachineAccount": { + "message": "Create a machine account" + }, + "maPeopleWarningMessage": { + "message": "Removing people from a machine account does not remove the access tokens they created. For security best practice, it is recommended to revoke access tokens created by people removed from a machine account." + }, + "smAccessRemovalWarningMaTitle": { + "message": "Remove access to this machine account" + }, + "smAccessRemovalWarningMaMessage": { + "message": "This action will remove your access to the machine account." + }, + "machineAccountsIncluded": { + "message": "$COUNT$ machine accounts included", + "placeholders": { + "count": { + "content": "$1", + "example": "3" + } + } + }, + "additionalMachineAccountCost": { + "message": "$COST$ per month for additional machine accounts", + "placeholders": { + "cost": { + "content": "$1", + "example": "$0.50" + } + } + }, + "additionalMachineAccounts": { + "message": "Additional machine accounts" + }, + "includedMachineAccounts": { + "message": "Your plan comes with $COUNT$ machine accounts.", + "placeholders": { + "count": { + "content": "$1", + "example": "50" + } + } + }, + "addAdditionalMachineAccounts": { + "message": "You can add additional machine accounts for $COST$ per month.", + "placeholders": { + "cost": { + "content": "$1", + "example": "$0.50" + } + } + }, + "limitMachineAccounts": { + "message": "Limit machine accounts (optional)" + }, + "limitMachineAccountsDesc": { + "message": "Set a limit for your machine accounts. Once this limit is reached, you will not be able to create new machine accounts." + }, + "machineAccountLimit": { + "message": "Machine account limit (optional)" + }, + "maxMachineAccountCost": { + "message": "Max potential machine account cost" + }, + "machineAccountAccessUpdated": { + "message": "Machine account access updated" } } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/layout/navigation.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/layout/navigation.component.html index 5ac76a31fc..e71f520996 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/layout/navigation.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/layout/navigation.component.html @@ -18,7 +18,7 @@ > diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html index 04d705af23..255877e4e8 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html @@ -5,7 +5,7 @@

    - {{ "projectServiceAccountsDescription" | i18n }} + {{ "projectMachineAccountsDescription" | i18n }}

    {{ "secrets" | i18n }} {{ "people" | i18n }} - {{ "serviceAccounts" | i18n }} + {{ "machineAccounts" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.html index 9af3483703..5ef2be8ade 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.html @@ -8,7 +8,7 @@ {{ data.serviceAccounts.length }} - {{ "serviceAccounts" | i18n }} + {{ "machineAccounts" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts index 3d136aa92a..b31ef03d12 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts @@ -43,14 +43,14 @@ export class ServiceAccountDeleteDialogComponent { get title() { return this.data.serviceAccounts.length === 1 - ? this.i18nService.t("deleteServiceAccount") - : this.i18nService.t("deleteServiceAccounts"); + ? this.i18nService.t("deleteMachineAccount") + : this.i18nService.t("deleteMachineAccounts"); } get dialogContent() { return this.data.serviceAccounts.length === 1 - ? this.i18nService.t("deleteServiceAccountDialogMessage", this.data.serviceAccounts[0].name) - : this.i18nService.t("deleteServiceAccountsDialogMessage"); + ? this.i18nService.t("deleteMachineAccountDialogMessage", this.data.serviceAccounts[0].name) + : this.i18nService.t("deleteMachineAccountsDialogMessage"); } get dialogConfirmationLabel() { @@ -79,17 +79,17 @@ export class ServiceAccountDeleteDialogComponent { const message = this.data.serviceAccounts.length === 1 - ? "deleteServiceAccountToast" - : "deleteServiceAccountsToast"; + ? "deleteMachineAccountToast" + : "deleteMachineAccountsToast"; this.platformUtilsService.showToast("success", null, this.i18nService.t(message)); } openBulkStatusDialog(bulkStatusResults: BulkOperationStatus[]) { this.dialogService.open(BulkStatusDialogComponent, { data: { - title: "deleteServiceAccounts", - subTitle: "serviceAccounts", - columnTitle: "serviceAccountName", + title: "deleteMachineAccounts", + subTitle: "machineAccounts", + columnTitle: "machineAccountName", message: "bulkDeleteProjectsErrorMessage", details: bulkStatusResults, }, @@ -100,7 +100,7 @@ export class ServiceAccountDeleteDialogComponent { return this.data.serviceAccounts?.length === 1 ? this.i18nService.t("deleteProjectConfirmMessage", this.data.serviceAccounts[0].name) : this.i18nService.t( - "deleteServiceAccountsConfirmMessage", + "deleteMachineAccountsConfirmMessage", this.data.serviceAccounts?.length.toString(), ); } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html index 55f6ff4da1..0064341537 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html @@ -7,7 +7,7 @@
    - {{ "serviceAccountName" | i18n }} + {{ "machineAccountName" | i18n }}
    diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts index 9aa7c658f3..105ca59e57 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts @@ -69,7 +69,7 @@ export class ServiceAccountDialogComponent { this.platformUtilsService.showToast( "error", null, - this.i18nService.t("serviceAccountsCannotCreate"), + this.i18nService.t("machineAccountsCannotCreate"), ); return; } @@ -85,14 +85,14 @@ export class ServiceAccountDialogComponent { if (this.data.operation == OperationType.Add) { await this.serviceAccountService.create(this.data.organizationId, serviceAccountView); - serviceAccountMessage = this.i18nService.t("serviceAccountCreated"); + serviceAccountMessage = this.i18nService.t("machineAccountCreated"); } else { await this.serviceAccountService.update( this.data.serviceAccountId, this.data.organizationId, serviceAccountView, ); - serviceAccountMessage = this.i18nService.t("serviceAccountUpdated"); + serviceAccountMessage = this.i18nService.t("machineAccountUpdated"); } this.platformUtilsService.showToast("success", null, serviceAccountMessage); @@ -107,6 +107,6 @@ export class ServiceAccountDialogComponent { } get title() { - return this.data.operation === OperationType.Add ? "newServiceAccount" : "editServiceAccount"; + return this.data.operation === OperationType.Add ? "newMachineAccount" : "editMachineAccount"; } } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.ts index 1ef71811a1..554e7fa37d 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.ts @@ -65,7 +65,7 @@ export class ServiceAccountEventsComponent extends BaseEventsComponent implement protected getUserName() { return { - name: this.i18nService.t("serviceAccount") + " " + this.serviceAccountId, + name: this.i18nService.t("machineAccount") + " " + this.serviceAccountId, email: "", }; } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.html index 79c8132bbc..074fa8ca00 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.html @@ -1,7 +1,7 @@

    - {{ "serviceAccountPeopleDescription" | i18n }} + {{ "machineAccountPeopleDescription" | i18n }}

    { const confirmed = await this.dialogService.openSimpleDialog({ - title: { key: "smAccessRemovalWarningSaTitle" }, - content: { key: "smAccessRemovalWarningSaMessage" }, + title: { key: "smAccessRemovalWarningMaTitle" }, + content: { key: "smAccessRemovalWarningMaMessage" }, acceptButtonText: { key: "removeAccess" }, cancelButtonText: { key: "cancel" }, type: "warning", @@ -222,7 +222,7 @@ export class ServiceAccountPeopleComponent implements OnInit, OnDestroy { private async showAccessTokenStillAvailableWarning(): Promise { await this.dialogService.openSimpleDialog({ title: { key: "saPeopleWarningTitle" }, - content: { key: "saPeopleWarningMessage" }, + content: { key: "maPeopleWarningMessage" }, type: "warning", acceptButtonText: { key: "close" }, cancelButtonText: null, diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.html index 368a62a933..772579426a 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.html @@ -1,6 +1,6 @@

    - {{ "serviceAccountProjectsDescription" | i18n }} + {{ "machineAccountProjectsDescription" | i18n }}

    {{ - "serviceAccounts" | i18n + "machineAccounts" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts index d352e8a246..083ec7aebb 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts @@ -49,7 +49,7 @@ export class ServiceAccountComponent implements OnInit, OnDestroy { this.platformUtilsService.showToast( "error", null, - this.i18nService.t("notFound", this.i18nService.t("serviceAccount")), + this.i18nService.t("notFound", this.i18nService.t("machineAccount")), ); }); return EMPTY; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html index fb8d953e10..bfb7b98542 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html @@ -3,8 +3,8 @@
    - {{ "serviceAccountsNoItemsTitle" | i18n }} - {{ "serviceAccountsNoItemsMessage" | i18n }} + {{ "machineAccountsNoItemsTitle" | i18n }} + {{ "machineAccountsNoItemsMessage" | i18n }} @@ -80,16 +80,16 @@ - {{ "viewServiceAccount" | i18n }} + {{ "viewMachineAccount" | i18n }} @@ -101,7 +101,7 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html index 92ebcdbaac..d7a4f2c747 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html @@ -1,6 +1,6 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html index 528514e678..457eff37fa 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html @@ -19,6 +19,6 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts b/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts index 0cad3129a4..f9ddcdad78 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts @@ -58,7 +58,7 @@ const routes: Routes = [ path: "service-accounts", loadChildren: () => ServiceAccountsModule, data: { - titleId: "serviceAccounts", + titleId: "machineAccounts", }, }, { From 09169cac719431183261fd4eb68d8ab37248537e Mon Sep 17 00:00:00 2001 From: Victoria League Date: Fri, 5 Apr 2024 10:58:32 -0400 Subject: [PATCH 03/10] [CL-254] Rename 500 colors to 600 to prep for UI redesign (#8623) * [CL-254] Rename 500 colors to 600 to prep for UI redesign --------- Co-authored-by: Will Martin --- .../src/auth/delete-account.component.html | 2 +- .../src/app/admin-console/icons/devices.ts | 18 +++--- .../account/change-avatar.component.html | 4 +- .../account/danger-zone.component.html | 2 +- .../auth/settings/verify-email.component.html | 4 +- .../create-passkey-failed.icon.ts | 18 +++--- .../create-passkey.icon.ts | 16 +++--- .../vertical-step-content.component.html | 4 +- .../app/billing/shared/payment.component.ts | 2 +- .../components/selectable-avatar.component.ts | 4 +- .../product-switcher-content.component.html | 4 +- .../src/app/settings/low-kdf.component.html | 4 +- .../onboarding/onboarding.component.html | 2 +- .../app/tools/send/icons/expired-send.icon.ts | 10 ++-- .../src/app/tools/send/icons/no-send.icon.ts | 14 ++--- .../individual-vault/add-edit.component.html | 2 +- .../collection-access-restricted.component.ts | 4 +- .../auth/icons/create-passkey-failed.icon.ts | 18 +++--- .../src/auth/icons/create-passkey.icon.ts | 16 +++--- ...erification-biometrics-fingerprint.icon.ts | 12 ++-- libs/auth/src/icons/bitwarden-logo.ts | 4 +- libs/auth/src/icons/icon-lock.ts | 2 +- .../components/src/avatar/avatar.component.ts | 2 +- libs/components/src/avatar/avatar.mdx | 4 +- libs/components/src/badge/badge.directive.ts | 10 ++-- .../components/src/banner/banner.component.ts | 8 +-- .../src/button/button.component.spec.ts | 8 +-- .../components/src/button/button.component.ts | 16 +++--- .../src/callout/callout.component.ts | 8 +-- .../src/checkbox/checkbox.component.ts | 10 ++-- .../color-password.component.ts | 2 +- .../simple-configurable-dialog.component.ts | 2 +- .../dialog/simple-dialog/simple-dialog.mdx | 10 ++-- .../src/form-field/prefix.directive.ts | 2 +- libs/components/src/form/forms.mdx | 2 +- .../src/icon-button/icon-button.component.ts | 16 +++--- .../src/icon-button/icon-button.stories.ts | 4 +- libs/components/src/icon/icons/no-access.ts | 12 ++-- libs/components/src/icon/icons/search.ts | 18 +++--- libs/components/src/input/input.directive.ts | 2 +- libs/components/src/link/link.directive.ts | 6 +- libs/components/src/link/link.mdx | 2 +- libs/components/src/link/link.stories.ts | 6 +- .../src/menu/menu-divider.component.html | 2 +- libs/components/src/menu/menu.component.html | 2 +- .../src/multi-select/scss/bw.theme.scss | 2 +- .../components/src/popover/popover.stories.ts | 28 +++++----- .../src/progress/progress.component.ts | 8 +-- libs/components/src/progress/progress.mdx | 8 +-- .../src/radio-button/radio-input.component.ts | 6 +- libs/components/src/stories/colors.mdx | 12 ++-- libs/components/src/stories/migration.mdx | 22 ++++---- .../tabs/shared/tab-list-item.directive.ts | 4 +- .../src/toggle-group/toggle.component.ts | 10 ++-- libs/components/src/tw-theme.css | 56 +++++++++++-------- libs/components/tailwind.config.base.js | 22 ++++---- 56 files changed, 253 insertions(+), 245 deletions(-) diff --git a/apps/desktop/src/auth/delete-account.component.html b/apps/desktop/src/auth/delete-account.component.html index 8639b0f5be..42c06b7489 100644 --- a/apps/desktop/src/auth/delete-account.component.html +++ b/apps/desktop/src/auth/delete-account.component.html @@ -7,7 +7,7 @@ {{ "deleteAccountWarning" | i18n }} -
    +
    - - - - - - - - - + + + + + + + + + `; diff --git a/apps/web/src/app/auth/settings/account/change-avatar.component.html b/apps/web/src/app/auth/settings/account/change-avatar.component.html index 38e35399ae..3a974241d5 100644 --- a/apps/web/src/app/auth/settings/account/change-avatar.component.html +++ b/apps/web/src/app/auth/settings/account/change-avatar.component.html @@ -43,10 +43,10 @@ (click)="showCustomPicker()" title="{{ 'customColor' | i18n }}" [ngClass]="{ - '!tw-outline-[3px] tw-outline-primary-500 hover:tw-outline-[3px] hover:tw-outline-primary-500': + '!tw-outline-[3px] tw-outline-primary-600 hover:tw-outline-[3px] hover:tw-outline-primary-600': customColorSelected }" - class="tw-outline-solid tw-bg-white tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-500 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-500" + class="tw-outline-solid tw-bg-white tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-600 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-600" [style.background-color]="customColor$ | async" > {{ "dangerZone" | i18n }} -
    +

    {{ "dangerZoneDesc" | i18n }}

    diff --git a/apps/web/src/app/auth/settings/verify-email.component.html b/apps/web/src/app/auth/settings/verify-email.component.html index 6fd2128651..ccad78348c 100644 --- a/apps/web/src/app/auth/settings/verify-email.component.html +++ b/apps/web/src/app/auth/settings/verify-email.component.html @@ -1,5 +1,5 @@ -
    -
    +
    +
    {{ "verifyEmail" | i18n }}
    diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts index 39a2389c5a..65902a64c9 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts @@ -2,27 +2,27 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyFailedIcon = svgIcon` - - - - - - - - - `; diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts index c0e984bbee..79ba4021b5 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts @@ -2,25 +2,25 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyIcon = svgIcon` - - - - - - - - `; diff --git a/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html b/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html index 622a9f6d92..06b1dc7c51 100644 --- a/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html +++ b/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html @@ -14,7 +14,7 @@ class="tw-mr-3.5 tw-w-9 tw-rounded-full tw-font-bold tw-leading-9" *ngIf="!step.completed" [ngClass]="{ - 'tw-bg-primary-500 tw-text-contrast': selected, + 'tw-bg-primary-600 tw-text-contrast': selected, 'tw-bg-secondary-300 tw-text-main': !selected && !disabled && step.editable, 'tw-bg-transparent tw-text-muted': disabled }" @@ -22,7 +22,7 @@ {{ stepNumber }} diff --git a/apps/web/src/app/billing/shared/payment.component.ts b/apps/web/src/app/billing/shared/payment.component.ts index 6e34962cb7..652bed7801 100644 --- a/apps/web/src/app/billing/shared/payment.component.ts +++ b/apps/web/src/app/billing/shared/payment.component.ts @@ -287,7 +287,7 @@ export class PaymentComponent implements OnInit, OnDestroy { )})`; this.StripeElementStyle.invalid.color = `rgb(${style.getPropertyValue("--color-text-main")})`; this.StripeElementStyle.invalid.borderColor = `rgb(${style.getPropertyValue( - "--color-danger-500", + "--color-danger-600", )})`; }); } diff --git a/apps/web/src/app/components/selectable-avatar.component.ts b/apps/web/src/app/components/selectable-avatar.component.ts index 4a138ec989..1de722461a 100644 --- a/apps/web/src/app/components/selectable-avatar.component.ts +++ b/apps/web/src/app/components/selectable-avatar.component.ts @@ -41,13 +41,13 @@ export class SelectableAvatarComponent { .concat(["tw-cursor-pointer", "tw-outline", "tw-outline-solid", "tw-outline-offset-1"]) .concat( this.selected - ? ["tw-outline-[3px]", "tw-outline-primary-500"] + ? ["tw-outline-[3px]", "tw-outline-primary-600"] : [ "tw-outline-0", "hover:tw-outline-1", "hover:tw-outline-primary-300", "focus:tw-outline-2", - "focus:tw-outline-primary-500", + "focus:tw-outline-primary-600", ], ); } diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html b/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html index 9068f9c071..f038fafecc 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html +++ b/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html @@ -14,10 +14,10 @@ [routerLink]="product.appRoute" [ngClass]=" product.isActive - ? 'tw-bg-primary-500 tw-font-bold !tw-text-contrast tw-ring-offset-2 hover:tw-bg-primary-500' + ? 'tw-bg-primary-600 tw-font-bold !tw-text-contrast tw-ring-offset-2 hover:tw-bg-primary-600' : '' " - class="tw-group tw-flex tw-h-24 tw-w-28 tw-flex-col tw-items-center tw-justify-center tw-rounded tw-p-1 tw-text-primary-500 tw-outline-none hover:tw-bg-background-alt hover:tw-text-primary-700 hover:tw-no-underline focus-visible:!tw-ring-2 focus-visible:!tw-ring-primary-700" + class="tw-group tw-flex tw-h-24 tw-w-28 tw-flex-col tw-items-center tw-justify-center tw-rounded tw-p-1 tw-text-primary-600 tw-outline-none hover:tw-bg-background-alt hover:tw-text-primary-700 hover:tw-no-underline focus-visible:!tw-ring-2 focus-visible:!tw-ring-primary-700" ariaCurrentWhenActive="page" > diff --git a/apps/web/src/app/settings/low-kdf.component.html b/apps/web/src/app/settings/low-kdf.component.html index e140f345e9..fd191b21e8 100644 --- a/apps/web/src/app/settings/low-kdf.component.html +++ b/apps/web/src/app/settings/low-kdf.component.html @@ -1,5 +1,5 @@ -
    -
    +
    +
    {{ "lowKdfIterations" | i18n }}
    diff --git a/apps/web/src/app/shared/components/onboarding/onboarding.component.html b/apps/web/src/app/shared/components/onboarding/onboarding.component.html index 6a0bacbf89..ecf1eb75dd 100644 --- a/apps/web/src/app/shared/components/onboarding/onboarding.component.html +++ b/apps/web/src/app/shared/components/onboarding/onboarding.component.html @@ -1,7 +1,7 @@
    - +
    {{ title }}
    diff --git a/apps/web/src/app/tools/send/icons/expired-send.icon.ts b/apps/web/src/app/tools/send/icons/expired-send.icon.ts index b39cdca797..3ce0856a26 100644 --- a/apps/web/src/app/tools/send/icons/expired-send.icon.ts +++ b/apps/web/src/app/tools/send/icons/expired-send.icon.ts @@ -2,10 +2,10 @@ import { svgIcon } from "@bitwarden/components"; export const ExpiredSend = svgIcon` - - - - - + + + + + `; diff --git a/apps/web/src/app/tools/send/icons/no-send.icon.ts b/apps/web/src/app/tools/send/icons/no-send.icon.ts index 7811a4723b..f5494a4b3c 100644 --- a/apps/web/src/app/tools/send/icons/no-send.icon.ts +++ b/apps/web/src/app/tools/send/icons/no-send.icon.ts @@ -2,12 +2,12 @@ import { svgIcon } from "@bitwarden/components"; export const NoSend = svgIcon` - - - - - - - + + + + + + + `; diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.html b/apps/web/src/app/vault/individual-vault/add-edit.component.html index 85075acfdd..db7a89003d 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.html +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.html @@ -322,7 +322,7 @@ > -
    +
    @@ -111,7 +111,7 @@ export const Contrast: Story = { render: (args) => ({ props: args, template: ` -
    +
    `, diff --git a/libs/components/src/icon/icons/no-access.ts b/libs/components/src/icon/icons/no-access.ts index f9ad048752..1011b3089c 100644 --- a/libs/components/src/icon/icons/no-access.ts +++ b/libs/components/src/icon/icons/no-access.ts @@ -2,11 +2,11 @@ import { svgIcon } from "../icon"; export const NoAccess = svgIcon` - - - - - - + + + + + + `; diff --git a/libs/components/src/icon/icons/search.ts b/libs/components/src/icon/icons/search.ts index de41dd3b19..914fa0e981 100644 --- a/libs/components/src/icon/icons/search.ts +++ b/libs/components/src/icon/icons/search.ts @@ -4,15 +4,15 @@ export const Search = svgIcon` - - - - - - - - - + + + + + + + + + `; diff --git a/libs/components/src/input/input.directive.ts b/libs/components/src/input/input.directive.ts index 9bd110704e..27c7d8175d 100644 --- a/libs/components/src/input/input.directive.ts +++ b/libs/components/src/input/input.directive.ts @@ -29,7 +29,7 @@ export class BitInputDirective implements BitFormFieldControl { "tw-bg-background-alt", "tw-border", "tw-border-solid", - this.hasError ? "tw-border-danger-500" : "tw-border-secondary-500", + this.hasError ? "tw-border-danger-600" : "tw-border-secondary-600", "tw-text-main", "tw-placeholder-text-muted", // Rounded diff --git a/libs/components/src/link/link.directive.ts b/libs/components/src/link/link.directive.ts index 6d923acf3d..a8ee528da1 100644 --- a/libs/components/src/link/link.directive.ts +++ b/libs/components/src/link/link.directive.ts @@ -4,10 +4,10 @@ export type LinkType = "primary" | "secondary" | "contrast" | "light"; const linkStyles: Record = { primary: [ - "!tw-text-primary-500", - "hover:!tw-text-primary-500", + "!tw-text-primary-600", + "hover:!tw-text-primary-600", "focus-visible:before:tw-ring-primary-700", - "disabled:!tw-text-primary-500/60", + "disabled:!tw-text-primary-600/60", ], secondary: [ "!tw-text-main", diff --git a/libs/components/src/link/link.mdx b/libs/components/src/link/link.mdx index 48c8c2abd5..100824277a 100644 --- a/libs/components/src/link/link.mdx +++ b/libs/components/src/link/link.mdx @@ -6,7 +6,7 @@ import * as stories from "./link.stories"; # Link / Text button -Text Links and Buttons use the `primary-500` color and can use either the `` or `
    @@ -61,7 +61,7 @@ export const Anchors: StoryObj = { render: (args) => ({ props: args, template: ` -
    +
    @@ -108,7 +108,7 @@ export const Disabled: Story = { template: ` -
    +
    `, diff --git a/libs/components/src/menu/menu-divider.component.html b/libs/components/src/menu/menu-divider.component.html index 98048261cf..7d9fee3e8f 100644 --- a/libs/components/src/menu/menu-divider.component.html +++ b/libs/components/src/menu/menu-divider.component.html @@ -1,5 +1,5 @@ diff --git a/libs/components/src/menu/menu.component.html b/libs/components/src/menu/menu.component.html index 98a35e97de..5b6b15b5cb 100644 --- a/libs/components/src/menu/menu.component.html +++ b/libs/components/src/menu/menu.component.html @@ -1,7 +1,7 @@