mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4731 from sttatusx/fix-major-code-smells
Fix major code smells
This commit is contained in:
commit
71ac2c0843
3 changed files with 1 additions and 8 deletions
|
@ -2,12 +2,6 @@
|
||||||
<button is="paper-icon-button-light" id="btnBookplayerToc" class="autoSize bookplayerButton hide-mouse-idle-tv" tabindex="-1">
|
<button is="paper-icon-button-light" id="btnBookplayerToc" class="autoSize bookplayerButton hide-mouse-idle-tv" tabindex="-1">
|
||||||
<span class="material-icons bookplayerButtonIcon toc" aria-hidden="true"></span>
|
<span class="material-icons bookplayerButtonIcon toc" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button is="paper-icon-button-light" id="btnBookplayerPrev" class="autoSize bookplayerButton pageButton hide-mouse-idle-tv" tabindex="-1">
|
|
||||||
<span class="material-icons bookplayerButtonIcon navigate_before" aria-hidden="true"></span> ${Previous}
|
|
||||||
</button>
|
|
||||||
<button is="paper-icon-button-light" id="btnBookplayerNext" class="autoSize bookplayerButton pageButton hide-mouse-idle-tv" tabindex="-1">
|
|
||||||
${Next} <span class="material-icons bookplayerButtonIcon navigate_next" aria-hidden="true"></span>
|
|
||||||
</button> -->
|
|
||||||
<button is="paper-icon-button-light" id="btnBookplayerExit" class="autoSize bookplayerButton hide-mouse-idle-tv" tabindex="-1">
|
<button is="paper-icon-button-light" id="btnBookplayerExit" class="autoSize bookplayerButton hide-mouse-idle-tv" tabindex="-1">
|
||||||
<span class="material-icons bookplayerButtonIcon close" aria-hidden="true"></span>
|
<span class="material-icons bookplayerButtonIcon close" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -26,7 +26,7 @@ export function isEnabled() {
|
||||||
const playerId = localStorage.getItem('autocastPlayerId');
|
const playerId = localStorage.getItem('autocastPlayerId');
|
||||||
const currentPlayerInfo = playbackManager.getPlayerInfo();
|
const currentPlayerInfo = playbackManager.getPlayerInfo();
|
||||||
|
|
||||||
return (currentPlayerInfo && playerId && currentPlayerInfo.id === playerId);
|
return playerId && currentPlayerInfo?.id === playerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOpen() {
|
function onOpen() {
|
||||||
|
|
|
@ -230,7 +230,6 @@ export function getDisplayTime(date) {
|
||||||
const timeLower = time.toLowerCase();
|
const timeLower = time.toLowerCase();
|
||||||
|
|
||||||
if (timeLower.indexOf('am') !== -1 || timeLower.indexOf('pm') !== -1) {
|
if (timeLower.indexOf('am') !== -1 || timeLower.indexOf('pm') !== -1) {
|
||||||
time = timeLower;
|
|
||||||
let hour = date.getHours() % 12;
|
let hour = date.getHours() % 12;
|
||||||
const suffix = date.getHours() > 11 ? 'pm' : 'am';
|
const suffix = date.getHours() > 11 ? 'pm' : 'am';
|
||||||
if (!hour) {
|
if (!hour) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue