diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-17 16:02:38 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-25 14:44:01 +0200 |
commit | 37a44fc915eef2140e22ceb96aba6b6eb2509007 (patch) | |
tree | dd4a370ecc96cf38c99b940261aadc27065da7ae /client/src/app/shared/shared-main/angular | |
parent | 33eb19e5199cc9fa4d73c6675c97508e3e072ef9 (diff) | |
download | PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.gz PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.zst PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.zip |
Add ability to search playlists
Diffstat (limited to 'client/src/app/shared/shared-main/angular')
4 files changed, 36 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/angular/index.ts b/client/src/app/shared/shared-main/angular/index.ts index 8ea47bb33..069b7f654 100644 --- a/client/src/app/shared/shared-main/angular/index.ts +++ b/client/src/app/shared/shared-main/angular/index.ts | |||
@@ -3,5 +3,6 @@ export * from './bytes.pipe' | |||
3 | export * from './duration-formatter.pipe' | 3 | export * from './duration-formatter.pipe' |
4 | export * from './from-now.pipe' | 4 | export * from './from-now.pipe' |
5 | export * from './infinite-scroller.directive' | 5 | export * from './infinite-scroller.directive' |
6 | export * from './link.component' | ||
6 | export * from './number-formatter.pipe' | 7 | export * from './number-formatter.pipe' |
7 | export * from './peertube-template.directive' | 8 | export * from './peertube-template.directive' |
diff --git a/client/src/app/shared/shared-main/angular/link.component.html b/client/src/app/shared/shared-main/angular/link.component.html new file mode 100644 index 000000000..e61a1e085 --- /dev/null +++ b/client/src/app/shared/shared-main/angular/link.component.html | |||
@@ -0,0 +1,11 @@ | |||
1 | <ng-template #content> | ||
2 | <ng-content></ng-content> | ||
3 | </ng-template> | ||
4 | |||
5 | <a *ngIf="!href" [routerLink]="internalLink" [attr.title]="title" [tabindex]="tabindex"> | ||
6 | <ng-template *ngTemplateOutlet="content"></ng-template> | ||
7 | </a> | ||
8 | |||
9 | <a *ngIf="href" [href]="href" [target]="target" [attr.title]="title" [tabindex]="tabindex"> | ||
10 | <ng-template *ngTemplateOutlet="content"></ng-template> | ||
11 | </a> | ||
diff --git a/client/src/app/shared/shared-main/angular/link.component.scss b/client/src/app/shared/shared-main/angular/link.component.scss new file mode 100644 index 000000000..bb86d5488 --- /dev/null +++ b/client/src/app/shared/shared-main/angular/link.component.scss | |||
@@ -0,0 +1,7 @@ | |||
1 | a { | ||
2 | color: inherit; | ||
3 | text-decoration: inherit; | ||
4 | position: inherit; | ||
5 | width: inherit; | ||
6 | height: inherit; | ||
7 | } | ||
diff --git a/client/src/app/shared/shared-main/angular/link.component.ts b/client/src/app/shared/shared-main/angular/link.component.ts new file mode 100644 index 000000000..76d1201b9 --- /dev/null +++ b/client/src/app/shared/shared-main/angular/link.component.ts | |||
@@ -0,0 +1,17 @@ | |||
1 | import { Component, Input, ViewEncapsulation } from '@angular/core' | ||
2 | |||
3 | @Component({ | ||
4 | selector: 'my-link', | ||
5 | styleUrls: [ './link.component.scss' ], | ||
6 | templateUrl: './link.component.html' | ||
7 | }) | ||
8 | export class LinkComponent { | ||
9 | @Input() internalLink?: any[] | ||
10 | |||
11 | @Input() href?: string | ||
12 | @Input() target?: string | ||
13 | |||
14 | @Input() title?: string | ||
15 | |||
16 | @Input() tabindex: string | number | ||
17 | } | ||