From e5ed934396a7f76fe65dc2215497f081c2b327ba Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Mar 2026 15:24:45 +0800 Subject: [PATCH] feat: implement History view --- imagecreator/frontend/src/api/history.ts | 21 ++++ imagecreator/frontend/src/views/History.vue | 120 ++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 imagecreator/frontend/src/api/history.ts create mode 100644 imagecreator/frontend/src/views/History.vue diff --git a/imagecreator/frontend/src/api/history.ts b/imagecreator/frontend/src/api/history.ts new file mode 100644 index 0000000..18c5ed2 --- /dev/null +++ b/imagecreator/frontend/src/api/history.ts @@ -0,0 +1,21 @@ +import api from './index' + +export interface HistoryItem { + id: string + original_prompt: string + optimized_prompt: string + mode: string + model: string + image_url: string + input_image_url: string | null + created_at: string +} + +export const historyApi = { + getHistory() { + return api.get('/history') + }, + deleteHistory(id: string) { + return api.delete(`/history/${id}`) + }, +} \ No newline at end of file diff --git a/imagecreator/frontend/src/views/History.vue b/imagecreator/frontend/src/views/History.vue new file mode 100644 index 0000000..34af3a0 --- /dev/null +++ b/imagecreator/frontend/src/views/History.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file