Add title to ellipsed content

This commit is contained in:
Chocobozzz 2025-01-28 08:56:50 +01:00
parent 322748483f
commit 0320f5b5e4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 14 additions and 5 deletions

View File

@ -145,7 +145,10 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit,
private unlockBodyScroll () {
document.getElementById('content').classList.remove('lock-scroll')
this.viewportScroller.scrollToPosition(this.scrollPosition)
if (this.scrollPosition) {
this.viewportScroller.scrollToPosition(this.scrollPosition)
}
}
private async updatePreviews () {

View File

@ -29,7 +29,7 @@
}
<div class="owner-container" *ngIf="displayOptions.by">
<a class="owner-label ellipsis" [routerLink]="[ '/c', video.byVideoChannel ]">
<a class="owner-label ellipsis" [routerLink]="[ '/c', video.byVideoChannel ]" [title]="displayOwnerAccount() ? authorAccount : authorChannel">
@if (displayOwnerAccount()) {
{{ authorAccount }}
} @else if (displayOwnerVideoChannel()) {

View File

@ -2,7 +2,7 @@
ngbDropdown autoClose="outside" placement="bottom-end auto" container="body"
#dropdown="ngbDropdown"
>
<button class="host button-unstyle ellipsis" ngbDropdownToggle i18n-title title="Get more information" type="button">
<button class="host button-unstyle ellipsis" ngbDropdownToggle [title]="title" type="button">
<svg class="left" width="8" height="19" viewBox="0 0 8 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 19V0L7.45757 8.85586C7.77102 9.22809 7.77102 9.77191 7.45757 10.1441L0 19Z"/>
</svg>

View File

@ -1,5 +1,5 @@
import { CommonModule } from '@angular/common'
import { Component, Input } from '@angular/core'
import { Component, Input, OnChanges } from '@angular/core'
import { RouterLink } from '@angular/router'
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
@ -12,6 +12,12 @@ import { ButtonComponent } from '../shared-main/buttons/button.component'
standalone: true,
imports: [ CommonModule, NgbDropdownModule, GlobalIconComponent, ButtonComponent, RouterLink ]
})
export class ActorHostComponent {
export class ActorHostComponent implements OnChanges {
@Input({ required: true }) host: string
title: string
ngOnChanges () {
this.title = $localize`Get more information on ${this.host}`
}
}