Fix small UI bugs

pull/3681/head
Chocobozzz 2021-02-02 10:37:52 +01:00
parent 657bba2b29
commit 2666fd7c75
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 17 additions and 8 deletions

View File

@ -12,6 +12,7 @@ import {
Notifier, Notifier,
PeerTubeSocket, PeerTubeSocket,
RestExtractor, RestExtractor,
ScreenService,
ServerService, ServerService,
UserService UserService
} from '@app/core' } from '@app/core'
@ -126,14 +127,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
private hotkeysService: HotkeysService, private hotkeysService: HotkeysService,
private hooks: HooksService, private hooks: HooksService,
private peertubeSocket: PeerTubeSocket, private peertubeSocket: PeerTubeSocket,
private screenService: ScreenService,
private location: PlatformLocation, private location: PlatformLocation,
@Inject(LOCALE_ID) private localeId: string @Inject(LOCALE_ID) private localeId: string
) { ) { }
this.tooltipLike = $localize`Like this video`
this.tooltipDislike = $localize`Dislike this video`
this.tooltipSupport = $localize`Support options for this video`
this.tooltipSaveToPlaylist = $localize`Save to playlist`
}
get user () { get user () {
return this.authService.getUser() return this.authService.getUser()
@ -144,6 +141,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
} }
async ngOnInit () { async ngOnInit () {
// Hide the tooltips for unlogged users in mobile view, this adds confusion with the popover
if (this.user || !this.screenService.isInMobileView()) {
this.tooltipLike = $localize`Like this video`
this.tooltipDislike = $localize`Dislike this video`
this.tooltipSupport = $localize`Support options for this video`
this.tooltipSaveToPlaylist = $localize`Save to playlist`
}
PeertubePlayerManager.initState() PeertubePlayerManager.initState()
this.serverConfig = this.serverService.getTmpConfig() this.serverConfig = this.serverService.getTmpConfig()

View File

@ -1,8 +1,8 @@
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" [(ngModel)]="data.model" (ngModelChange)="setSort()"> <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" [(ngModel)]="data.model" (ngModelChange)="setSort()">
<ng-container *ngFor="let button of buttons"> <ng-container *ngFor="let button of buttons">
<label *ngIf="!button.hidden" ngbButtonLabel class="btn-light" placement="bottom" [ngbTooltip]="button.tooltip" container="body"> <label *ngIf="!button.hidden" ngbButtonLabel class="btn-light" placement="bottom right-bottom left-bottom" [ngbTooltip]="button.tooltip" container="body">
<my-global-icon [iconName]="button.iconName"></my-global-icon> <my-global-icon [iconName]="button.iconName"></my-global-icon>
<input ngbButton type="radio" [value]="button.value"> {{ button.label }} <input ngbButton type="radio" [value]="button.value"> {{ button.label }}
</label> </label>
</ng-container> </ng-container>
</div> </div>

View File

@ -36,6 +36,10 @@ my-input-toggle-hidden {
.filters { .filters {
margin-top: 30px; margin-top: 30px;
.advanced-filters.show {
overflow: visible !important;
}
.advanced-filters-button { .advanced-filters-button {
display: flex; display: flex;
justify-content: center; justify-content: center;