ActivityPub-federated video streaming platform using P2P directly in your web browser
Close dropdown on button click
Chocobozzz410d7946ae40
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.tsindex 904c88790b..7e7984185d 100644--- a/client/src/app/header/search-typeahead.component.ts+++ b/client/src/app/header/search-typeahead.component.ts@@ -76,8 +76,6 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes}canSearchAnyURI () {- if (!this.serverConfig) return false-return this.authService.isLoggedIn()? this.serverConfig.search.remoteUri.users: this.serverConfig.search.remoteUri.anonymousdiff --git a/client/src/app/shared/standalone-actor/actor-host.component.html b/client/src/app/shared/standalone-actor/actor-host.component.htmlindex 54b9597f6f..5d1affd0f0 100644--- a/client/src/app/shared/standalone-actor/actor-host.component.html+++ b/client/src/app/shared/standalone-actor/actor-host.component.html@@ -21,8 +21,8 @@This video comes from <a [href]="'https://' + host()" target="_blank" rel="noopener noreferrer">{{ host() }} <my-global-icon iconName="external-link"></my-global-icon></a> platform, to which we have subscribed.</div>- <a i18n class="mt-3 mb-3 d-block peertube-button-link secondary-button" routerLink="/about/follows">Show all our subscriptions</a>+ <a (click)="dropdown.close()" i18n class="mt-3 mb-3 d-block peertube-button-link secondary-button" routerLink="/about/follows">Show all our subscriptions</a>- <my-button i18n class="d-block" theme="primary" ptRouterLink="/search" [ptQueryParams]="{ 'host': host() }">More {{ host() }} content</my-button>+ <my-button (click)="dropdown.close()" i18n class="d-block" theme="primary" ptRouterLink="/search" [ptQueryParams]="{ 'host': host(), 'searchTarget': searchTarget }">More {{ host() }} content</my-button></div></div>diff --git a/client/src/app/shared/standalone-actor/actor-host.component.scss b/client/src/app/shared/standalone-actor/actor-host.component.scssindex a89f72437a..b1eb82b584 100644--- a/client/src/app/shared/standalone-actor/actor-host.component.scss+++ b/client/src/app/shared/standalone-actor/actor-host.component.scss@@ -4,7 +4,7 @@.content {background-color: pvar(--bg-secondary-500);border-radius: 14px;- max-width: 350px;+ max-width: 400px;border: 0;@include padding(1.5rem);diff --git a/client/src/app/shared/standalone-actor/actor-host.component.ts b/client/src/app/shared/standalone-actor/actor-host.component.tsindex 7afab70f56..6900d07c54 100644--- a/client/src/app/shared/standalone-actor/actor-host.component.ts+++ b/client/src/app/shared/standalone-actor/actor-host.component.ts@@ -1,7 +1,9 @@import { CommonModule } from '@angular/common'-import { Component, OnChanges, input } from '@angular/core'+import { Component, OnChanges, inject, input, viewChild } from '@angular/core'import { RouterLink } from '@angular/router'+import { AuthService, ServerService } from '@app/core'import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'+import { SearchTargetType } from '@peertube/peertube-models'import { GlobalIconComponent } from '../shared-icons/global-icon.component'import { ButtonComponent } from '../shared-main/buttons/button.component'@@ -12,11 +14,27 @@ import { ButtonComponent } from '../shared-main/buttons/button.component'imports: [ CommonModule, NgbDropdownModule, GlobalIconComponent, ButtonComponent, RouterLink ]})export class ActorHostComponent implements OnChanges {+ readonly auth = inject(AuthService)+ readonly server = inject(ServerService)++ readonly dropdown = viewChild('dropdown')+readonly host = input.required<string>()title: string+ searchTarget: SearchTargetTypengOnChanges () {this.title = $localize`Get more information on ${this.host()}`++ const config = this.server.getHTMLConfig()++ const useSearchIndex = this.auth.isLoggedIn()+ ? config.search.remoteUri.users+ : config.search.remoteUri.anonymous++ this.searchTarget = useSearchIndex+ ? 'search-index'+ : 'local'}}