GitHub Actions commited on
Commit
e59e120
ยท
1 Parent(s): d2a4597

Auto-deploy from GitHub Actions - 2025-12-12 09:18:12

Browse files
Files changed (1) hide show
  1. templates/admin_webnovels.html +30 -2
templates/admin_webnovels.html CHANGED
@@ -997,11 +997,39 @@
997
  if (file.tags) {
998
  try {
999
  const tags = JSON.parse(file.tags);
1000
- if (tags && tags.length > 0) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1001
  tagsHtml = '<div style="margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px;">';
1002
- tags.forEach(tag => {
1003
  tagsHtml += `<span style="background: #e8f0fe; color: #1a73e8; padding: 2px 6px; border-radius: 4px; font-size: 11px; border: 1px solid #d2e3fc;">#${escapeHtml(tag)}</span>`;
1004
  });
 
 
 
1005
  tagsHtml += '</div>';
1006
  }
1007
  } catch (e) {
 
997
  if (file.tags) {
998
  try {
999
  const tags = JSON.parse(file.tags);
1000
+ let displayTags = [];
1001
+
1002
+ if (Array.isArray(tags)) {
1003
+ displayTags = tags;
1004
+ } else {
1005
+ // ๊ณ„์ธต์  ๊ตฌ์กฐ์ธ ๊ฒฝ์šฐ ํ‰ํƒ„ํ™”ํ•˜์—ฌ ์ผ๋ถ€๋งŒ ์ถ”์ถœ
1006
+ if (tags.parent_chunk) {
1007
+ Object.values(tags.parent_chunk).forEach(arr => {
1008
+ if (Array.isArray(arr)) displayTags.push(...arr);
1009
+ });
1010
+ }
1011
+ if (tags.episodes) {
1012
+ Object.values(tags.episodes).forEach(arr => {
1013
+ if (Array.isArray(arr)) displayTags.push(...arr);
1014
+ });
1015
+ }
1016
+ if (tags.graph_rag) {
1017
+ Object.values(tags.graph_rag).forEach(arr => {
1018
+ if (Array.isArray(arr)) displayTags.push(...arr);
1019
+ });
1020
+ }
1021
+ }
1022
+
1023
+ // ์ตœ๋Œ€ 5๊ฐœ๋งŒ ํ‘œ์‹œํ•˜๊ณ  ๋‚˜๋จธ์ง€๋Š” ์ƒ๋žต
1024
+ const visibleTags = displayTags.slice(0, 5);
1025
+ if (visibleTags.length > 0) {
1026
  tagsHtml = '<div style="margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px;">';
1027
+ visibleTags.forEach(tag => {
1028
  tagsHtml += `<span style="background: #e8f0fe; color: #1a73e8; padding: 2px 6px; border-radius: 4px; font-size: 11px; border: 1px solid #d2e3fc;">#${escapeHtml(tag)}</span>`;
1029
  });
1030
+ if (displayTags.length > 5) {
1031
+ tagsHtml += `<span style="color: #5f6368; font-size: 11px; padding: 2px;">+${displayTags.length - 5}</span>`;
1032
+ }
1033
  tagsHtml += '</div>';
1034
  }
1035
  } catch (e) {