diff --git a/changlog.md b/changlog.md index e614bd810..cc766a97c 100644 --- a/changlog.md +++ b/changlog.md @@ -1,6 +1,9 @@ # 功能升级日志 # 计划 +# 2.21.5 +- 🐞 修复:luam、runway视频删除、viggle删除、kling删除、suno删除? #510 + # 2.21.4 - 😄 新增:runway图片增加首尾帧选择 diff --git a/package.json b/package.json index 56431a7f0..740c3b91b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-web-midjourney-proxy", - "version": "2.21.4", + "version": "2.21.5", "private": false, "description": "ChatGPT Web Midjourney Proxy", "author": "Dooy ", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 88be96645..a21e35a8f 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "ChatGPT-MJ", - "version": "2.21.4" + "version": "2.21.5" }, "tauri": { "allowlist": { diff --git a/src/api/klingStore.ts b/src/api/klingStore.ts index d26083037..4f1873f8b 100644 --- a/src/api/klingStore.ts +++ b/src/api/klingStore.ts @@ -55,4 +55,13 @@ export class klingStore{ let arr= this.getObjs(); return arr[i] } + public delete( id:string ){ + //if(!obj.data.task_id ) throw "id must"; + let arr= this.getObjs(); + let i= arr.findIndex( v=>v.data.task_id==id ); + if(i<0) return false + arr.splice(i, 1); + ss.set(this.localKey, arr ); + return true; + } } \ No newline at end of file diff --git a/src/api/lumaStore.ts b/src/api/lumaStore.ts index e0d32d35e..6a70295b2 100644 --- a/src/api/lumaStore.ts +++ b/src/api/lumaStore.ts @@ -40,6 +40,15 @@ export class lumaStore{ if(!obj) return []; return obj; } + public delete( obj:LumaMedia ){ + if(!obj.id ) throw "id must"; + let arr= this.getObjs(); + let i= arr.findIndex( v=>v.id==obj.id ); + if(i<0) return false + arr.splice(i, 1); + ss.set(this.localKey, arr ); + return true; + } } export type LumaHk={ diff --git a/src/api/runwayStore.ts b/src/api/runwayStore.ts index bf2000211..733dc47bc 100644 --- a/src/api/runwayStore.ts +++ b/src/api/runwayStore.ts @@ -102,4 +102,13 @@ export class runwayStore{ let arr= this.getObjs(); return arr[i] } + public delete( obj:RunwayTask ){ + if(!obj.id ) throw "id must"; + let arr= this.getObjs(); + let i= arr.findIndex( v=>v.id==obj.id ); + if(i<0) return false + arr.splice(i, 1); + ss.set(this.localKey, arr ); + return true; + } } \ No newline at end of file diff --git a/src/api/sunoStore.ts b/src/api/sunoStore.ts index 1118004f9..4e402e63f 100644 --- a/src/api/sunoStore.ts +++ b/src/api/sunoStore.ts @@ -58,4 +58,13 @@ export class sunoStore{ if(!obj) return []; return obj; } + public delete( obj:SunoMedia ){ + if(!obj.id ) throw "id must"; + let arr= this.getObjs(); + let i= arr.findIndex( v=>v.id==obj.id ); + if(i<0) return false + arr.splice(i, 1); + ss.set(this.localKey, arr ); + return true; + } } \ No newline at end of file diff --git a/src/api/viggleStore.ts b/src/api/viggleStore.ts index 07a191cf9..b30c981e1 100644 --- a/src/api/viggleStore.ts +++ b/src/api/viggleStore.ts @@ -46,4 +46,15 @@ export class viggleStore{ let arr= this.getObjs(); return arr[i] } + + public delete( obj:ViggleTask ){ + if(!obj.taskID ) throw "id must"; + let arr= this.getObjs(); + let i= arr.findIndex( v=>v.taskID==obj.taskID ); + if(i<0) return false + arr.splice(i, 1); + ss.set(this.localKey, arr ); + return true; + } + } \ No newline at end of file diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index ca697cf81..7104f69b8 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -232,6 +232,7 @@ export default { rtservererror: 'WebSocket connection server error!', rtservererror2: 'Recording is not supported, it may be due to device reasons!', rtconecting: 'Connecting to the server' + ,confirmDelete:'Are you sure?' }, "mjset": { diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 4bd1a7d45..3649be81e 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -336,6 +336,8 @@ export default { ,rtservererror:'websocket 连接服务器错误!' ,rtservererror2:'不支持录音,可能是设备原因!' ,rtconecting:'正在连接服务器' + + ,confirmDelete:'确认要删除?' }, draw: { diff --git a/src/views/kling/kgList.vue b/src/views/kling/kgList.vue index bc11c6aa0..be67b7100 100644 --- a/src/views/kling/kgList.vue +++ b/src/views/kling/kgList.vue @@ -4,7 +4,7 @@ import 'vue-waterfall-plugin-next/dist/style.css' import { KlingTask, klingStore } from '@/api/klingStore'; import { nextTick, ref, watch } from 'vue'; -import {NEmpty ,NButton,NPopover, NButtonGroup,NSpin, NImage} from "naive-ui" +import {NEmpty ,NButton,NPopover, NButtonGroup,NSpin, NImage,NPopconfirm,useMessage} from "naive-ui" import { ViewCard } from 'vue-waterfall-plugin-next/dist/types/types/waterfall'; import { useBasicLayout } from '@/hooks/useBasicLayout'; import { homeStore } from '@/store'; @@ -19,6 +19,7 @@ const list2= ref([]); const st =ref({show:true ,showImg:'' ,isLoad:false,pIndex:-1,isStart:true }); const csuno= new klingStore() +const ms= useMessage() const initLoad=()=>{ let arr = csuno.getObjs(); list.value= arr.reverse() @@ -83,7 +84,14 @@ const getFeed=( item:any)=>{ mlog('item', item ) klingFeed( item.task.data.task_id, item.task.cat, item.task.prompt ) } -// + +const deleteGo=(item:any)=>{ + mlog('deleteGo',item ) + if( csuno.delete( item.id)){ + ms.success( t('common.deleteSuccess')) + initLoad() + } +}
-
+
- + +
+
+ + + {{ $t('mj.confirmDelete') }} +
diff --git a/src/views/luma/runwayList.vue b/src/views/luma/runwayList.vue index 1bd6630c4..95ca51ab5 100644 --- a/src/views/luma/runwayList.vue +++ b/src/views/luma/runwayList.vue @@ -1,12 +1,14 @@