aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-08-18 11:09:34 +0200
committerChocobozzz <me@florianbigard.com>2023-08-18 11:09:34 +0200
commitca589b42f1159d4474d7803c02b0c90579316bd5 (patch)
treee55230c77ea379648dd8195c17ded8282199de65 /client/src/app/shared
parentc925e99ca40c9077eda0f6b47e76c671189a661d (diff)
downloadPeerTube-ca589b42f1159d4474d7803c02b0c90579316bd5.tar.gz
PeerTube-ca589b42f1159d4474d7803c02b0c90579316bd5.tar.zst
PeerTube-ca589b42f1159d4474d7803c02b0c90579316bd5.zip
Fix button router link
Using the default one assigns the directive to the host, where we just want to put it inside the `my-button` component
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.html4
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.ts2
-rw-r--r--client/src/app/shared/shared-main/buttons/edit-button.component.ts4
-rw-r--r--client/src/app/shared/shared-video-live/live-stream-information.component.html2
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html2
5 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/shared/shared-main/buttons/button.component.html b/client/src/app/shared/shared-main/buttons/button.component.html
index 20c982744..d87e35876 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.html
+++ b/client/src/app/shared/shared-main/buttons/button.component.html
@@ -1,8 +1,8 @@
1<button *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title"> 1<button *ngIf="!ptRouterLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title">
2 <ng-container *ngTemplateOutlet="content"></ng-container> 2 <ng-container *ngTemplateOutlet="content"></ng-container>
3</button> 3</button>
4 4
5<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink"> 5<a *ngIf="ptRouterLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="ptRouterLink">
6 <ng-container *ngTemplateOutlet="content"></ng-container> 6 <ng-container *ngTemplateOutlet="content"></ng-container>
7</a> 7</a>
8 8
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index e3a830891..50a3d99ef 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -12,7 +12,7 @@ export class ButtonComponent implements OnInit, OnChanges {
12 @Input() label = '' 12 @Input() label = ''
13 @Input() className = 'grey-button' 13 @Input() className = 'grey-button'
14 @Input() icon: GlobalIconName = undefined 14 @Input() icon: GlobalIconName = undefined
15 @Input() routerLink: string[] | string 15 @Input() ptRouterLink: string[] | string
16 @Input() title: string = undefined 16 @Input() title: string = undefined
17 @Input() loading = false 17 @Input() loading = false
18 @Input() disabled = false 18 @Input() disabled = false
diff --git a/client/src/app/shared/shared-main/buttons/edit-button.component.ts b/client/src/app/shared/shared-main/buttons/edit-button.component.ts
index 28aacbbff..850be1dec 100644
--- a/client/src/app/shared/shared-main/buttons/edit-button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/edit-button.component.ts
@@ -6,14 +6,14 @@ import { Component, Input, OnInit } from '@angular/core'
6 <my-button 6 <my-button
7 icon="edit" className="grey-button-link" 7 icon="edit" className="grey-button-link"
8 [label]="label" [title]="title" [responsiveLabel]="responsiveLabel" 8 [label]="label" [title]="title" [responsiveLabel]="responsiveLabel"
9 [routerLink]="routerLink" 9 [ptRouterLink]="ptRouterLink"
10 ></my-button> 10 ></my-button>
11 ` 11 `
12}) 12})
13export class EditButtonComponent implements OnInit { 13export class EditButtonComponent implements OnInit {
14 @Input() label: string 14 @Input() label: string
15 @Input() title: string 15 @Input() title: string
16 @Input() routerLink: string[] | string = [] 16 @Input() ptRouterLink: string[] | string = []
17 @Input() responsiveLabel = false 17 @Input() responsiveLabel = false
18 18
19 ngOnInit () { 19 ngOnInit () {
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.html b/client/src/app/shared/shared-video-live/live-stream-information.component.html
index e385b429c..cabae6256 100644
--- a/client/src/app/shared/shared-video-live/live-stream-information.component.html
+++ b/client/src/app/shared/shared-video-live/live-stream-information.component.html
@@ -53,7 +53,7 @@
53 53
54 <my-edit-button 54 <my-edit-button
55 i18n-label label="Update live settings" 55 i18n-label label="Update live settings"
56 [routerLink]="[ '/videos', 'update', video.uuid ]" (click)="dismiss()" 56 [ptRouterLink]="[ '/videos', 'update', video.uuid ]" (click)="dismiss()"
57 ></my-edit-button> 57 ></my-edit-button>
58 </div> 58 </div>
59 </div> 59 </div>
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html
index 5ab5d8921..f7849e5ec 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html
@@ -51,7 +51,7 @@
51 </div> 51 </div>
52 </a> 52 </a>
53 53
54 <my-edit-button *ngIf="owned && touchScreenEditButton" [routerLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button> 54 <my-edit-button *ngIf="owned && touchScreenEditButton" [ptRouterLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button>
55 55
56 <div *ngIf="owned" class="more dropdown-root" ngbDropdown #moreDropdown="ngbDropdown" placement="left auto" 56 <div *ngIf="owned" class="more dropdown-root" ngbDropdown #moreDropdown="ngbDropdown" placement="left auto"
57 (openChange)="onDropdownOpenChange()" autoClose="outside" container="body" 57 (openChange)="onDropdownOpenChange()" autoClose="outside" container="body"