[SM-582] update sm logo (#4896)

* update logo

* update layout stories

* remove unused logo; optimize svg
This commit is contained in:
Will Martin 2023-03-02 09:14:29 -05:00 committed by GitHub
parent bb36184256
commit fa1a779b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 12 deletions

View File

@ -1,13 +1,22 @@
import { Component } from "@angular/core";
import { RouterModule } from "@angular/router";
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 { LayoutComponent } from "./layout.component";
import { LayoutModule } from "./layout.module";
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({
selector: "story-content",
template: ` <p class="tw-text-main">Content</p> `,
@ -49,11 +58,12 @@ export default {
],
{ useHash: true }
),
LayoutModule,
IconModule,
NavigationModule,
PreloadedEnglishI18nModule,
],
declarations: [LayoutComponent, NavigationComponent, StoryContentComponent],
declarations: [StoryContentComponent],
providers: [{ provide: OrganizationService, useClass: MockOrganizationService }],
}),
],
} as Meta;

View File

@ -1,5 +1,5 @@
<a [routerLink]="['secrets']" class="tw-mx-4 tw-mt-8 tw-mb-3 tw-block">
<bit-icon [icon]="logo" class="tw-w-full tw-text-alt2"></bit-icon>
<a routerLink="." class="tw-m-5 tw-mt-7 tw-block">
<bit-icon [icon]="logo"></bit-icon>
</a>
<org-switcher [filter]="orgFilter" [hideNewButton]="true"></org-switcher>

View File

@ -12,13 +12,11 @@ import { SecretsManagerLogo } from "./secrets-manager-logo";
templateUrl: "./navigation.component.html",
})
export class NavigationComponent {
protected readonly logo = SecretsManagerLogo;
protected orgFilter = (org: Organization) => org.canAccessSecretsManager;
protected isAdmin$ = this.route.params.pipe(
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) {}
}

File diff suppressed because one or more lines are too long