aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-17 16:02:38 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-25 14:44:01 +0200
commit37a44fc915eef2140e22ceb96aba6b6eb2509007 (patch)
treedd4a370ecc96cf38c99b940261aadc27065da7ae /client/src/app/shared/shared-main
parent33eb19e5199cc9fa4d73c6675c97508e3e072ef9 (diff)
downloadPeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.gz
PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.zst
PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.zip
Add ability to search playlists
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/angular/index.ts1
-rw-r--r--client/src/app/shared/shared-main/angular/link.component.html11
-rw-r--r--client/src/app/shared/shared-main/angular/link.component.scss7
-rw-r--r--client/src/app/shared/shared-main/angular/link.component.ts17
-rw-r--r--client/src/app/shared/shared-main/shared-main.module.ts7
5 files changed, 41 insertions, 2 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'
3export * from './duration-formatter.pipe' 3export * from './duration-formatter.pipe'
4export * from './from-now.pipe' 4export * from './from-now.pipe'
5export * from './infinite-scroller.directive' 5export * from './infinite-scroller.directive'
6export * from './link.component'
6export * from './number-formatter.pipe' 7export * from './number-formatter.pipe'
7export * from './peertube-template.directive' 8export * 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 @@
1a {
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 @@
1import { Component, Input, ViewEncapsulation } from '@angular/core'
2
3@Component({
4 selector: 'my-link',
5 styleUrls: [ './link.component.scss' ],
6 templateUrl: './link.component.html'
7})
8export 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}
diff --git a/client/src/app/shared/shared-main/shared-main.module.ts b/client/src/app/shared/shared-main/shared-main.module.ts
index c8dd01429..e5dfc59b2 100644
--- a/client/src/app/shared/shared-main/shared-main.module.ts
+++ b/client/src/app/shared/shared-main/shared-main.module.ts
@@ -4,7 +4,7 @@ import { CommonModule, DatePipe } from '@angular/common'
4import { HttpClientModule } from '@angular/common/http' 4import { HttpClientModule } from '@angular/common/http'
5import { NgModule } from '@angular/core' 5import { NgModule } from '@angular/core'
6import { FormsModule, ReactiveFormsModule } from '@angular/forms' 6import { FormsModule, ReactiveFormsModule } from '@angular/forms'
7import { ActivatedRouteSnapshot, RouterModule } from '@angular/router' 7import { RouterModule } from '@angular/router'
8import { 8import {
9 NgbButtonsModule, 9 NgbButtonsModule,
10 NgbCollapseModule, 10 NgbCollapseModule,
@@ -24,6 +24,7 @@ import {
24 DurationFormatterPipe, 24 DurationFormatterPipe,
25 FromNowPipe, 25 FromNowPipe,
26 InfiniteScrollerDirective, 26 InfiniteScrollerDirective,
27 LinkComponent,
27 NumberFormatterPipe, 28 NumberFormatterPipe,
28 PeerTubeTemplateDirective 29 PeerTubeTemplateDirective
29} from './angular' 30} from './angular'
@@ -35,11 +36,11 @@ import { FeedComponent } from './feeds'
35import { LoaderComponent, SmallLoaderComponent } from './loaders' 36import { LoaderComponent, SmallLoaderComponent } from './loaders'
36import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc' 37import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc'
37import { PluginPlaceholderComponent } from './plugins' 38import { PluginPlaceholderComponent } from './plugins'
39import { ActorRedirectGuard } from './router'
38import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users' 40import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users'
39import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video' 41import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video'
40import { VideoCaptionService } from './video-caption' 42import { VideoCaptionService } from './video-caption'
41import { VideoChannelService } from './video-channel' 43import { VideoChannelService } from './video-channel'
42import { ActorRedirectGuard } from './router'
43 44
44@NgModule({ 45@NgModule({
45 imports: [ 46 imports: [
@@ -76,6 +77,7 @@ import { ActorRedirectGuard } from './router'
76 77
77 InfiniteScrollerDirective, 78 InfiniteScrollerDirective,
78 PeerTubeTemplateDirective, 79 PeerTubeTemplateDirective,
80 LinkComponent,
79 81
80 ActionDropdownComponent, 82 ActionDropdownComponent,
81 ButtonComponent, 83 ButtonComponent,
@@ -130,6 +132,7 @@ import { ActorRedirectGuard } from './router'
130 132
131 InfiniteScrollerDirective, 133 InfiniteScrollerDirective,
132 PeerTubeTemplateDirective, 134 PeerTubeTemplateDirective,
135 LinkComponent,
133 136
134 ActionDropdownComponent, 137 ActionDropdownComponent,
135 ButtonComponent, 138 ButtonComponent,