From 1ce5b3a60ac7fcda1b984398cbc9abdd95e41085 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sun, 29 Jun 2025 22:44:53 +0800 Subject: [PATCH] modify page layout in prompt, resource and tool --- .../main-panel/prompt/prompt-templates.vue | 43 ++++++---- .../resource/resource-list-templates.vue | 78 +++++++++++-------- .../main-panel/resource/resource-list.vue | 48 ++++++++---- .../components/main-panel/tool/tool-list.vue | 38 ++++++--- 4 files changed, 137 insertions(+), 70 deletions(-) diff --git a/renderer/src/components/main-panel/prompt/prompt-templates.vue b/renderer/src/components/main-panel/prompt/prompt-templates.vue index ff14a7c..dc4567b 100644 --- a/renderer/src/components/main-panel/prompt/prompt-templates.vue +++ b/renderer/src/components/main-panel/prompt/prompt-templates.vue @@ -8,23 +8,27 @@ prompts/list - -
@@ -126,8 +130,8 @@ onMounted(async () => { user-select: none; cursor: pointer; display: flex; - align-items: center; - justify-content: space-between; + flex-direction: column; + align-items: flex-start; transition: var(--animation-3s); } @@ -141,19 +145,30 @@ onMounted(async () => { transition: var(--animation-3s); } -.prompt-template-container>.item>span:first-child { - max-width: 200px; +.prompt-title { + font-weight: bold; + max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.prompt-template-container>.item>span:last-child { +.prompt-description { opacity: 0.6; font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 250px; + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/resource/resource-list-templates.vue b/renderer/src/components/main-panel/resource/resource-list-templates.vue index 2c6fd72..207dcdc 100644 --- a/renderer/src/components/main-panel/resource/resource-list-templates.vue +++ b/renderer/src/components/main-panel/resource/resource-list-templates.vue @@ -12,19 +12,22 @@ @@ -137,41 +140,52 @@ h3.resource-template .iconfont.icon-restart:hover { width: 175px; } -.resource-template-container>.item { - margin: 3px; - padding: 5px 10px; - border-radius: .3em; - user-select: none; - cursor: pointer; - display: flex; - align-items: center; - justify-content: space-between; - transition: var(--animation-3s); +.resource-template-container > .item { + margin: 3px; + padding: 5px 10px; + border-radius: .3em; + user-select: none; + cursor: pointer; + display: flex; + flex-direction: column; + align-items: flex-start; + transition: var(--animation-3s); } -.resource-template-container>.item:hover { - background-color: var(--main-light-color); - transition: var(--animation-3s); +.resource-template-container > .item:hover { + background-color: var(--main-light-color); + transition: var(--animation-3s); } -.resource-template-container>.item.active { - background-color: var(--main-light-color); - transition: var(--animation-3s); +.resource-template-container > .item.active { + background-color: var(--main-light-color); + transition: var(--animation-3s); } -.resource-template-container>.item>span:first-child { - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; +.resource-title { + font-weight: bold; + max-width: 250px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -.resource-template-container>.item>span:last-child { - opacity: 0.6; - font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; +.resource-description { + opacity: 0.6; + font-size: 12.5px; + max-width: 250px; + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/resource/resource-list.vue b/renderer/src/components/main-panel/resource/resource-list.vue index 08c5607..4d5be81 100644 --- a/renderer/src/components/main-panel/resource/resource-list.vue +++ b/renderer/src/components/main-panel/resource/resource-list.vue @@ -12,17 +12,23 @@ @@ -139,41 +145,53 @@ h3.resource-template .iconfont.icon-restart:hover { width: 175px; } -.resource-template-container>.item { +.resource-template-container > .item { margin: 3px; padding: 5px 10px; border-radius: .3em; user-select: none; cursor: pointer; display: flex; - align-items: center; - justify-content: space-between; + flex-direction: column; + align-items: flex-start; transition: var(--animation-3s); } -.resource-template-container>.item:hover { +.resource-template-container > .item:hover { background-color: var(--main-light-color); transition: var(--animation-3s); } -.resource-template-container>.item.active { +.resource-template-container > .item.active { background-color: var(--main-light-color); transition: var(--animation-3s); } -.resource-template-container>.item>span:first-child { - max-width: 200px; +.resource-title { + font-weight: bold; + max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.resource-template-container>.item>span:last-child { +.resource-description { opacity: 0.6; font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 250px; + /* Remove ellipsis and allow full text wrap */ + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/tool/tool-list.vue b/renderer/src/components/main-panel/tool/tool-list.vue index 9eed698..b89d383 100644 --- a/renderer/src/components/main-panel/tool/tool-list.vue +++ b/renderer/src/components/main-panel/tool/tool-list.vue @@ -8,23 +8,34 @@ tools/list - + {{ client.name }} - +