Skip to content

Commit

Permalink
webadmin: when loading page with webserver routes, internal services …
Browse files Browse the repository at this point in the history
…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 #264 reported by kiekerjan, thanks!
  • Loading branch information
mjl- committed Dec 24, 2024
1 parent f7666d1 commit 965a2b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webadmin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion webadmin/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}),
),
),
),
Expand Down

0 comments on commit 965a2b4

Please sign in to comment.