fix: align discord config ui

This commit is contained in:
Peter Steinberger
2026-01-02 21:15:59 +01:00
parent 4541bb2716
commit 118a6d7421
6 changed files with 303 additions and 205 deletions

View File

@@ -69,7 +69,8 @@ export type DiscordChannelConfigResolved = {
function summarizeAllowList(list?: Array<string | number>) {
if (!list || list.length === 0) return "any";
const sample = list.slice(0, 4).map((entry) => String(entry));
const suffix = list.length > sample.length ? ` (+${list.length - sample.length})` : "";
const suffix =
list.length > sample.length ? ` (+${list.length - sample.length})` : "";
return `${sample.join(", ")}${suffix}`;
}
@@ -77,7 +78,8 @@ function summarizeGuilds(entries?: Record<string, DiscordGuildEntryResolved>) {
if (!entries || Object.keys(entries).length === 0) return "any";
const keys = Object.keys(entries);
const sample = keys.slice(0, 4);
const suffix = keys.length > sample.length ? ` (+${keys.length - sample.length})` : "";
const suffix =
keys.length > sample.length ? ` (+${keys.length - sample.length})` : "";
return `${sample.join(", ")}${suffix}`;
}