mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove eslint-enable indent
This commit is contained in:
parent
d6c00aa6f4
commit
0cda86dfdd
1 changed files with 215 additions and 218 deletions
|
@ -10,22 +10,20 @@ import '../formdialog.scss';
|
|||
import '../../elements/emby-button/emby-button';
|
||||
import alert from '../alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function getSystemInfo() {
|
||||
function getSystemInfo() {
|
||||
return systemInfo ? Promise.resolve(systemInfo) : ApiClient.getPublicSystemInfo().then(
|
||||
info => {
|
||||
systemInfo = info;
|
||||
return info;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function onDialogClosed() {
|
||||
function onDialogClosed() {
|
||||
loading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function refreshDirectoryBrowser(page, path, fileOptions, updatePathOnError) {
|
||||
function refreshDirectoryBrowser(page, path, fileOptions, updatePathOnError) {
|
||||
if (path && typeof path !== 'string') {
|
||||
throw new Error('invalid path');
|
||||
}
|
||||
|
@ -77,9 +75,9 @@ import alert from '../alert';
|
|||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getItem(cssClass, type, path, name) {
|
||||
function getItem(cssClass, type, path, name) {
|
||||
let html = '';
|
||||
html += `<div class="listItem listItem-border ${cssClass}" data-type="${type}" data-path="${path}">`;
|
||||
html += '<div class="listItemBody" style="padding-left:0;padding-top:.5em;padding-bottom:.5em;">';
|
||||
|
@ -90,9 +88,9 @@ import alert from '../alert';
|
|||
html += '<span class="material-icons arrow_forward" style="font-size:inherit;"></span>';
|
||||
html += '</div>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
function getEditorHtml(options, systemInfo) {
|
||||
function getEditorHtml(options, systemInfo) {
|
||||
let html = '';
|
||||
html += '<div class="formDialogContent scrollY">';
|
||||
html += '<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">';
|
||||
|
@ -149,19 +147,19 @@ import alert from '../alert';
|
|||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
function alertText(text) {
|
||||
function alertText(text) {
|
||||
alertTextWithOptions({
|
||||
text: text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function alertTextWithOptions(options) {
|
||||
function alertTextWithOptions(options) {
|
||||
alert(options);
|
||||
}
|
||||
}
|
||||
|
||||
function validatePath(path, validateWriteable, apiClient) {
|
||||
function validatePath(path, validateWriteable, apiClient) {
|
||||
return apiClient.ajax({
|
||||
type: 'POST',
|
||||
url: apiClient.getUrl('Environment/ValidatePath'),
|
||||
|
@ -187,9 +185,9 @@ import alert from '../alert';
|
|||
}
|
||||
return Promise.resolve();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initEditor(content, options, fileOptions) {
|
||||
function initEditor(content, options, fileOptions) {
|
||||
content.addEventListener('click', e => {
|
||||
const lnkPath = dom.parentWithClass(e.target, 'lnkPath');
|
||||
if (lnkPath) {
|
||||
|
@ -227,9 +225,9 @@ import alert from '../alert';
|
|||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getDefaultPath(options) {
|
||||
function getDefaultPath(options) {
|
||||
if (options.path) {
|
||||
return Promise.resolve(options.path);
|
||||
} else {
|
||||
|
@ -241,10 +239,10 @@ import alert from '../alert';
|
|||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let systemInfo;
|
||||
class DirectoryBrowser {
|
||||
let systemInfo;
|
||||
class DirectoryBrowser {
|
||||
currentDialog;
|
||||
constructor() {}
|
||||
|
||||
|
@ -306,7 +304,6 @@ import alert from '../alert';
|
|||
dialogHelper.close(this.currentDialog);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/* eslint-enable indent */
|
||||
export default DirectoryBrowser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue