mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move wizard and user preference routes to nested folders
This commit is contained in:
parent
a353812400
commit
c0261ee487
30 changed files with 55 additions and 42 deletions
40
src/controllers/wizard/remote/index.js
Normal file
40
src/controllers/wizard/remote/index.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
import loading from 'loading';
|
||||
import 'emby-checkbox';
|
||||
import 'emby-button';
|
||||
import 'emby-select';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
const apiClient = ApiClient;
|
||||
const config = {};
|
||||
config.EnableRemoteAccess = page.querySelector('#chkRemoteAccess').checked;
|
||||
config.EnableAutomaticPortMapping = page.querySelector('#chkEnableUpnp').checked;
|
||||
apiClient.ajax({
|
||||
type: 'POST',
|
||||
data: config,
|
||||
url: apiClient.getUrl('Startup/RemoteAccess')
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
navigateToNextPage();
|
||||
});
|
||||
}
|
||||
|
||||
function navigateToNextPage() {
|
||||
Dashboard.navigate('wizardfinish.html');
|
||||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
save(this);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
});
|
||||
view.addEventListener('viewhide', function () {
|
||||
document.querySelector('.skinHeader').classList.remove('noHomeButtonHeader');
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue