Comparison

plugins/mod_admin_shell.lua @ 13287:1e2d65403867

mod_admin_shell: Make 'Role' column dynamically sized Some of the new roles don't quite fit nicely into 4 characters (excluding ellipsis). Given the ability to dynamically add additional roles from the config and possibly from modules, it seems better to just make it a relative size since we can't know how long they will be.
author Kim Alvefur <zash@zash.se>
date Thu, 26 Oct 2023 13:29:28 +0200
parent 13170:082c7d856e61
child 13334:aefcb6b4f47d
comparison
equal deleted inserted replaced
13286:8b3da19b0aea 13287:1e2d65403867
1016 end 1016 end
1017 }; 1017 };
1018 role = { 1018 role = {
1019 title = "Role"; 1019 title = "Role";
1020 description = "Session role with 'prosody:' prefix removed"; 1020 description = "Session role with 'prosody:' prefix removed";
1021 width = #"admin"; 1021 width = "1p";
1022 key = "role"; 1022 key = "role";
1023 mapper = function(role) 1023 mapper = function(role)
1024 local name = role and role.name; 1024 local name = role and role.name;
1025 return name and name:match"^prosody:(%w+)" or name; 1025 return name and name:match"^prosody:(%w+)" or name;
1026 end; 1026 end;