]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix custom default route link
authorChocobozzz <me@florianbigard.com>
Mon, 5 Jun 2023 08:33:35 +0000 (10:33 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 5 Jun 2023 08:33:35 +0000 (10:33 +0200)
client/src/app/app.component.html
client/src/app/app.component.ts

index 5fefffaf49d765d1bbf5a5f5993362c29bad6dc4..8ef22392d6c009aaeff434f9e0c93065f44a51b3 100644 (file)
@@ -10,7 +10,7 @@
         <span class="icon icon-menu"></span>
       </span>
 
-      <a class="peertube-title c-hand" [routerLink]="getDefaultRoute()">
+      <a class="peertube-title c-hand" [routerLink]="getDefaultRoute()" [queryParams]="getDefaultRouteQuery()">
         <span class="icon icon-logo"></span>
         <span class="instance-name">{{ instanceName }}</span>
       </a>
index da3ffef2f7fbceb5f6b45fa9c5b45bf57fbc5315..f6d90cb6488c91a79679ba9e5c019f029c300ac3 100644 (file)
@@ -131,10 +131,18 @@ export class AppComponent implements OnInit, AfterViewInit {
     this.pluginService.initializeCustomModal(this.customModal)
   }
 
+  // ---------------------------------------------------------------------------
+
   getDefaultRoute () {
-    return this.redirectService.getDefaultRoute()
+    return this.redirectService.getDefaultRoute().split('?')[0]
+  }
+
+  getDefaultRouteQuery () {
+    return this.router.parseUrl(this.redirectService.getDefaultRoute()).queryParams
   }
 
+  // ---------------------------------------------------------------------------
+
   getToggleTitle () {
     if (this.menu.isDisplayed()) return $localize`Close the left menu`