mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Address more feedback
This commit is contained in:
parent
5799a877a9
commit
b7d2561dae
12 changed files with 20 additions and 26 deletions
|
@ -59,7 +59,7 @@ import 'formDialogStyle';
|
||||||
|
|
||||||
export function show(options) {
|
export function show(options) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
import('text!./components/accessSchedule/accessSchedule.template.html').then(({default: template}) => {
|
import('text!./accessSchedule.template.html').then(({default: template}) => {
|
||||||
const dlg = dialogHelper.createDialog({
|
const dlg = dialogHelper.createDialog({
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
size: 'small'
|
size: 'small'
|
||||||
|
|
|
@ -231,9 +231,8 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function addElementToList(source, sortCallback) {
|
function addElementToList(source, sortCallback) {
|
||||||
require(['prompt'], function (prompt) {
|
import('prompt').then(({default: prompt}) => {
|
||||||
|
prompt({
|
||||||
prompt.default({
|
|
||||||
label: 'Value:'
|
label: 'Value:'
|
||||||
}).then(function (text) {
|
}).then(function (text) {
|
||||||
const list = dom.parentWithClass(source, 'editableListviewContainer').querySelector('.paperList');
|
const list = dom.parentWithClass(source, 'editableListviewContainer').querySelector('.paperList');
|
||||||
|
@ -1076,7 +1075,7 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
import('scrollHelper').then(({default: scrollHelper}) => {
|
||||||
const fn = on ? 'on' : 'off';
|
const fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
@ -1085,8 +1084,7 @@ import 'flexStyles';
|
||||||
function show(itemId, serverId, resolve, reject) {
|
function show(itemId, serverId, resolve, reject) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
require(['text!./metadataEditor.template.html'], function (template) {
|
import('text!./metadataEditor.template.html').then(({default: template}) => {
|
||||||
|
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
|
@ -1142,8 +1140,7 @@ import 'flexStyles';
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
require(['text!./metadataEditor.template.html'], function (template) {
|
import('text!./metadataEditor.template.html').then(({default: template}) => {
|
||||||
|
|
||||||
elem.innerHTML = globalize.translateHtml(template, 'core');
|
elem.innerHTML = globalize.translateHtml(template, 'core');
|
||||||
|
|
||||||
elem.querySelector('.formDialogFooter').classList.remove('formDialogFooter');
|
elem.querySelector('.formDialogFooter').classList.remove('formDialogFooter');
|
||||||
|
|
|
@ -262,7 +262,7 @@ import 'css!./multiSelect';
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 'addtocollection':
|
case 'addtocollection':
|
||||||
import('collectionEditor').then(({default: collectionEditor}) => {
|
import('collectionEditor').then(({default: collectionEditor}) => {
|
||||||
new collectionEditor.showEditor({
|
new collectionEditor({
|
||||||
items: items,
|
items: items,
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
@ -272,7 +272,7 @@ import 'css!./multiSelect';
|
||||||
break;
|
break;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||||
new playlistEditor.showEditor({
|
new playlistEditor({
|
||||||
items: items,
|
items: items,
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
|
|
@ -256,7 +256,7 @@ import 'listViewStyle';
|
||||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||||
let currentType;
|
let currentType;
|
||||||
|
|
||||||
for (const profile of profiles) {
|
for (const [index, profile] of profiles.entries()) {
|
||||||
|
|
||||||
if (profile.Type !== currentType) {
|
if (profile.Type !== currentType) {
|
||||||
html += '<li data-role="list-divider">' + profile.Type + '</li>';
|
html += '<li data-role="list-divider">' + profile.Type + '</li>';
|
||||||
|
@ -264,7 +264,7 @@ import 'listViewStyle';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
html += '<a is="emby-linkbutton" href="#" class="lnkEditSubProfile" data-profileindex="' + i + '">';
|
html += '<a is="emby-linkbutton" href="#" class="lnkEditSubProfile" data-profileindex="' + index + '">';
|
||||||
html += '<p>' + globalize.translate('ValueContainer', profile.Container || allText) + '</p>';
|
html += '<p>' + globalize.translate('ValueContainer', profile.Container || allText) + '</p>';
|
||||||
|
|
||||||
if ('Video' == profile.Type) {
|
if ('Video' == profile.Type) {
|
||||||
|
@ -277,7 +277,7 @@ import 'listViewStyle';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
html += '<button type="button" is="paper-icon-button-light" class="btnDeleteProfile listItemButton" data-profileindex="' + i + '"><span class="material-icons delete"></span></button>';
|
html += '<button type="button" is="paper-icon-button-light" class="btnDeleteProfile listItemButton" data-profileindex="' + index + '"><span class="material-icons delete"></span></button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import globalize from 'globalize';
|
||||||
|
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
if (!activityLog) {
|
if (!activityLog) {
|
||||||
activityLog = new ActivityLog.default({
|
activityLog = new ActivityLog({
|
||||||
serverId: ApiClient.serverId(),
|
serverId: ApiClient.serverId(),
|
||||||
element: view.querySelector('.activityItems')
|
element: view.querySelector('.activityItems')
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,6 @@ import globalize from 'globalize';
|
||||||
ApiClient.getJSON(ApiClient.getUrl('Channels', {
|
ApiClient.getJSON(ApiClient.getUrl('Channels', {
|
||||||
SupportsMediaDeletion: true
|
SupportsMediaDeletion: true
|
||||||
})).then(function (channelsResult) {
|
})).then(function (channelsResult) {
|
||||||
let folder;
|
|
||||||
let isChecked;
|
let isChecked;
|
||||||
let checkedAttribute;
|
let checkedAttribute;
|
||||||
let html = '';
|
let html = '';
|
||||||
|
@ -20,7 +19,7 @@ import globalize from 'globalize';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const folder of channelsResult) {
|
for (const folder of channelsResult.Items) {
|
||||||
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
||||||
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
||||||
|
|
|
@ -5,7 +5,7 @@ define(['loading', 'scripts/editorsidebar'], function (loading) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
if (itemId) {
|
if (itemId) {
|
||||||
require(['metadataEditor'], function (metadataEditor) {
|
require(['metadataEditor'], function ({default: metadataEditor}) {
|
||||||
metadataEditor.embed(context.querySelector('.editPageInnerContent'), itemId, ApiClient.serverInfo().Id);
|
metadataEditor.embed(context.querySelector('.editPageInnerContent'), itemId, ApiClient.serverInfo().Id);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -803,7 +803,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
bindAll(view.querySelectorAll('.btnShuffle'), 'click', shuffle);
|
bindAll(view.querySelectorAll('.btnShuffle'), 'click', shuffle);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.alphaNumericShortcuts = new AlphaNumericShortcuts.default({
|
self.alphaNumericShortcuts = new AlphaNumericShortcuts.default({
|
||||||
itemsContainer: self.itemsContainer
|
itemsContainer: self.itemsContainer
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -817,7 +817,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
var alphaNumericShortcuts = self.alphaNumericShortcuts;
|
var alphaNumericShortcuts = self.alphaNumericShortcuts;
|
||||||
|
|
||||||
if (alphaNumericShortcuts) {
|
if (alphaNumericShortcuts) {
|
||||||
alphaNumericShortcuts.default.destroy();
|
alphaNumericShortcuts.destroy();
|
||||||
self.alphaNumericShortcuts = null;
|
self.alphaNumericShortcuts = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,8 +5,6 @@ import datetime from 'datetime';
|
||||||
import itemHelper from 'itemHelper';
|
import itemHelper from 'itemHelper';
|
||||||
import mediaInfo from 'mediaInfo';
|
import mediaInfo from 'mediaInfo';
|
||||||
import focusManager from 'focusManager';
|
import focusManager from 'focusManager';
|
||||||
import imageLoader from 'imageLoader';
|
|
||||||
import scrollHelper from 'scrollHelper';
|
|
||||||
import events from 'events';
|
import events from 'events';
|
||||||
import connectionManager from 'connectionManager';
|
import connectionManager from 'connectionManager';
|
||||||
import browser from 'browser';
|
import browser from 'browser';
|
||||||
|
@ -1006,7 +1004,7 @@ import 'css!assets/css/videoosd';
|
||||||
if (statsOverlay) {
|
if (statsOverlay) {
|
||||||
statsOverlay.toggle();
|
statsOverlay.toggle();
|
||||||
} else {
|
} else {
|
||||||
statsOverlay = new PlayerStats.default({
|
statsOverlay = new PlayerStats({
|
||||||
player: player
|
player: player
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import 'listViewStyle';
|
||||||
if (homescreenSettingsInstance) {
|
if (homescreenSettingsInstance) {
|
||||||
homescreenSettingsInstance.loadData();
|
homescreenSettingsInstance.loadData();
|
||||||
} else {
|
} else {
|
||||||
homescreenSettingsInstance = new HomescreenSettings.default({
|
homescreenSettingsInstance = new HomescreenSettings({
|
||||||
serverId: ApiClient.serverId(),
|
serverId: ApiClient.serverId(),
|
||||||
userId: userId,
|
userId: userId,
|
||||||
element: view.querySelector('.homeScreenSettingsContainer'),
|
element: view.querySelector('.homeScreenSettingsContainer'),
|
||||||
|
|
|
@ -28,7 +28,7 @@ import 'listViewStyle';
|
||||||
if (settingsInstance) {
|
if (settingsInstance) {
|
||||||
settingsInstance.loadData();
|
settingsInstance.loadData();
|
||||||
} else {
|
} else {
|
||||||
settingsInstance = new PlaybackSettings.default({
|
settingsInstance = new PlaybackSettings({
|
||||||
serverId: ApiClient.serverId(),
|
serverId: ApiClient.serverId(),
|
||||||
userId: userId,
|
userId: userId,
|
||||||
element: view.querySelector('.settingsContainer'),
|
element: view.querySelector('.settingsContainer'),
|
||||||
|
|
|
@ -191,7 +191,7 @@ export default function (view, params) {
|
||||||
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
||||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||||
const serverId = ApiClient.serverInfo().Id;
|
const serverId = ApiClient.serverInfo().Id;
|
||||||
new playlistEditor.showEditor({
|
new playlistEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue