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) {
|
||||
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({
|
||||
removeOnClose: true,
|
||||
size: 'small'
|
||||
|
|
|
@ -231,9 +231,8 @@ import 'flexStyles';
|
|||
}
|
||||
|
||||
function addElementToList(source, sortCallback) {
|
||||
require(['prompt'], function (prompt) {
|
||||
|
||||
prompt.default({
|
||||
import('prompt').then(({default: prompt}) => {
|
||||
prompt({
|
||||
label: 'Value:'
|
||||
}).then(function (text) {
|
||||
const list = dom.parentWithClass(source, 'editableListviewContainer').querySelector('.paperList');
|
||||
|
@ -1076,7 +1075,7 @@ import 'flexStyles';
|
|||
}
|
||||
|
||||
function centerFocus(elem, horiz, on) {
|
||||
require(['scrollHelper'], function (scrollHelper) {
|
||||
import('scrollHelper').then(({default: scrollHelper}) => {
|
||||
const fn = on ? 'on' : 'off';
|
||||
scrollHelper.centerFocus[fn](elem, horiz);
|
||||
});
|
||||
|
@ -1085,8 +1084,7 @@ import 'flexStyles';
|
|||
function show(itemId, serverId, resolve, reject) {
|
||||
loading.show();
|
||||
|
||||
require(['text!./metadataEditor.template.html'], function (template) {
|
||||
|
||||
import('text!./metadataEditor.template.html').then(({default: template}) => {
|
||||
const dialogOptions = {
|
||||
removeOnClose: true,
|
||||
scrollY: false
|
||||
|
@ -1142,8 +1140,7 @@ import 'flexStyles';
|
|||
|
||||
loading.show();
|
||||
|
||||
require(['text!./metadataEditor.template.html'], function (template) {
|
||||
|
||||
import('text!./metadataEditor.template.html').then(({default: template}) => {
|
||||
elem.innerHTML = globalize.translateHtml(template, 'core');
|
||||
|
||||
elem.querySelector('.formDialogFooter').classList.remove('formDialogFooter');
|
||||
|
|
|
@ -262,7 +262,7 @@ import 'css!./multiSelect';
|
|||
switch (id) {
|
||||
case 'addtocollection':
|
||||
import('collectionEditor').then(({default: collectionEditor}) => {
|
||||
new collectionEditor.showEditor({
|
||||
new collectionEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
|
@ -272,7 +272,7 @@ import 'css!./multiSelect';
|
|||
break;
|
||||
case 'playlist':
|
||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||
new playlistEditor.showEditor({
|
||||
new playlistEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
|
|
|
@ -256,7 +256,7 @@ import 'listViewStyle';
|
|||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
let currentType;
|
||||
|
||||
for (const profile of profiles) {
|
||||
for (const [index, profile] of profiles.entries()) {
|
||||
|
||||
if (profile.Type !== currentType) {
|
||||
html += '<li data-role="list-divider">' + profile.Type + '</li>';
|
||||
|
@ -264,7 +264,7 @@ import 'listViewStyle';
|
|||
}
|
||||
|
||||
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>';
|
||||
|
||||
if ('Video' == profile.Type) {
|
||||
|
@ -277,7 +277,7 @@ import 'listViewStyle';
|
|||
}
|
||||
|
||||
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>';
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import globalize from 'globalize';
|
|||
|
||||
view.addEventListener('viewshow', function () {
|
||||
if (!activityLog) {
|
||||
activityLog = new ActivityLog.default({
|
||||
activityLog = new ActivityLog({
|
||||
serverId: ApiClient.serverId(),
|
||||
element: view.querySelector('.activityItems')
|
||||
});
|
||||
|
|
|
@ -9,7 +9,6 @@ import globalize from 'globalize';
|
|||
ApiClient.getJSON(ApiClient.getUrl('Channels', {
|
||||
SupportsMediaDeletion: true
|
||||
})).then(function (channelsResult) {
|
||||
let folder;
|
||||
let isChecked;
|
||||
let checkedAttribute;
|
||||
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>';
|
||||
}
|
||||
|
||||
for (const folder of channelsResult) {
|
||||
for (const folder of channelsResult.Items) {
|
||||
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
||||
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||
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();
|
||||
|
||||
if (itemId) {
|
||||
require(['metadataEditor'], function (metadataEditor) {
|
||||
require(['metadataEditor'], function ({default: metadataEditor}) {
|
||||
metadataEditor.embed(context.querySelector('.editPageInnerContent'), itemId, ApiClient.serverInfo().Id);
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -803,7 +803,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
|||
bindAll(view.querySelectorAll('.btnShuffle'), 'click', shuffle);
|
||||
}
|
||||
|
||||
this.alphaNumericShortcuts = new AlphaNumericShortcuts.default({
|
||||
self.alphaNumericShortcuts = new AlphaNumericShortcuts.default({
|
||||
itemsContainer: self.itemsContainer
|
||||
});
|
||||
});
|
||||
|
@ -817,7 +817,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
|||
var alphaNumericShortcuts = self.alphaNumericShortcuts;
|
||||
|
||||
if (alphaNumericShortcuts) {
|
||||
alphaNumericShortcuts.default.destroy();
|
||||
alphaNumericShortcuts.destroy();
|
||||
self.alphaNumericShortcuts = null;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -5,8 +5,6 @@ import datetime from 'datetime';
|
|||
import itemHelper from 'itemHelper';
|
||||
import mediaInfo from 'mediaInfo';
|
||||
import focusManager from 'focusManager';
|
||||
import imageLoader from 'imageLoader';
|
||||
import scrollHelper from 'scrollHelper';
|
||||
import events from 'events';
|
||||
import connectionManager from 'connectionManager';
|
||||
import browser from 'browser';
|
||||
|
@ -1006,7 +1004,7 @@ import 'css!assets/css/videoosd';
|
|||
if (statsOverlay) {
|
||||
statsOverlay.toggle();
|
||||
} else {
|
||||
statsOverlay = new PlayerStats.default({
|
||||
statsOverlay = new PlayerStats({
|
||||
player: player
|
||||
});
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import 'listViewStyle';
|
|||
if (homescreenSettingsInstance) {
|
||||
homescreenSettingsInstance.loadData();
|
||||
} else {
|
||||
homescreenSettingsInstance = new HomescreenSettings.default({
|
||||
homescreenSettingsInstance = new HomescreenSettings({
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: userId,
|
||||
element: view.querySelector('.homeScreenSettingsContainer'),
|
||||
|
|
|
@ -28,7 +28,7 @@ import 'listViewStyle';
|
|||
if (settingsInstance) {
|
||||
settingsInstance.loadData();
|
||||
} else {
|
||||
settingsInstance = new PlaybackSettings.default({
|
||||
settingsInstance = new PlaybackSettings({
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: userId,
|
||||
element: view.querySelector('.settingsContainer'),
|
||||
|
|
|
@ -191,7 +191,7 @@ export default function (view, params) {
|
|||
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||
const serverId = ApiClient.serverInfo().Id;
|
||||
new playlistEditor.showEditor({
|
||||
new playlistEditor({
|
||||
items: [],
|
||||
serverId: serverId
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue