mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix merge conflict
This commit is contained in:
parent
ff4c684e54
commit
c504f5005d
11 changed files with 151 additions and 22 deletions
BIN
dashboard-ui/themes/holiday/bg.jpg
Normal file
BIN
dashboard-ui/themes/holiday/bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 488 KiB |
28
dashboard-ui/themes/holiday/style.css
Normal file
28
dashboard-ui/themes/holiday/style.css
Normal file
|
@ -0,0 +1,28 @@
|
|||
.ui-body-b h1, .ui-body-b h2 {
|
||||
color: #cc3333;
|
||||
}
|
||||
|
||||
.viewMenuBar, .holidayInfoButton {
|
||||
color: #cc3333 !important;
|
||||
}
|
||||
|
||||
.barsMenuButton {
|
||||
color: #cc3333 !important;
|
||||
}
|
||||
|
||||
.libraryViewNav .ui-btn-active {
|
||||
border-bottom-color: #cc3333 !important;
|
||||
color: #cc3333 !important;
|
||||
}
|
||||
|
||||
paper-button[raised].more {
|
||||
background: #cc3333;
|
||||
}
|
||||
|
||||
.channelTimeslotHeader, .timeslotHeader {
|
||||
background: #cc3333 !important;
|
||||
}
|
||||
|
||||
.channelTimeslotHeader {
|
||||
border-right-color: #cc3333 !important;
|
||||
}
|
91
dashboard-ui/themes/holiday/theme.js
Normal file
91
dashboard-ui/themes/holiday/theme.js
Normal file
|
@ -0,0 +1,91 @@
|
|||
(function () {
|
||||
|
||||
var lastSound = 0;
|
||||
var iconCreated;
|
||||
var destroyed;
|
||||
var currentSound;
|
||||
|
||||
function onPageShow() {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (!destroyed) {
|
||||
|
||||
require(['css!themes/holiday/style.css']);
|
||||
|
||||
if (!browserInfo.mobile) {
|
||||
|
||||
if (!page.classList.contains('itemDetailPage')) {
|
||||
Backdrops.setBackdropUrl(page, 'themes/holiday/bg.jpg');
|
||||
}
|
||||
|
||||
if (lastSound == 0) {
|
||||
playSound('http://github.com/MediaBrowser/Emby.Resources/raw/master/themes/halloween/monsterparadefade.mp3', .1);
|
||||
} else if ((new Date().getTime() - lastSound) > 30000) {
|
||||
playSound('http://github.com/MediaBrowser/Emby.Resources/raw/master/themes/halloween/howl.wav');
|
||||
}
|
||||
}
|
||||
|
||||
addIcon();
|
||||
}
|
||||
}
|
||||
|
||||
function onIconClick() {
|
||||
|
||||
// todo: switch this to action sheet
|
||||
|
||||
//require(['dialog'], function (dialog) {
|
||||
// dialog({
|
||||
|
||||
// title: "Happy Halloween",
|
||||
// message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?",
|
||||
// callback: function (result) {
|
||||
|
||||
// if (result == 1) {
|
||||
// destroyTheme();
|
||||
// }
|
||||
// },
|
||||
|
||||
// buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')]
|
||||
// });
|
||||
//});
|
||||
}
|
||||
|
||||
function addIcon() {
|
||||
|
||||
if (iconCreated) {
|
||||
return;
|
||||
}
|
||||
|
||||
iconCreated = true;
|
||||
|
||||
var elem = document.createElement('paper-icon-button');
|
||||
elem.icon = 'info';
|
||||
elem.classList.add('holidayInfoButton');
|
||||
elem.addEventListener('click', onIconClick);
|
||||
|
||||
var viewMenuSecondary = document.querySelector('.viewMenuSecondary');
|
||||
|
||||
if (viewMenuSecondary) {
|
||||
viewMenuSecondary.insertBefore(elem, viewMenuSecondary.childNodes[0]);
|
||||
}
|
||||
}
|
||||
|
||||
pageClassOn('pageshow', "libraryPage", onPageShow);
|
||||
|
||||
function playSound(path, volume) {
|
||||
|
||||
require(['howler'], function (howler) {
|
||||
|
||||
var sound = new Howl({
|
||||
urls: [path],
|
||||
volume: volume || .3
|
||||
});
|
||||
|
||||
sound.play();
|
||||
currentSound = sound;
|
||||
lastSound = new Date().getTime();
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue