mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
[SG-329] Disabled Org display (#3050)
* chore: added strings for disabled org messages * chore: added icon display * chore: added prevent filter check * chore: code changes for desktop * chore: browser
This commit is contained in:
@@ -92,6 +92,12 @@
|
||||
>
|
||||
<i class="bwi bwi-fw bwi-business" aria-hidden="true"></i>
|
||||
{{ organization.name }}
|
||||
<i
|
||||
*ngIf="!organization.enabled"
|
||||
class="bwi bwi-fw bwi-exclamation-triangle text-danger"
|
||||
aria-label="{{ 'organizationIsDisabled' | i18n }}"
|
||||
appA11yTitle="{{ 'organizationIsDisabled' | i18n }}"
|
||||
></i>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -2,6 +2,9 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { OrganizationFilterComponent as BaseOrganizationFilterComponent } from "@bitwarden/angular/modules/vault-filter/components/organization-filter.component";
|
||||
import { DisplayMode } from "@bitwarden/angular/modules/vault-filter/models/display-mode";
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||
import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
|
||||
@Component({
|
||||
selector: "app-organization-filter",
|
||||
@@ -16,4 +19,24 @@ export class OrganizationFilterComponent extends BaseOrganizationFilterComponent
|
||||
hiddenDisplayModes.indexOf(this.displayMode) === -1
|
||||
);
|
||||
}
|
||||
|
||||
constructor(
|
||||
private i18nService: I18nService,
|
||||
private platformUtilsService: PlatformUtilsService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
async applyOrganizationFilter(organization: Organization) {
|
||||
if (organization.enabled) {
|
||||
//proceed with default behaviour for enabled organizations
|
||||
super.applyOrganizationFilter(organization);
|
||||
} else {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
null,
|
||||
this.i18nService.t("disabledOrganizationFilterError")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1964,6 +1964,12 @@
|
||||
"apiKey": {
|
||||
"message": "API Key"
|
||||
},
|
||||
"organizationIsDisabled": {
|
||||
"message": "Organization is disabled."
|
||||
},
|
||||
"disabledOrganizationFilterError" : {
|
||||
"message" : "Items in disabled Organizations cannot be accessed. Contact your Organization owner for assistance."
|
||||
},
|
||||
"neverLockWarning": {
|
||||
"message": "Are you sure you want to use the \"Never\" option? Setting your lock options to \"Never\" stores your vault's encryption key on your device. If you use this option you should ensure that you keep your device properly protected."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user