]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix button router link
authorChocobozzz <me@florianbigard.com>
Fri, 18 Aug 2023 09:09:34 +0000 (11:09 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 18 Aug 2023 09:09:34 +0000 (11:09 +0200)
Using the default one assigns the directive to the host, where we just
want to put it inside the `my-button` component

12 files changed:
client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.html
client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.html
client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
client/src/app/+my-library/my-video-imports/my-video-imports.component.html
client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
client/src/app/+my-library/my-videos/my-videos.component.html
client/src/app/shared/shared-main/buttons/button.component.html
client/src/app/shared/shared-main/buttons/button.component.ts
client/src/app/shared/shared-main/buttons/edit-button.component.ts
client/src/app/shared/shared-video-live/live-stream-information.component.html
client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html

index 374c4d96dbe409ab0950be487de80ed4533c20ab..e80855a023b56126e24001f726a878deab90629e 100644 (file)
@@ -9,7 +9,7 @@
     <my-plugin-card [plugin]="plugin" [version]="plugin.version" [pluginType]="pluginType">
       <div ngProjectAs="buttons">
         <my-edit-button
-          *ngIf="!isTheme(plugin)" [routerLink]="getShowRouterLink(plugin)" label="Settings" i18n-label
+          *ngIf="!isTheme(plugin)" [ptRouterLink]="getShowRouterLink(plugin)" label="Settings" i18n-label
           [responsiveLabel]="true"
         ></my-edit-button>
 
index 08430913a5d6c92ad107333cc2929df3a05b8773..9c45ee5900507462c5ac37ec80a29d1593c5e274 100644 (file)
@@ -41,7 +41,7 @@
 
       <div ngProjectAs="buttons">
         <my-edit-button
-          *ngIf="plugin.installed === true && !isThemeSearch()" [routerLink]="getShowRouterLink(plugin)"
+          *ngIf="plugin.installed === true && !isThemeSearch()" [ptRouterLink]="getShowRouterLink(plugin)"
           label="Settings" i18n-label [responsiveLabel]="true"
         ></my-edit-button>
 
index 2fcfffbf37aa128877c96078aac2069f0442525b..d63a402e53ab3f37f6ebff392a7bdfb902d127a6 100644 (file)
@@ -2,7 +2,7 @@
   <ng-container *ngIf="!twoFactorEnabled">
     <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>
 
-    <my-button [routerLink]="[ '/my-account/two-factor-auth' ]" className="orange-button-link" i18n>Enable two-factor authentication</my-button>
+    <my-button [ptRouterLink]="[ '/my-account/two-factor-auth' ]" className="orange-button-link" i18n>Enable two-factor authentication</my-button>
   </ng-container>
 
   <ng-container *ngIf="twoFactorEnabled">
index 0fe06198310578f43e40a5252ff93f8c1719a02f..154836854014e21082a5d3b91da725c722ef9ec6 100644 (file)
@@ -50,7 +50,7 @@
       </div>
 
       <div class="video-channel-buttons">
-        <my-edit-button label [routerLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button>
+        <my-edit-button label [ptRouterLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button>
         <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button>
       </div>
 
index d25eff24ce7470bd06a6c23b69ac37527e227468..34d5bc4b23192347f8b0366109cc392ba5d8b5cf 100644 (file)
@@ -41,7 +41,7 @@
       <td class="action-cell">
         <my-button *ngIf="isVideoImportPending(videoImport)" i18n-label label="Cancel" icon="no" (click)="cancelImport(videoImport)"></my-button>
         <my-delete-button *ngIf="isVideoImportFailed(videoImport) || isVideoImportCancelled(videoImport) || !videoImport.video" (click)="deleteImport(videoImport)"></my-delete-button>
-        <my-edit-button *ngIf="isVideoImportSuccess(videoImport) && videoImport.video" [routerLink]="getEditVideoUrl(videoImport.video)"></my-edit-button>
+        <my-edit-button *ngIf="isVideoImportSuccess(videoImport) && videoImport.video" [ptRouterLink]="getEditVideoUrl(videoImport.video)"></my-edit-button>
       </td>
 
       <td>
index ebcb0b1fd87d8cac94066bae72b3c5dbbe88c22a..5b6b7bf48f1625d1ae46a32026e70968c030dd78 100644 (file)
@@ -25,7 +25,7 @@
     <div *ngIf="isRegularPlaylist(playlist)" class="video-playlist-buttons">
       <my-delete-button label (click)="deleteVideoPlaylist(playlist)"></my-delete-button>
 
-      <my-edit-button label [routerLink]="[ 'update', playlist.uuid ]"></my-edit-button>
+      <my-edit-button label [ptRouterLink]="[ 'update', playlist.uuid ]"></my-edit-button>
     </div>
   </div>
 </div>
index b95287151ccae34443395ec564bbc2dc71f290d0..120f08d1116c9e29f953a5242f6f2e7fd9629b09 100644 (file)
@@ -54,7 +54,7 @@
 
   <ng-template ptTemplate="rowButtons" let-video>
     <div class="action-button">
-      <my-edit-button label [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
+      <my-edit-button label [ptRouterLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
 
       <my-video-actions-dropdown
         [video]="video" [displayOptions]="videoDropdownDisplayOptions" [moreActions]="moreVideoActions"
index 20c982744a57fbf4ca86cc3887f0218282b5e896..d87e358761aa1ae3b650e1f071cf35eac8e0c8ab 100644 (file)
@@ -1,8 +1,8 @@
-<button *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title">
+<button *ngIf="!ptRouterLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title">
   <ng-container *ngTemplateOutlet="content"></ng-container>
 </button>
 
-<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink">
+<a *ngIf="ptRouterLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="ptRouterLink">
   <ng-container *ngTemplateOutlet="content"></ng-container>
 </a>
 
index e3a83089172dd4f9a3ca9f59a28e31fb84363d5c..50a3d99ef2bbe1f2010d335e58a56a1e7aff505c 100644 (file)
@@ -12,7 +12,7 @@ export class ButtonComponent implements OnInit, OnChanges {
   @Input() label = ''
   @Input() className = 'grey-button'
   @Input() icon: GlobalIconName = undefined
-  @Input() routerLink: string[] | string
+  @Input() ptRouterLink: string[] | string
   @Input() title: string = undefined
   @Input() loading = false
   @Input() disabled = false
index 28aacbbff01f929bd12146772d15059c7cf4089a..850be1decca340ccc8413a83b35532ce181f25ca 100644 (file)
@@ -6,14 +6,14 @@ import { Component, Input, OnInit } from '@angular/core'
     <my-button
       icon="edit" className="grey-button-link"
       [label]="label" [title]="title" [responsiveLabel]="responsiveLabel"
-      [routerLink]="routerLink"
+      [ptRouterLink]="ptRouterLink"
     ></my-button>
   `
 })
 export class EditButtonComponent implements OnInit {
   @Input() label: string
   @Input() title: string
-  @Input() routerLink: string[] | string = []
+  @Input() ptRouterLink: string[] | string = []
   @Input() responsiveLabel = false
 
   ngOnInit () {
index e385b429cc837cae75826cd9c11f6dd52aa39a78..cabae6256a2ea942d1db7d52e8b810bc3127b022 100644 (file)
@@ -53,7 +53,7 @@
 
       <my-edit-button
         i18n-label label="Update live settings"
-        [routerLink]="[ '/videos', 'update', video.uuid ]" (click)="dismiss()"
+        [ptRouterLink]="[ '/videos', 'update', video.uuid ]" (click)="dismiss()"
       ></my-edit-button>
     </div>
   </div>
index 5ab5d892191a5a709a25ad5c9d1fbd11df14c38a..f7849e5ecc02ac951f4819895d79d018bd6aae74 100644 (file)
@@ -51,7 +51,7 @@
     </div>
   </a>
 
-  <my-edit-button *ngIf="owned && touchScreenEditButton" [routerLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button>
+  <my-edit-button *ngIf="owned && touchScreenEditButton" [ptRouterLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button>
 
   <div *ngIf="owned" class="more dropdown-root" ngbDropdown #moreDropdown="ngbDropdown" placement="left auto"
        (openChange)="onDropdownOpenChange()" autoClose="outside" container="body"