mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 21:47:09 +03:00
Fix my-feed popover title state
This commit is contained in:
parent
b455a59bfd
commit
f027bdb4b0
@ -1,8 +1,8 @@
|
||||
<button
|
||||
*ngIf="syndicationItems && syndicationItems.length !== 0"
|
||||
#popover="ngbPopover"
|
||||
[ngbPopover]="feedsList" [autoClose]="true" placement="bottom left auto"
|
||||
class="feed border-0 p-0"
|
||||
title="Open syndication dropdown" i18n-title
|
||||
class="feed border-0 p-0" [title]="getTitle()"
|
||||
>
|
||||
<my-global-icon iconName="syndication"></my-global-icon>
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { Syndication } from './syndication.model'
|
||||
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
|
||||
import { NgFor, NgIf } from '@angular/common'
|
||||
import { Component, Input, ViewChild } from '@angular/core'
|
||||
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { NgIf, NgFor } from '@angular/common'
|
||||
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
|
||||
import { Syndication } from './syndication.model'
|
||||
|
||||
@Component({
|
||||
selector: 'my-feed',
|
||||
@ -12,5 +12,15 @@ import { NgIf, NgFor } from '@angular/common'
|
||||
imports: [ NgIf, NgbPopover, GlobalIconComponent, NgFor ]
|
||||
})
|
||||
export class FeedComponent {
|
||||
@ViewChild('popover') popover: NgbPopover
|
||||
|
||||
@Input() syndicationItems: Syndication[]
|
||||
|
||||
getTitle () {
|
||||
if (this.popover?.isOpen()) {
|
||||
return $localize`Close syndication dropdown`
|
||||
}
|
||||
|
||||
return $localize`Open syndication dropdown`
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user