From 45f56f0f6e4c54c168d73464736fb3fc80f79026 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 5 Apr 2026 09:12:17 -0300 Subject: [PATCH] Update botui: Knowledge Base group permissions tab and Drive UI enhancements. --- ui/suite/admin/groups.html | 2 ++ ui/suite/drive/drive.css | 33 +++++++++++++++++++++++++++++++++ ui/suite/drive/drive.js | 7 +++++-- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ui/suite/admin/groups.html b/ui/suite/admin/groups.html index e8cc383..8b20ab3 100644 --- a/ui/suite/admin/groups.html +++ b/ui/suite/admin/groups.html @@ -100,6 +100,7 @@ + @@ -463,6 +464,7 @@ margin: 0; display: -webkit-box; -webkit-line-clamp: 2; + line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } diff --git a/ui/suite/drive/drive.css b/ui/suite/drive/drive.css index cd93146..bbc3e42 100644 --- a/ui/suite/drive/drive.css +++ b/ui/suite/drive/drive.css @@ -1000,3 +1000,36 @@ border-radius: 0; } } + +/* KB Tags */ +.kb-tag { + display: inline-flex; + align-items: center; + gap: 4px; + padding: 2px 6px; + border-radius: 4px; + font-size: 11px; + font-weight: 600; + margin-left: 8px; + text-transform: uppercase; +} + +.kb-tag.public { + background: rgba(34, 197, 94, 0.15); + color: #22c55e; + border: 1px solid rgba(34, 197, 94, 0.3); +} + +.kb-tag.private { + background: rgba(245, 158, 11, 0.15); + color: #f59e0b; + border: 1px solid rgba(245, 158, 11, 0.3); +} + +.file-card-preview .kb-tag { + position: absolute; + top: 8px; + right: 8px; + margin: 0; + backdrop-filter: blur(4px); +} diff --git a/ui/suite/drive/drive.js b/ui/suite/drive/drive.js index 17b74e1..16fbd5c 100644 --- a/ui/suite/drive/drive.js +++ b/ui/suite/drive/drive.js @@ -348,7 +348,8 @@ const checked = selectedFiles.has(file.path) ? "checked" : ""; const selected = selectedFiles.has(file.path) ? "selected" : ""; - return `
${iconSvg}
${escapeHtml(file.name)}
${sizeText}
`; + const kbTag = file.is_kb ? `KB` : ""; + return `
${iconSvg}${kbTag}
${escapeHtml(file.name)}
${sizeText}
`; } function renderFileRow(file) { @@ -365,7 +366,9 @@ ? `` : ""; - return `
${iconSvg}${escapeHtml(file.name)}
${modifiedText}
${sizeText}
${downloadBtn}
`; + const kbTag = file.is_kb ? `${file.is_public ? "🔓" : "🔒"} KB` : ""; + + return `
${iconSvg}${escapeHtml(file.name)}${kbTag}
${modifiedText}
${sizeText}
${downloadBtn}
`; } function bindFileEvents() {