mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove unused variables
This commit is contained in:
parent
6a60938b09
commit
f60b7686d0
110 changed files with 242 additions and 277 deletions
|
@ -218,7 +218,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
|
||||
function renderInfo(view, sessions, forceUpdate) {
|
||||
function renderInfo(view, sessions) {
|
||||
sessions = filterSessions(sessions);
|
||||
renderActiveConnections(view, sessions);
|
||||
loading.hide();
|
||||
|
@ -730,7 +730,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onRestartRequired(evt, apiClient) {
|
||||
console.debug('onRestartRequired not implemented', evt, apiClient);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('form').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', loadData);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
}
|
||||
|
||||
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
||||
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
||||
|
||||
|
|
|
@ -48,13 +48,13 @@ import alert from '../../components/alert';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveEncodingPathFailure(response) {
|
||||
function onSaveEncodingPathFailure() {
|
||||
loading.hide();
|
||||
alert(globalize.translate('FFmpegSavePathNotFound'));
|
||||
}
|
||||
|
||||
function updateEncoder(form) {
|
||||
return ApiClient.getSystemInfo().then(function (systemInfo) {
|
||||
return ApiClient.getSystemInfo().then(function () {
|
||||
return ApiClient.ajax({
|
||||
url: ApiClient.getUrl('System/MediaEncoder/Path'),
|
||||
type: 'POST',
|
||||
|
|
|
@ -19,7 +19,6 @@ import alert from '../../components/alert';
|
|||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
|
||||
return '<option value="' + language.Value + '">' + language.Name + '</option>';
|
||||
})).val(config.UICulture);
|
||||
currentLanguage = config.UICulture;
|
||||
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -34,16 +33,11 @@ import alert from '../../components/alert';
|
|||
config.CachePath = form.querySelector('#txtCachePath').value;
|
||||
config.MetadataPath = $('#txtMetadataPath', form).val();
|
||||
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
|
||||
let requiresReload = config.UICulture !== currentLanguage;
|
||||
ApiClient.updateServerConfiguration(config).then(function() {
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
||||
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;
|
||||
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value;
|
||||
|
||||
if (currentBrandingOptions && brandingConfig.CustomCss !== currentBrandingOptions.CustomCss) {
|
||||
requiresReload = true;
|
||||
}
|
||||
|
||||
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
|
@ -56,10 +50,8 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
let currentBrandingOptions;
|
||||
let currentLanguage;
|
||||
const brandingConfigKey = 'branding';
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
||||
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
||||
const picker = new directoryBrowser();
|
||||
|
@ -110,7 +102,6 @@ import alert from '../../components/alert';
|
|||
loadPage(view, responses[0], responses[1], responses[2]);
|
||||
});
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
|
||||
currentBrandingOptions = config;
|
||||
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
|
||||
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function loadData() {
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
||||
|
|
|
@ -6,7 +6,7 @@ import '../../assets/css/flexstyles.scss';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewbeforeshow', function() {
|
||||
loading.show();
|
||||
const apiClient = ApiClient;
|
||||
|
|
|
@ -37,7 +37,7 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
function showConfirmMessage(config) {
|
||||
function showConfirmMessage() {
|
||||
const msg = [];
|
||||
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
||||
alert({
|
||||
|
|
|
@ -131,7 +131,7 @@ import alert from '../../components/alert';
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function loadPage(page, config) {
|
||||
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
|
||||
page.querySelector('#txtPublicPort').value = config.PublicPort;
|
||||
|
@ -198,7 +198,7 @@ import alert from '../../components/alert';
|
|||
});
|
||||
});
|
||||
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
loading.show();
|
||||
ApiClient.getNamedConfiguration('network').then(function (config) {
|
||||
loadPage(view, config);
|
||||
|
|
|
@ -91,7 +91,7 @@ function save(page) {
|
|||
}).map(function (c) {
|
||||
return c.getAttribute('data-itemid');
|
||||
});
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function (r) {
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
Dashboard.navigate('notificationsettings.html');
|
||||
});
|
||||
|
|
|
@ -54,7 +54,7 @@ function reload(page) {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
reload(view);
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ function reloadList(page) {
|
|||
noneElement: page.querySelector('#none'),
|
||||
repositories: repositories
|
||||
});
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error loading repositories');
|
||||
page.querySelector('#none').classList.remove('hide');
|
||||
loading.hide();
|
||||
|
@ -33,9 +33,9 @@ function saveList(page) {
|
|||
url: ApiClient.getUrl('Repositories'),
|
||||
data: JSON.stringify(repositories),
|
||||
contentType: 'application/json'
|
||||
}).then(response => {
|
||||
}).then(() => {
|
||||
reloadList(page);
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error saving repositories');
|
||||
loading.hide();
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ function getTabs() {
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTabs('plugins', 2, getTabs);
|
||||
reloadList(this);
|
||||
|
|
|
@ -207,7 +207,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
return trigger;
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
loading.show();
|
||||
const id = getParameterByName('id');
|
||||
|
|
|
@ -123,7 +123,7 @@ import '../../../elements/emby-button/emby-button';
|
|||
$(elem).parents('.listItem')[0].setAttribute('data-status', state);
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function updateTasks(tasks) {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const task = tasks[i];
|
||||
|
|
|
@ -108,7 +108,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page, user) {
|
||||
function onSaveComplete() {
|
||||
Dashboard.navigate('userprofiles.html');
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
|
|
|
@ -91,7 +91,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ import toast from '../../../components/toast/toast';
|
|||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
||||
});
|
||||
}, function (response) {
|
||||
}, function () {
|
||||
toast(globalize.translate('ErrorDefault'));
|
||||
loading.hide();
|
||||
});
|
||||
|
|
|
@ -161,7 +161,7 @@ import toast from '../../../components/toast/toast';
|
|||
});
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
});
|
||||
}
|
||||
|
||||
function getUserHtml(user, addConnectIndicator) {
|
||||
function getUserHtml(user) {
|
||||
let html = '';
|
||||
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue