Fix custom default route link

pull/5840/head
Chocobozzz 2023-06-05 10:33:35 +02:00
parent ae51278920
commit 25d7cc3cb6
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 10 additions and 2 deletions

View 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>

View 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`