mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix indentation of directorybrowser
This commit is contained in:
parent
5159655c77
commit
3ccb4fabb4
1 changed files with 56 additions and 56 deletions
|
@ -235,66 +235,66 @@ function getDefaultPath(options) {
|
||||||
|
|
||||||
let systemInfo;
|
let systemInfo;
|
||||||
class DirectoryBrowser {
|
class DirectoryBrowser {
|
||||||
currentDialog;
|
currentDialog;
|
||||||
|
|
||||||
show = options => {
|
show = options => {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
const fileOptions = {
|
const fileOptions = {
|
||||||
includeDirectories: true
|
includeDirectories: true
|
||||||
};
|
};
|
||||||
if (options.includeDirectories != null) {
|
if (options.includeDirectories != null) {
|
||||||
fileOptions.includeDirectories = options.includeDirectories;
|
fileOptions.includeDirectories = options.includeDirectories;
|
||||||
}
|
}
|
||||||
if (options.includeFiles != null) {
|
if (options.includeFiles != null) {
|
||||||
fileOptions.includeFiles = options.includeFiles;
|
fileOptions.includeFiles = options.includeFiles;
|
||||||
}
|
}
|
||||||
Promise.all([getSystemInfo(), getDefaultPath(options)]).then(
|
Promise.all([getSystemInfo(), getDefaultPath(options)]).then(
|
||||||
responses => {
|
responses => {
|
||||||
const systemInfo = responses[0];
|
const systemInfo = responses[0];
|
||||||
const initialPath = responses[1];
|
const initialPath = responses[1];
|
||||||
const dlg = dialogHelper.createDialog({
|
const dlg = dialogHelper.createDialog({
|
||||||
size: 'small',
|
size: 'small',
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
});
|
});
|
||||||
dlg.classList.add('ui-body-a');
|
dlg.classList.add('ui-body-a');
|
||||||
dlg.classList.add('background-theme-a');
|
dlg.classList.add('background-theme-a');
|
||||||
dlg.classList.add('directoryPicker');
|
dlg.classList.add('directoryPicker');
|
||||||
dlg.classList.add('formDialog');
|
dlg.classList.add('formDialog');
|
||||||
|
|
||||||
let html = '';
|
let html = '';
|
||||||
html += '<div class="formDialogHeader">';
|
html += '<div class="formDialogHeader">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1"><span class="material-icons arrow_back"></span></button>';
|
html += '<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1"><span class="material-icons arrow_back"></span></button>';
|
||||||
html += '<h3 class="formDialogHeaderTitle">';
|
html += '<h3 class="formDialogHeaderTitle">';
|
||||||
html += options.header || globalize.translate('HeaderSelectPath');
|
html += options.header || globalize.translate('HeaderSelectPath');
|
||||||
html += '</h3>';
|
html += '</h3>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += getEditorHtml(options, systemInfo);
|
html += getEditorHtml(options, systemInfo);
|
||||||
dlg.innerHTML = html;
|
dlg.innerHTML = html;
|
||||||
initEditor(dlg, options, fileOptions);
|
initEditor(dlg, options, fileOptions);
|
||||||
dlg.addEventListener('close', onDialogClosed);
|
dlg.addEventListener('close', onDialogClosed);
|
||||||
dialogHelper.open(dlg);
|
dialogHelper.open(dlg);
|
||||||
dlg.querySelector('.btnCloseDialog').addEventListener('click', () => {
|
dlg.querySelector('.btnCloseDialog').addEventListener('click', () => {
|
||||||
dialogHelper.close(dlg);
|
dialogHelper.close(dlg);
|
||||||
});
|
});
|
||||||
this.currentDialog = dlg;
|
this.currentDialog = dlg;
|
||||||
dlg.querySelector('#txtDirectoryPickerPath').value = initialPath;
|
dlg.querySelector('#txtDirectoryPickerPath').value = initialPath;
|
||||||
const txtNetworkPath = dlg.querySelector('#txtNetworkPath');
|
const txtNetworkPath = dlg.querySelector('#txtNetworkPath');
|
||||||
if (txtNetworkPath) {
|
if (txtNetworkPath) {
|
||||||
txtNetworkPath.value = options.networkSharePath || '';
|
txtNetworkPath.value = options.networkSharePath || '';
|
||||||
}
|
}
|
||||||
if (!options.pathReadOnly) {
|
if (!options.pathReadOnly) {
|
||||||
refreshDirectoryBrowser(dlg, initialPath, fileOptions, true);
|
refreshDirectoryBrowser(dlg, initialPath, fileOptions, true);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
close = () => {
|
|
||||||
if (this.currentDialog) {
|
|
||||||
dialogHelper.close(this.currentDialog);
|
|
||||||
}
|
}
|
||||||
};
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
close = () => {
|
||||||
|
if (this.currentDialog) {
|
||||||
|
dialogHelper.close(this.currentDialog);
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DirectoryBrowser;
|
export default DirectoryBrowser;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue