feat: 历史记录100条上限 + 后台文件管理升级收口
- 所有功能历史最多显示100条:relay img-history vis[:150]→[:100]、mcp-usage 流水 LIMIT 300→100 - 前端三处兜底:loadImgHist/ai-gen/poster slice(0,100) - 上轮遗留收口:后台文件管理全量视图/50条分页/100x100缩略图/下载/三类删除、图片历史铁规则 ImgHist 共享层接入7工具 - Home NEW_FEATURES 与 README 同步
This commit is contained in:
1 parent
225aa5ed68
commit
3c126277eb
16 files changed
+1030
-93
No files matched your search
@@ -1,5 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { getMachineId, licenseHeaders } from '@/tools/license/license';
|
||||
import ImgHist from '@/tools/img-hist/ImgHist.vue';
|
||||
import { authHdr } from '@/tools/img-hist/img-hist';
|
||||
|
||||
// ---------- 状态 ----------
|
||||
const file = ref<File | null>(null);
|
||||
@@ -51,6 +53,7 @@ onMounted(async () => {
|
||||
// ---------- 最近任务(localStorage 缩略图) ----------
|
||||
interface SETask { id: string; time: number; prompt: string; before: string; after: string; count: number }
|
||||
const tasks = ref<SETask[]>([]);
|
||||
const histRef = ref<InstanceType<typeof ImgHist> | null>(null);
|
||||
const LS_KEY = 'it-ai-text-edit:tasks';
|
||||
|
||||
function loadTasks() {
|
||||
@@ -145,7 +148,7 @@ async function submit() {
|
||||
}
|
||||
const res = await fetch('/relay/ai/seamless-edit', {
|
||||
method: 'POST',
|
||||
headers: licenseHeaders('ai-text-edit'),
|
||||
headers: { ...licenseHeaders('ai-text-edit'), ...authHdr() },
|
||||
body: fd,
|
||||
});
|
||||
const j = await res.json().catch(() => ({}));
|
||||
@@ -167,6 +170,7 @@ async function submit() {
|
||||
tasks.value = tasks.value.slice(0, 12);
|
||||
saveTasks();
|
||||
}
|
||||
histRef.value?.reload();
|
||||
else if (!note.value) {
|
||||
note.value = '未产生结果,请调整描述后重试';
|
||||
}
|
||||
@@ -339,6 +343,7 @@ function clearAll() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ImgHist ref="histRef" kind="seamless" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -349,7 +354,7 @@ function clearAll() {
|
||||
.se-title { font-size: 30px; font-weight: 800; letter-spacing: 2px; }
|
||||
.se-sub { margin-top: 6px; font-size: 13px; opacity: 0.6; }
|
||||
|
||||
.se-grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
|
||||
.se-grid { display: grid; grid-template-columns: 380px 1fr 76px; gap: 16px; align-items: start; }
|
||||
@media (max-width: 900px) { .se-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.se-ctrl { background: #fff; border: 1px solid rgba(128,128,128,0.18); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
|
||||
|
||||
Reference in new issue
Block a user