mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
[SM-582] update sm logo (#4896)
* update logo * update layout stories * remove unused logo; optimize svg
This commit is contained in:
parent
bb36184256
commit
fa1a779b63
@ -1,13 +1,22 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { RouterModule } from "@angular/router";
|
import { RouterModule } from "@angular/router";
|
||||||
import { Meta, Story, moduleMetadata } from "@storybook/angular";
|
import { Meta, Story, moduleMetadata } from "@storybook/angular";
|
||||||
|
import { BehaviorSubject } from "rxjs";
|
||||||
|
|
||||||
import { NavigationModule, IconModule } from "@bitwarden/components";
|
import { OrganizationService } from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||||
|
import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||||
|
import { IconModule } from "@bitwarden/components";
|
||||||
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/tests/preloaded-english-i18n.module";
|
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/tests/preloaded-english-i18n.module";
|
||||||
|
|
||||||
import { LayoutComponent } from "./layout.component";
|
import { LayoutComponent } from "./layout.component";
|
||||||
|
import { LayoutModule } from "./layout.module";
|
||||||
import { NavigationComponent } from "./navigation.component";
|
import { NavigationComponent } from "./navigation.component";
|
||||||
|
|
||||||
|
class MockOrganizationService implements Partial<OrganizationService> {
|
||||||
|
private static _orgs = new BehaviorSubject<Organization[]>([]);
|
||||||
|
organizations$ = MockOrganizationService._orgs; // eslint-disable-line rxjs/no-exposed-subjects
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "story-content",
|
selector: "story-content",
|
||||||
template: ` <p class="tw-text-main">Content</p> `,
|
template: ` <p class="tw-text-main">Content</p> `,
|
||||||
@ -49,11 +58,12 @@ export default {
|
|||||||
],
|
],
|
||||||
{ useHash: true }
|
{ useHash: true }
|
||||||
),
|
),
|
||||||
|
LayoutModule,
|
||||||
IconModule,
|
IconModule,
|
||||||
NavigationModule,
|
|
||||||
PreloadedEnglishI18nModule,
|
PreloadedEnglishI18nModule,
|
||||||
],
|
],
|
||||||
declarations: [LayoutComponent, NavigationComponent, StoryContentComponent],
|
declarations: [StoryContentComponent],
|
||||||
|
providers: [{ provide: OrganizationService, useClass: MockOrganizationService }],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<a [routerLink]="['secrets']" class="tw-mx-4 tw-mt-8 tw-mb-3 tw-block">
|
<a routerLink="." class="tw-m-5 tw-mt-7 tw-block">
|
||||||
<bit-icon [icon]="logo" class="tw-w-full tw-text-alt2"></bit-icon>
|
<bit-icon [icon]="logo"></bit-icon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<org-switcher [filter]="orgFilter" [hideNewButton]="true"></org-switcher>
|
<org-switcher [filter]="orgFilter" [hideNewButton]="true"></org-switcher>
|
||||||
|
@ -12,13 +12,11 @@ import { SecretsManagerLogo } from "./secrets-manager-logo";
|
|||||||
templateUrl: "./navigation.component.html",
|
templateUrl: "./navigation.component.html",
|
||||||
})
|
})
|
||||||
export class NavigationComponent {
|
export class NavigationComponent {
|
||||||
|
protected readonly logo = SecretsManagerLogo;
|
||||||
|
protected orgFilter = (org: Organization) => org.canAccessSecretsManager;
|
||||||
protected isAdmin$ = this.route.params.pipe(
|
protected isAdmin$ = this.route.params.pipe(
|
||||||
map((params) => this.organizationService.get(params.organizationId)?.isAdmin)
|
map((params) => this.organizationService.get(params.organizationId)?.isAdmin)
|
||||||
);
|
);
|
||||||
|
|
||||||
protected readonly logo = SecretsManagerLogo;
|
|
||||||
|
|
||||||
protected orgFilter = (org: Organization) => org.canAccessSecretsManager;
|
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {}
|
constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user