nicer quota table on admin panel

This commit is contained in:
ansuz 2022-09-14 13:34:37 +05:30
parent ebb17797e3
commit 9ef5711716
2 changed files with 17 additions and 8 deletions

View File

@ -2,7 +2,6 @@
@import (reference) '../../customize/src/less2/include/sidebar-layout.less';
@import (reference) '../../customize/src/less2/include/support.less';
@import (reference) '../../customize/src/less2/include/charts.less';
&.cp-app-admin {
.framework_min_main();
@ -63,12 +62,12 @@
max-width: 500px;
}
@media screen and (max-width: 1200px) {
td.note {
:is(td, th).note {
display: none;
}
}
@media screen and (max-width: 1400px) {
td.plan {
:is(td, th).plan {
display: none;
}
}
@ -332,6 +331,7 @@
.cp-charts-row.heading {
font-weight: bold;
}
table.cp-admin-all-limits,
table.cp-metadata-history,
table.cp-account-stats,
table.cp-block-stats,
@ -343,7 +343,7 @@
td, pre {
color: @cryptpad_text_col;
}
td {
td, th {
max-width: 60vw; // XXX
border: 1px solid @color;
padding: 5px;

View File

@ -1628,9 +1628,9 @@ define([
title: title
}, [
h('td', keyEl),
h('td.limit', Messages._getKey('admin_limit', [limit])),
h('td.plan', Messages._getKey('admin_limitPlan', [user.plan])),
h('td.note', Messages._getKey('admin_limitNote', [user.note]))
h('td.limit', limit),
h('td.plan', user.plan),
h('td.note', user.note)
]);
}
return h('li.cp-admin-limit', [
@ -1642,7 +1642,16 @@ define([
])
]);
});
if (compact) { return $div.append(h('table.cp-admin-all-limits', content)); }
if (compact) {
return $div.append(h('table.cp-admin-all-limits', [
h('tr', [
h('th', Messages.settings_publicSigningKey),
h('th.limit', Messages.admin_planlimit),
h('th.plan', Messages.admin_planName),
h('th.note', Messages.admin_note)
]),
].concat(content)));
}
$div.append(h('ul.cp-admin-all-limits', content));
});
};