From f98b3687930910f101fbfa8bc9aa3e11519d5a53 Mon Sep 17 00:00:00 2001
From: kjqwer <2990346238@qq.com>
Date: Sat, 29 Nov 2025 13:44:18 +0800
Subject: [PATCH] =?UTF-8?q?=E7=88=B6=E6=96=87=E4=BB=B6=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8Cseo=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 6 +-
src/components/PresetManager.vue | 46 ++--
src/components/preset/FolderSelector.vue | 224 +++++++++++++++++++
src/components/preset/FolderSelectorItem.vue | 153 +++++++++++++
4 files changed, 395 insertions(+), 34 deletions(-)
create mode 100644 src/components/preset/FolderSelector.vue
create mode 100644 src/components/preset/FolderSelectorItem.vue
diff --git a/index.html b/index.html
index 274adb8..92d2963 100644
--- a/index.html
+++ b/index.html
@@ -9,7 +9,7 @@
+ content="提示词编辑器,点击即用,静态部署, 提示词管理, 词库, 预设, 多语言, 翻译, 提示词翻译, AI 翻译, Prompt Translation, 拖拽排序, 智能补全, 导入导出, 本地持久化, Stable Diffusion, Midjourney, AI绘图" />
@@ -132,7 +132,9 @@
-
+
+
AI 提示词编辑器 - 支持语言翻译与词库管理的智能工具
+
diff --git a/src/components/PresetManager.vue b/src/components/PresetManager.vue
index 2f02614..7eb7f69 100644
--- a/src/components/PresetManager.vue
+++ b/src/components/PresetManager.vue
@@ -5,6 +5,7 @@ import type { ExtendedPreset, PresetFolder, PresetType } from '../types';
import NotificationToast from './NotificationToast.vue';
import PresetSidebar from './preset/PresetSidebar.vue';
import PresetList from './preset/PresetList.vue';
+import FolderSelector from './preset/FolderSelector.vue';
const store = usePromptStore();
@@ -133,26 +134,6 @@ const flattenedFolders = computed(() => {
return res;
});
-// Parent options for folder dialog (exclude self and children)
-const flattenedParentOptions = computed(() => {
- const exclude = new Set();
- if (editingFolder.value) {
- exclude.add(editingFolder.value.id);
-
- // Helper to find descendants
- const all = store.presetFolders || [];
- function walk(id: string) {
- const children = all.filter(f => f.parentId === id);
- for (const c of children) {
- exclude.add(c.id);
- walk(c.id);
- }
- }
- walk(editingFolder.value.id);
- }
- return flattenedFolders.value.filter(f => !exclude.has(f.id));
-});
-
const allPresetsCount = computed(() => (store.extendedPresets || []).length);
const uncategorizedCount = computed(() => (store.extendedPresets || []).filter(p => !p.folderId).length);
@@ -480,12 +461,12 @@ onMounted(() => {
-
+
@@ -526,12 +507,13 @@ onMounted(() => {
-
+