1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-03-24 18:54:47 +03:00

webadmin: when loading page with webserver routes, internal services would always be shown with "admin" as internal services, and saving the handler would overwrite the correct setting

fix this by properly loading the correct internal service.

for issue  reported by kiekerjan, thanks!
This commit is contained in:
Mechiel Lukkien 2024-12-24 22:02:28 +01:00
parent f7666d1582
commit 965a2b426f
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -3841,7 +3841,7 @@ const webserver = async () => {
};
const root = dom.table(dom.tr(dom.td('Type'), dom.td('Base path', attr.title('Path to use as root of internal service, e.g. /webmail/.')), dom.td('Service')), dom.tr(dom.td(dom.select(attr.required(''), dom.option('Static'), dom.option('Redirect'), dom.option('Forward'), dom.option('Internal', attr.selected('')), function change(e) {
makeType(e.target.value);
})), dom.td(basePath = dom.input(attr.value(wi.BasePath), attr.required(''), attr.placeholder('/.../'))), dom.td(service = dom.select(dom.option('Admin', attr.value('admin')), dom.option('Account', attr.value('account')), dom.option('Webmail', attr.value('webmail')), dom.option('Webapi', attr.value('webapi')), attr.value(wi.Service)))));
})), dom.td(basePath = dom.input(attr.value(wi.BasePath), attr.required(''), attr.placeholder('/.../'))), dom.td(service = dom.select(dom.option('Admin', attr.value('admin')), dom.option('Account', attr.value('account')), dom.option('Webmail', attr.value('webmail')), dom.option('Webapi', attr.value('webapi')), prop({ value: wi.Service })))));
view = { root: root, get: get };
return view;
};

View file

@ -4847,7 +4847,7 @@ const webserver = async () => {
dom.option('Account', attr.value('account')),
dom.option('Webmail', attr.value('webmail')),
dom.option('Webapi', attr.value('webapi')),
attr.value(wi.Service),
prop({value: wi.Service}),
),
),
),