diff options
Diffstat (limited to 'client/src/app/shared/shared-account-avatar')
5 files changed, 0 insertions, 101 deletions
diff --git a/client/src/app/shared/shared-account-avatar/account-avatar.component.html b/client/src/app/shared/shared-account-avatar/account-avatar.component.html deleted file mode 100644 index ca4ceb12f..000000000 --- a/client/src/app/shared/shared-account-avatar/account-avatar.component.html +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <ng-template #img> | ||
2 | <img [class]="class" [src]="avatarUrl" i18n-alt alt="Account avatar" /> | ||
3 | </ng-template> | ||
4 | |||
5 | <a *ngIf="account && href" [href]="href" target="_blank" rel="noopener noreferrer" [title]="title"> | ||
6 | <ng-template *ngTemplateOutlet="img"></ng-template> | ||
7 | </a> | ||
8 | |||
9 | <a *ngIf="account && internalHref" [routerLink]="internalHref" [title]="title"> | ||
10 | <ng-template *ngTemplateOutlet="img"></ng-template> | ||
11 | </a> | ||
12 | |||
13 | <ng-container *ngIf="!account || (!href && !internalHref)"> | ||
14 | <ng-template *ngTemplateOutlet="img"></ng-template> | ||
15 | </ng-container> | ||
diff --git a/client/src/app/shared/shared-account-avatar/account-avatar.component.scss b/client/src/app/shared/shared-account-avatar/account-avatar.component.scss deleted file mode 100644 index bb941d712..000000000 --- a/client/src/app/shared/shared-account-avatar/account-avatar.component.scss +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
4 | .avatar-25 { | ||
5 | @include avatar(25px); | ||
6 | } | ||
7 | |||
8 | .avatar-34 { | ||
9 | @include avatar(34px); | ||
10 | } | ||
11 | |||
12 | .avatar-36 { | ||
13 | @include avatar(36px); | ||
14 | } | ||
15 | |||
16 | .avatar-40 { | ||
17 | @include avatar(40px); | ||
18 | } | ||
19 | |||
20 | .avatar-120 { | ||
21 | @include avatar(120px); | ||
22 | } \ No newline at end of file | ||
diff --git a/client/src/app/shared/shared-account-avatar/account-avatar.component.ts b/client/src/app/shared/shared-account-avatar/account-avatar.component.ts deleted file mode 100644 index 02a0a18bf..000000000 --- a/client/src/app/shared/shared-account-avatar/account-avatar.component.ts +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | import { Account } from '../shared-main/account/account.model' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-account-avatar', | ||
6 | styleUrls: [ './account-avatar.component.scss' ], | ||
7 | templateUrl: './account-avatar.component.html' | ||
8 | }) | ||
9 | export class AccountAvatarComponent { | ||
10 | @Input() account: { | ||
11 | name: string | ||
12 | avatar?: { url?: string, path: string } | ||
13 | url: string | ||
14 | } | ||
15 | @Input() size: '25' | '34' | '36' | '40' | '120' = '36' | ||
16 | |||
17 | // Use an external link | ||
18 | @Input() href: string | ||
19 | // Use routerLink | ||
20 | @Input() internalHref: string | string[] | ||
21 | |||
22 | @Input() set title (value) { | ||
23 | this._title = value | ||
24 | } | ||
25 | |||
26 | private _title: string | ||
27 | |||
28 | get title () { | ||
29 | return this._title || $localize`${this.account.name} (account page)` | ||
30 | } | ||
31 | |||
32 | get class () { | ||
33 | return `avatar avatar-${this.size}` | ||
34 | } | ||
35 | |||
36 | get avatarUrl () { | ||
37 | return Account.GET_ACTOR_AVATAR_URL(this.account) | ||
38 | } | ||
39 | } | ||
diff --git a/client/src/app/shared/shared-account-avatar/index.ts b/client/src/app/shared/shared-account-avatar/index.ts deleted file mode 100644 index 40c742ba5..000000000 --- a/client/src/app/shared/shared-account-avatar/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './account-avatar.component' | ||
2 | export * from './shared-account-avatar.module' \ No newline at end of file | ||
diff --git a/client/src/app/shared/shared-account-avatar/shared-account-avatar.module.ts b/client/src/app/shared/shared-account-avatar/shared-account-avatar.module.ts deleted file mode 100644 index 17b27589f..000000000 --- a/client/src/app/shared/shared-account-avatar/shared-account-avatar.module.ts +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | import { NgModule } from '@angular/core' | ||
3 | import { SharedGlobalIconModule } from '../shared-icons' | ||
4 | import { SharedMainModule } from '../shared-main/shared-main.module' | ||
5 | import { AccountAvatarComponent } from './account-avatar.component' | ||
6 | |||
7 | @NgModule({ | ||
8 | imports: [ | ||
9 | SharedMainModule, | ||
10 | SharedGlobalIconModule | ||
11 | ], | ||
12 | |||
13 | declarations: [ | ||
14 | AccountAvatarComponent | ||
15 | ], | ||
16 | |||
17 | exports: [ | ||
18 | AccountAvatarComponent | ||
19 | ], | ||
20 | |||
21 | providers: [ ] | ||
22 | }) | ||
23 | export class SharedAccountAvatarModule { } | ||