1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge branch 'master' into osd-tweak

This commit is contained in:
dkanada 2020-11-21 22:15:49 +09:00 committed by GitHub
commit 36344af64f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
291 changed files with 6833 additions and 6332 deletions

View file

@ -1,10 +1,10 @@
import dom from 'dom';
import layoutManager from 'layoutManager';
import shell from 'shell';
import appRouter from 'appRouter';
import appHost from 'apphost';
import 'css!./emby-button';
import 'webcomponents';
import 'webcomponents.js/webcomponents-lite';
import { removeEventListener, addEventListener } from '../../scripts/dom';
import layoutManager from '../../components/layoutManager';
import shell from '../../scripts/shell';
import { appRouter } from '../../components/appRouter';
import { appHost } from '../../components/apphost';
import './emby-button.css';
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
const EmbyLinkButtonPrototype = Object.create(HTMLAnchorElement.prototype);
@ -41,8 +41,8 @@ EmbyButtonPrototype.createdCallback = function () {
EmbyButtonPrototype.attachedCallback = function () {
if (this.tagName === 'A') {
dom.removeEventListener(this, 'click', onAnchorClick, {});
dom.addEventListener(this, 'click', onAnchorClick, {});
removeEventListener(this, 'click', onAnchorClick, {});
addEventListener(this, 'click', onAnchorClick, {});
if (this.getAttribute('data-autohide') === 'true') {
if (appHost.supports('externallinks')) {
@ -55,7 +55,7 @@ EmbyButtonPrototype.attachedCallback = function () {
};
EmbyButtonPrototype.detachedCallback = function () {
dom.removeEventListener(this, 'click', onAnchorClick, {});
removeEventListener(this, 'click', onAnchorClick, {});
};
EmbyLinkButtonPrototype.createdCallback = EmbyButtonPrototype.createdCallback;

View file

@ -1,6 +1,6 @@
import layoutManager from 'layoutManager';
import 'css!./emby-button';
import 'webcomponents';
import layoutManager from '../../components/layoutManager';
import './emby-button.css';
import 'webcomponents.js/webcomponents-lite';
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);

View file

@ -1,7 +1,7 @@
import browser from 'browser';
import dom from 'dom';
import 'css!./emby-checkbox';
import 'webcomponents';
import browser from '../../scripts/browser';
import dom from '../../scripts/dom';
import './emby-checkbox.css';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */

View file

@ -1,6 +1,6 @@
import 'css!./emby-collapse';
import 'webcomponents';
import 'emby-button';
import './emby-collapse.css';
import 'webcomponents.js/webcomponents-lite';
import '../emby-button/emby-button';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import browser from 'browser';
import dom from 'dom';
import 'css!./emby-input';
import 'webcomponents';
import browser from '../../scripts/browser';
import dom from '../../scripts/dom';
import './emby-input.css';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */

View file

@ -1,21 +1,21 @@
import EmbyProgressRing from 'emby-progressring';
import dom from 'dom';
import serverNotifications from 'serverNotifications';
import events from 'events';
import 'webcomponents';
import EmbyProgressRing from '../emby-progressring/emby-progressring';
import dom from '../../scripts/dom';
import serverNotifications from '../../scripts/serverNotifications';
import { Events } from 'jellyfin-apiclient';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */
function addNotificationEvent(instance, name, handler) {
const localHandler = handler.bind(instance);
events.on(serverNotifications, name, localHandler);
Events.on(serverNotifications, name, localHandler);
instance[name] = localHandler;
}
function removeNotificationEvent(instance, name) {
const handler = instance[name];
if (handler) {
events.off(serverNotifications, name, handler);
Events.off(serverNotifications, name, handler);
instance[name] = null;
}
}

View file

@ -1,15 +1,17 @@
import itemShortcuts from 'itemShortcuts';
import inputManager from 'inputManager';
import playbackManager from 'playbackManager';
import imageLoader from 'imageLoader';
import layoutManager from 'layoutManager';
import browser from 'browser';
import dom from 'dom';
import loading from 'loading';
import focusManager from 'focusManager';
import serverNotifications from 'serverNotifications';
import events from 'events';
import 'webcomponents';
import itemShortcuts from '../../components/shortcuts';
import inputManager from '../../scripts/inputManager';
import { playbackManager } from '../../components/playback/playbackmanager';
import imageLoader from '../../components/images/imageLoader';
import layoutManager from '../../components/layoutManager';
import browser from '../../scripts/browser';
import dom from '../../scripts/dom';
import loading from '../../components/loading/loading';
import focusManager from '../../components/focusManager';
import serverNotifications from '../../scripts/serverNotifications';
import { Events } from 'jellyfin-apiclient';
import 'webcomponents.js/webcomponents-lite';
import ServerConnections from '../../components/ServerConnections';
import Sortable from 'sortablejs';
/* eslint-disable indent */
@ -72,7 +74,7 @@ import 'webcomponents';
}
const self = this;
import('multiSelect').then(({default: MultiSelect}) => {
import('../../components/multiSelect/multiSelect').then(({default: MultiSelect}) => {
self.multiSelect = new MultiSelect({
container: self,
bindOnClick: false
@ -102,7 +104,7 @@ import 'webcomponents';
}
const serverId = el.getAttribute('data-serverid');
const apiClient = window.connectionManager.getApiClient(serverId);
const apiClient = ServerConnections.getApiClient(serverId);
loading.show();
@ -132,23 +134,21 @@ import 'webcomponents';
}
const self = this;
import('sortable').then(({default: Sortable}) => {
self.sortable = new Sortable(self, {
draggable: '.listItem',
handle: '.listViewDragHandle',
self.sortable = new Sortable(self, {
draggable: '.listItem',
handle: '.listViewDragHandle',
// dragging ended
onEnd: function (evt) {
return onDrop(evt, self);
}
});
// dragging ended
onEnd: function (evt) {
return onDrop(evt, self);
}
});
};
function onUserDataChanged(e, apiClient, userData) {
const itemsContainer = this;
import('cardBuilder').then(({default: cardBuilder}) => {
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
cardBuilder.onUserDataChanged(userData, itemsContainer);
});
@ -183,7 +183,7 @@ import 'webcomponents';
// This could be null, not supported by all tv providers
const newTimerId = data.Id;
import('cardBuilder').then(({default: cardBuilder}) => {
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
cardBuilder.onTimerCreated(programId, newTimerId, itemsContainer);
});
}
@ -203,7 +203,7 @@ import 'webcomponents';
return;
}
import('cardBuilder').then(({default: cardBuilder}) => {
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
cardBuilder.onTimerCancelled(data.Id, itemsContainer);
});
}
@ -215,7 +215,7 @@ import 'webcomponents';
return;
}
import('cardBuilder').then(({default: cardBuilder}) => {
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
cardBuilder.onSeriesTimerCancelled(data.Id, itemsContainer);
});
}
@ -270,7 +270,7 @@ import 'webcomponents';
function addNotificationEvent(instance, name, handler, owner) {
const localHandler = handler.bind(instance);
owner = owner || serverNotifications;
events.on(owner, name, localHandler);
Events.on(owner, name, localHandler);
instance['event_' + name] = localHandler;
}
@ -278,7 +278,7 @@ import 'webcomponents';
const handler = instance['event_' + name];
if (handler) {
owner = owner || serverNotifications;
events.off(owner, name, handler);
Events.off(owner, name, handler);
instance['event_' + name] = null;
}
}

View file

@ -1,20 +1,21 @@
import serverNotifications from 'serverNotifications';
import events from 'events';
import globalize from 'globalize';
import EmbyButtonPrototype from 'emby-button';
import serverNotifications from '../../scripts/serverNotifications';
import { Events } from 'jellyfin-apiclient';
import globalize from '../../scripts/globalize';
import EmbyButtonPrototype from '../../elements/emby-button/emby-button';
import ServerConnections from '../../components/ServerConnections';
/* eslint-disable indent */
function addNotificationEvent(instance, name, handler) {
const localHandler = handler.bind(instance);
events.on(serverNotifications, name, localHandler);
Events.on(serverNotifications, name, localHandler);
instance[name] = localHandler;
}
function removeNotificationEvent(instance, name) {
const handler = instance[name];
if (handler) {
events.off(serverNotifications, name, handler);
Events.off(serverNotifications, name, handler);
instance[name] = null;
}
}
@ -23,7 +24,7 @@ import EmbyButtonPrototype from 'emby-button';
const button = this;
const id = button.getAttribute('data-id');
const serverId = button.getAttribute('data-serverid');
const apiClient = window.connectionManager.getApiClient(serverId);
const apiClient = ServerConnections.getApiClient(serverId);
if (!button.classList.contains('playstatebutton-played')) {
apiClient.markPlayed(apiClient.getCurrentUserId(), id, new Date());

View file

@ -1,5 +1,5 @@
import 'css!./emby-progressring';
import 'webcomponents';
import './emby-progressring.css';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */
@ -9,7 +9,7 @@ import 'webcomponents';
this.classList.add('progressring');
const instance = this;
import('text!./emby-progressring.template.html').then(({default: template}) => {
import('./emby-progressring.template.html').then(({default: template}) => {
instance.innerHTML = template;
if (window.MutationObserver) {

View file

@ -1,7 +1,7 @@
import layoutManager from 'layoutManager';
import 'css!./emby-radio';
import 'webcomponents';
import browser from 'browser';
import layoutManager from '../../components/layoutManager';
import browser from '../../scripts/browser';
import 'webcomponents.js/webcomponents-lite';
import './emby-radio.css';
/* eslint-disable indent */

View file

@ -1,20 +1,21 @@
import serverNotifications from 'serverNotifications';
import events from 'events';
import globalize from 'globalize';
import EmbyButtonPrototype from 'emby-button';
import serverNotifications from '../../scripts/serverNotifications';
import { Events } from 'jellyfin-apiclient';
import globalize from '../../scripts/globalize';
import EmbyButtonPrototype from '../emby-button/emby-button';
import ServerConnections from '../../components/ServerConnections';
/* eslint-disable indent */
function addNotificationEvent(instance, name, handler) {
const localHandler = handler.bind(instance);
events.on(serverNotifications, name, localHandler);
Events.on(serverNotifications, name, localHandler);
instance[name] = localHandler;
}
function removeNotificationEvent(instance, name) {
const handler = instance[name];
if (handler) {
events.off(serverNotifications, name, handler);
Events.off(serverNotifications, name, handler);
instance[name] = null;
}
}
@ -27,7 +28,7 @@ import EmbyButtonPrototype from 'emby-button';
const button = this;
const id = button.getAttribute('data-id');
const serverId = button.getAttribute('data-serverid');
const apiClient = window.connectionManager.getApiClient(serverId);
const apiClient = ServerConnections.getApiClient(serverId);
let likes = this.getAttribute('data-likes');
const isFavorite = this.getAttribute('data-isfavorite') === 'true';

View file

@ -1,6 +1,6 @@
import 'css!./emby-scrollbuttons';
import 'webcomponents';
import 'paper-icon-button-light';
import './emby-scrollbuttons.css';
import 'webcomponents.js/webcomponents-lite';
import '../emby-button/paper-icon-button-light';
/* eslint-disable indent */

View file

@ -1,11 +1,11 @@
import scroller from 'scroller';
import dom from 'dom';
import layoutManager from 'layoutManager';
import inputManager from 'inputManager';
import focusManager from 'focusManager';
import browser from 'browser';
import 'webcomponents';
import 'css!./emby-scroller';
import scroller from '../../libraries/scroller';
import dom from '../../scripts/dom';
import layoutManager from '../../components/layoutManager';
import inputManager from '../../scripts/inputManager';
import focusManager from '../../components/focusManager';
import browser from '../../scripts/browser';
import 'webcomponents.js/webcomponents-lite';
import './emby-scroller.css';
/* eslint-disable indent */
@ -156,7 +156,7 @@ import 'css!./emby-scroller';
};
function loadScrollButtons(scroller) {
import('emby-scrollbuttons').then(() => {
import('../emby-scrollbuttons/emby-scrollbuttons').then(() => {
scroller.insertAdjacentHTML('beforebegin', '<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>');
});
}

View file

@ -1,8 +1,8 @@
import layoutManager from 'layoutManager';
import browser from 'browser';
import actionsheet from 'actionsheet';
import 'css!./emby-select';
import 'webcomponents';
import layoutManager from '../../components/layoutManager';
import browser from '../../scripts/browser';
import actionsheet from '../../components/actionSheet/actionSheet';
import './emby-select.css';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */

View file

@ -1,10 +1,10 @@
import browser from 'browser';
import dom from 'dom';
import layoutManager from 'layoutManager';
import keyboardnavigation from 'keyboardnavigation';
import 'css!./emby-slider';
import 'webcomponents';
import 'emby-input';
import browser from '../../scripts/browser';
import dom from '../../scripts/dom';
import layoutManager from '../../components/layoutManager';
import keyboardnavigation from '../../scripts/keyboardNavigation';
import './emby-slider.css';
import 'webcomponents.js/webcomponents-lite';
import '../emby-input/emby-input';
/* eslint-disable indent */

View file

@ -1,13 +1,12 @@
import dom from 'dom';
import scroller from 'scroller';
import browser from 'browser';
import focusManager from 'focusManager';
import 'webcomponents';
import 'css!./emby-tabs';
import 'scrollStyles';
import 'webcomponents.js/webcomponents-lite';
import dom from '../../scripts/dom';
import scroller from '../../libraries/scroller';
import browser from '../../scripts/browser';
import focusManager from '../../components/focusManager';
import './emby-tabs.css';
import '../../assets/css/scrollstyles.css';
/* eslint-disable indent */
const EmbyTabs = Object.create(HTMLDivElement.prototype);
const buttonClass = 'emby-tab-button';
const activeButtonClass = buttonClass + '-active';

View file

@ -1,6 +1,6 @@
import 'css!./emby-textarea';
import 'webcomponents';
import 'emby-input';
import './emby-textarea.css';
import 'webcomponents.js/webcomponents-lite';
import '../emby-input/emby-input';
/* eslint-disable indent */

View file

@ -1,5 +1,5 @@
import 'css!./emby-toggle';
import 'webcomponents';
import './emby-toggle.css';
import 'webcomponents.js/webcomponents-lite';
/* eslint-disable indent */