aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
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
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')
-rw-r--r--client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html2
-rw-r--r--client/src/app/+admin/plugins/plugin-search/plugin-search.component.html2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html2
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channels.component.html2
-rw-r--r--client/src/app/+my-library/my-video-imports/my-video-imports.component.html2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html2
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.html2
-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
12 files changed, 14 insertions, 14 deletions
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html
index 374c4d96d..e80855a02 100644
--- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html
+++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html
@@ -9,7 +9,7 @@
9 <my-plugin-card [plugin]="plugin" [version]="plugin.version" [pluginType]="pluginType"> 9 <my-plugin-card [plugin]="plugin" [version]="plugin.version" [pluginType]="pluginType">
10 <div ngProjectAs="buttons"> 10 <div ngProjectAs="buttons">
11 <my-edit-button 11 <my-edit-button
12 *ngIf="!isTheme(plugin)" [routerLink]="getShowRouterLink(plugin)" label="Settings" i18n-label 12 *ngIf="!isTheme(plugin)" [ptRouterLink]="getShowRouterLink(plugin)" label="Settings" i18n-label
13 [responsiveLabel]="true" 13 [responsiveLabel]="true"
14 ></my-edit-button> 14 ></my-edit-button>
15 15
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
index 08430913a..9c45ee590 100644
--- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
+++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
@@ -41,7 +41,7 @@
41 41
42 <div ngProjectAs="buttons"> 42 <div ngProjectAs="buttons">
43 <my-edit-button 43 <my-edit-button
44 *ngIf="plugin.installed === true && !isThemeSearch()" [routerLink]="getShowRouterLink(plugin)" 44 *ngIf="plugin.installed === true && !isThemeSearch()" [ptRouterLink]="getShowRouterLink(plugin)"
45 label="Settings" i18n-label [responsiveLabel]="true" 45 label="Settings" i18n-label [responsiveLabel]="true"
46 ></my-edit-button> 46 ></my-edit-button>
47 47
diff --git a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html
index 2fcfffbf3..d63a402e5 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html
@@ -2,7 +2,7 @@
2 <ng-container *ngIf="!twoFactorEnabled"> 2 <ng-container *ngIf="!twoFactorEnabled">
3 <p i18n>Two factor authentication adds an additional layer of security to your account by requiring a numeric code from another device (most commonly mobile phones) when you log in.</p> 3 <p i18n>Two factor authentication adds an additional layer of security to your account by requiring a numeric code from another device (most commonly mobile phones) when you log in.</p>
4 4
5 <my-button [routerLink]="[ '/my-account/two-factor-auth' ]" className="orange-button-link" i18n>Enable two-factor authentication</my-button> 5 <my-button [ptRouterLink]="[ '/my-account/two-factor-auth' ]" className="orange-button-link" i18n>Enable two-factor authentication</my-button>
6 </ng-container> 6 </ng-container>
7 7
8 <ng-container *ngIf="twoFactorEnabled"> 8 <ng-container *ngIf="twoFactorEnabled">
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
index 0fe061983..154836854 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
@@ -50,7 +50,7 @@
50 </div> 50 </div>
51 51
52 <div class="video-channel-buttons"> 52 <div class="video-channel-buttons">
53 <my-edit-button label [routerLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button> 53 <my-edit-button label [ptRouterLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button>
54 <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button> 54 <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button>
55 </div> 55 </div>
56 56
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
index d25eff24c..34d5bc4b2 100644
--- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
+++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html
@@ -41,7 +41,7 @@
41 <td class="action-cell"> 41 <td class="action-cell">
42 <my-button *ngIf="isVideoImportPending(videoImport)" i18n-label label="Cancel" icon="no" (click)="cancelImport(videoImport)"></my-button> 42 <my-button *ngIf="isVideoImportPending(videoImport)" i18n-label label="Cancel" icon="no" (click)="cancelImport(videoImport)"></my-button>
43 <my-delete-button *ngIf="isVideoImportFailed(videoImport) || isVideoImportCancelled(videoImport) || !videoImport.video" (click)="deleteImport(videoImport)"></my-delete-button> 43 <my-delete-button *ngIf="isVideoImportFailed(videoImport) || isVideoImportCancelled(videoImport) || !videoImport.video" (click)="deleteImport(videoImport)"></my-delete-button>
44 <my-edit-button *ngIf="isVideoImportSuccess(videoImport) && videoImport.video" [routerLink]="getEditVideoUrl(videoImport.video)"></my-edit-button> 44 <my-edit-button *ngIf="isVideoImportSuccess(videoImport) && videoImport.video" [ptRouterLink]="getEditVideoUrl(videoImport.video)"></my-edit-button>
45 </td> 45 </td>
46 46
47 <td> 47 <td>
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
index ebcb0b1fd..5b6b7bf48 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
@@ -25,7 +25,7 @@
25 <div *ngIf="isRegularPlaylist(playlist)" class="video-playlist-buttons"> 25 <div *ngIf="isRegularPlaylist(playlist)" class="video-playlist-buttons">
26 <my-delete-button label (click)="deleteVideoPlaylist(playlist)"></my-delete-button> 26 <my-delete-button label (click)="deleteVideoPlaylist(playlist)"></my-delete-button>
27 27
28 <my-edit-button label [routerLink]="[ 'update', playlist.uuid ]"></my-edit-button> 28 <my-edit-button label [ptRouterLink]="[ 'update', playlist.uuid ]"></my-edit-button>
29 </div> 29 </div>
30 </div> 30 </div>
31</div> 31</div>
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.html b/client/src/app/+my-library/my-videos/my-videos.component.html
index b95287151..120f08d11 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.html
+++ b/client/src/app/+my-library/my-videos/my-videos.component.html
@@ -54,7 +54,7 @@
54 54
55 <ng-template ptTemplate="rowButtons" let-video> 55 <ng-template ptTemplate="rowButtons" let-video>
56 <div class="action-button"> 56 <div class="action-button">
57 <my-edit-button label [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button> 57 <my-edit-button label [ptRouterLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
58 58
59 <my-video-actions-dropdown 59 <my-video-actions-dropdown
60 [video]="video" [displayOptions]="videoDropdownDisplayOptions" [moreActions]="moreVideoActions" 60 [video]="video" [displayOptions]="videoDropdownDisplayOptions" [moreActions]="moreVideoActions"
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"