Adopt @simpleworkjs/frontend's messages/modal/validate modules

Same swap as sso-manager-node/jump-host: vendored app.util.actionMessage/
actionConfirm replaced by @simpleworkjs/frontend's app.messages.action/
confirm (real HTML-escaping, toast fallback); vendored val.js replaced by
the package's app.validate.js.

proxy's host/target/hostname validation rules (mirrored from the backend's
utils/hostname_validate.js — wildcard DNS patterns, not something other
apps need) move to public/js/app.js, registered via $.validateSettings,
since they're proxy-specific and don't belong in the shared package's
generic rule set (eq/user/password/ip).

app.api/app.auth/app.pubsub/app.socket in app-base.js are untouched, same
reasoning as sso-manager-node's PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-27 13:39:01 -04:00
parent e770bbb41f
commit 0a659428dd
12 changed files with 122 additions and 295 deletions
+2 -2
View File
@@ -22,7 +22,7 @@
function populateUsers(actionMessage){
app.user.list(function(error, data){
if(error) return app.util.actionMessage(error, $.scope.users.$this, 'danger');
if(error) return app.messages.action(error, $.scope.users.$this, 'danger');
for(let user of data.results){
$.scope.users.push(user);
}
@@ -37,7 +37,7 @@
function removeUser(username){
app.user.remove({username: username}, function(error, data){
if(error) return app.util.actionMessage(error, $.scope.users.$this, 'danger');
if(error) return app.messages.action(error, $.scope.users.$this, 'danger');
$.scope.users.remove(username);
});
}