mod_admin_shell: Make default column width 1 part
authorKim Alvefur <zash@zash.se>
Fri, 07 Apr 2023 13:07:00 +0200
changeset 13046 0f05804e974d
parent 13045 61b00bd20074
child 13047 d4f7118d1531
mod_admin_shell: Make default column width 1 part These gets used for usernames, resources and other random session fields that don't have a column definition in `available_columns`
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Fri Apr 07 13:04:15 2023 +0200
+++ b/plugins/mod_admin_shell.lua	Fri Apr 07 13:07:00 2023 +0200
@@ -999,7 +999,7 @@
 	local columns = {};
 	for i, col in pairs(colspec or default) do
 		if type(col) == "string" then
-			columns[i] = available_columns[col] or { title = capitalize(col); width = 20; key = col };
+			columns[i] = available_columns[col] or { title = capitalize(col); width = "1p"; key = col };
 		elseif type(col) ~= "table" then
 			return false, ("argument %d: expected string|table but got %s"):format(i, type(col));
 		else