mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Changing tooltip toogle value.
This commit is contained in:
parent
312ab6b80b
commit
725c6c4b88
@ -1,8 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Event, Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
|
||||
//import * as $ from "jquery";
|
||||
//import "bootstrap";
|
||||
import * as $ from "jquery";
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
@ -23,11 +23,6 @@ export class BrowseComponent implements OnInit
|
||||
this.shows = this.route.snapshot.data.shows;
|
||||
}
|
||||
|
||||
ngAfterViewInit()
|
||||
{
|
||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
||||
}
|
||||
|
||||
getThumb(slug: string)
|
||||
{
|
||||
return this.sanitizer.bypassSecurityTrustStyle("url(/poster/" + slug + ")");
|
||||
|
@ -38,7 +38,7 @@
|
||||
<a *ngIf="this.item.previousEpisode" mat-icon-button matTooltipPosition="above" matTooltip="Previous" routerLink="/watch/{{this.item.previousEpisode}}" href="/watch/{{this.item.previousEpisode}}" queryParamsHandling="merge">
|
||||
<mat-icon>skip_previous</mat-icon>
|
||||
</a>
|
||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Play" id="play" (click)="tooglePlayback()">
|
||||
<button mat-icon-button matTooltipPosition="above" [matTooltip]="playTooltip" id="play" (click)="tooglePlayback()">
|
||||
<mat-icon>{{this.playIcon}}</mat-icon>
|
||||
</button>
|
||||
<a mat-icon-button id="nextBtn" *ngIf="this.item.nextEpisode" routerLink="/watch/{{this.item.nextEpisode.link}}" href="/watch/{{this.item.nextEpisode.link}}" queryParamsHandling="merge">
|
||||
@ -77,7 +77,7 @@
|
||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Settings">
|
||||
<mat-icon>settings</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Fullscreen" id="fullscreen" (click)="fullscreen()">
|
||||
<button mat-icon-button matTooltipPosition="above" [matTooltip]="fullscreenTooltip" id="fullscreen" (click)="fullscreen()">
|
||||
<mat-icon>{{fullscreenIcon}}</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -34,6 +34,9 @@ export class PlayerComponent implements OnInit
|
||||
volumeIcon: string = "volume_up"; //Icon used by the volume btn.
|
||||
fullscreenIcon: string = "fullscreen"; //Icon used by the fullscreen btn.
|
||||
|
||||
playTooltip: string = "Pause"; //Text used in the play tooltip
|
||||
fullscreenTooltip: string = "Fullscreen"; //Text used in the fullscreen tooltip
|
||||
|
||||
private player: HTMLVideoElement;
|
||||
private thumb: HTMLElement;
|
||||
private progress: HTMLElement;
|
||||
@ -83,7 +86,7 @@ export class PlayerComponent implements OnInit
|
||||
this.player.onpause = () =>
|
||||
{
|
||||
this.playIcon = "play_arrow"
|
||||
$("#play").attr("data-original-title", "Play");
|
||||
this.playTooltip = "Play";
|
||||
}
|
||||
|
||||
this.player.ontimeupdate = () =>
|
||||
@ -194,12 +197,12 @@ export class PlayerComponent implements OnInit
|
||||
if (document.fullscreenElement != null)
|
||||
{
|
||||
this.fullscreenIcon = "fullscreen_exit";
|
||||
$("#fullscreen").attr("data-original-title", "Exit fullscreen");
|
||||
this.fullscreenTooltip = "Exit fullscreen";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fullscreenIcon = "fullscreen";
|
||||
$("#fullscreen").attr("data-original-title", "Fullscreen");
|
||||
this.fullscreenTooltip = "Fullscreen";
|
||||
}
|
||||
});
|
||||
|
||||
@ -271,8 +274,6 @@ export class PlayerComponent implements OnInit
|
||||
}
|
||||
});
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
@ -328,7 +329,6 @@ export class PlayerComponent implements OnInit
|
||||
|
||||
$(document).unbind();
|
||||
$(window).unbind();
|
||||
$('[data-toggle="tooltip"]').hide();
|
||||
}
|
||||
|
||||
tooglePlayback()
|
||||
@ -352,7 +352,7 @@ export class PlayerComponent implements OnInit
|
||||
initPlayBtn()
|
||||
{
|
||||
this.playIcon = "pause";
|
||||
$("#play").attr("data-original-title", "Pause");
|
||||
this.playTooltip = "Pause";
|
||||
}
|
||||
|
||||
fullscreen()
|
||||
|
@ -46,11 +46,6 @@ export class ShowDetailsComponent implements OnInit
|
||||
this.getEpisodes();
|
||||
}
|
||||
|
||||
ngAfterViewInit()
|
||||
{
|
||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
window.removeEventListener("scroll", this.scroll, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user