Skip to content

Commit

Permalink
2.21.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Oct 12, 2024
1 parent 1c8c6b8 commit 110f883
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 12 deletions.
3 changes: 3 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 功能升级日志

# 计划
# 2.21.5
- 🐞 修复:luam、runway视频删除、viggle删除、kling删除、suno删除? #510

# 2.21.4
- 😄 新增:runway图片增加首尾帧选择

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "ChatGPT-MJ",
"version": "2.21.4"
"version": "2.21.5"
},
"tauri": {
"allowlist": {
Expand Down
9 changes: 9 additions & 0 deletions src/api/klingStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
9 changes: 9 additions & 0 deletions src/api/lumaStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
9 changes: 9 additions & 0 deletions src/api/runwayStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
9 changes: 9 additions & 0 deletions src/api/sunoStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
11 changes: 11 additions & 0 deletions src/api/viggleStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
1 change: 1 addition & 0 deletions src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 2 additions & 0 deletions src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ export default {
,rtservererror:'websocket 连接服务器错误!'
,rtservererror2:'不支持录音,可能是设备原因!'
,rtconecting:'正在连接服务器'

,confirmDelete:'确认要删除?'
},

draw: {
Expand Down
22 changes: 18 additions & 4 deletions src/views/kling/kgList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -19,6 +19,7 @@ const list2= ref<ViewCard[]>([]);
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()
Expand Down Expand Up @@ -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()
}
}
</script>
<template>
<div v-if="list.length>0" class="p-4">
Expand Down Expand Up @@ -122,9 +130,15 @@ const getFeed=( item:any)=>{
</template>

<section v-if="item.task.prompt" class="absolute w-full bottom-0 backdrop-blur-sm text-white/70 " :class="item.src?['invisible', 'group-hover/item:visible']:[]">
<div class="p-3">
<div class="p-3 flex justify-between items-baseline">
<div class="line-clamp-2 text-[13px]">
<template v-if="item.task.prompt">{{ item.task.prompt }}</template>
<template v-if="item.task.prompt">{{ item.task.prompt }}</template>
</div>
<div>
<n-popconfirm @positive-click="()=>deleteGo(item)" placement="bottom">
<template #trigger> <SvgIcon icon="mdi:delete" /></template>
{{ $t('mj.confirmDelete') }}
</n-popconfirm>
</div>
</div>
</section>
Expand Down
21 changes: 20 additions & 1 deletion src/views/luma/runwayList.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script setup lang="ts">
import { RunwayTask, runwayStore } from '@/api/runwayStore';
import { ref, watch } from 'vue';
import {NEmpty ,NButton,NPopover, NButtonGroup} from "naive-ui"
import {NEmpty ,NButton,NPopover, NButtonGroup, useMessage,NPopconfirm} from "naive-ui"
import {runwayFeed} from "@/api/runway"
import { mlog } from '@/api';
import { homeStore } from '@/store';
import {SvgIcon} from '@/components/common'
import { t } from '@/locales';
const ms= useMessage();
const mapRef = ref(new Map<string, number>());
const st= ref({pIndex:-1});
Expand Down Expand Up @@ -52,13 +54,24 @@ const reRunwayFeed= async(id:string)=>{
mapRef.value.delete( id)
}
const deleteGo=(item:RunwayTask)=>{
mlog('deleteGo',item )
if( csuno.delete( item)){
ms.success( t('common.deleteSuccess'))
initLoad()
}
}
initLoad();
</script>
<template>
<div v-if="list.length>0" class="p-4">
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3">
<div v-for="(item, index) in list" :key="index" class="relative" @mousemove="st.pIndex=index" @mouseout="st.pIndex=-1">
<div class="relative flex items-center justify-center bg-white bg-opacity-10 rounded-[16px] overflow-hidden aspect-[16/8.85] ">

<template v-if="item.artifacts && item.artifacts.length>0 && item.artifacts[0].url">
<div v-if="mapRef.has(item.id) ">
<NButton size="small" type="primary" @click="reRunwayFeed( item.id )" >{{$t('video.repeat2')}}</NButton>
Expand Down Expand Up @@ -115,6 +128,12 @@ initLoad();

<n-button-group size="tiny">
<n-button size="tiny" round ghost @click="RunwayTaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button>
<n-button size="tiny" round ghost >
<n-popconfirm @positive-click="()=>deleteGo(item)" placement="bottom">
<template #trigger> <SvgIcon icon="mdi:delete" /></template>
{{ $t('mj.confirmDelete') }}
</n-popconfirm>
</n-button>
<n-button size="tiny" round ghost @click="extend( item )" ><SvgIcon icon="ri:video-add-line" /> {{ $t('video.extend') }}</n-button>
<!-- <n-button size="tiny" round ghost @click="RunwayTaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button> -->

Expand Down
18 changes: 16 additions & 2 deletions src/views/luma/voList.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<script setup lang="ts">
import { LumaMedia, lumaStore } from '@/api/lumaStore';
import { computed, ref, watch } from 'vue';
import {NEmpty ,NButton,NPopover, NTag,NButtonGroup } from 'naive-ui'
import {NEmpty ,NButton,NPopover, NTag,NButtonGroup,useMessage,NPopconfirm } from 'naive-ui'
import {FeedLumaTask, lumaFetch, mlog} from '@/api';
import { homeStore } from '@/store';
import {SvgIcon} from '@/components/common'
import { myTestTranscode } from '@/api/mp4img';
import { t } from '@/locales';
//import { myTestTranscode } from '@/api/mp4img';
const st= ref({pIndex:-1});
const list= ref<LumaMedia[]>([]);
const csuno= new lumaStore()
const ms= useMessage()
const initLoad=()=>{
let arr = csuno.getObjs();
list.value= arr.reverse()
Expand Down Expand Up @@ -53,7 +55,13 @@ const extend= async(item:LumaMedia )=>{
watch(()=>homeStore.myData.act, (n)=>{
if(n=='FeedLumaTask') initLoad()
});
const deleteGo=(item:LumaMedia)=>{
mlog('deleteGo',item )
if( csuno.delete( item)){
ms.success( t('common.deleteSuccess'))
initLoad()
}
}
initLoad();
</script>
<template>
Expand Down Expand Up @@ -93,6 +101,12 @@ initLoad();
<n-button-group size="tiny">
<n-button size="tiny" round ghost @click="FeedLumaTaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button>
<n-button size="tiny" round ghost >
<n-popconfirm @positive-click="()=>deleteGo(item)" placement="bottom">
<template #trigger> <SvgIcon icon="mdi:delete" /></template>
{{ $t('mj.confirmDelete') }}
</n-popconfirm>
</n-button>
<n-button size="tiny" round ghost @click="extend( item )" ><SvgIcon icon="ri:video-add-line" /> {{ $t('video.extend') }}</n-button>
</n-button-group>
<!-- <a :href="item.video?.download_url? item.video?.download_url:item.video?.url" download target="_blank" v-if="item.video?.url|| item.video?.download_url" ><SvgIcon icon="mdi:download" class="cursor-pointer"/></a> -->
Expand Down
16 changes: 15 additions & 1 deletion src/views/suno/mcList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { sunoStore, SunoMedia} from '@/api/sunoStore';
import playui from './playui.vue';
import { homeStore } from '@/store';
import { mlog } from '@/api';
import {NEmpty, NImage ,useMessage} from "naive-ui"
import {NEmpty, NImage ,useMessage,NPopconfirm} from "naive-ui"
import { FeedTask } from '@/api/suno';
import { t } from '@/locales';
const list= ref<SunoMedia[]>([]);
const csuno= new sunoStore()
Expand Down Expand Up @@ -72,6 +73,15 @@ const getExSuno=(id:string)=>{
const update = (v:any )=>{
sp.value=v
}
const deleteGo=(v:SunoMedia)=>{
mlog('deleteGo', v)
if(csuno.delete(v)) {
ms.success( t('common.deleteSuccess'))
initLoad();
}
}
initLoad();
</script>
Expand Down Expand Up @@ -129,6 +139,10 @@ initLoad();
<div @click="extend(item)" class="text-[8px] flex items-center border-[1px] border-gray-500/30 px-1 list-none rounded-md cursor-pointer">{{ $t('suno.extend') }}</div>
</template>
<div class="text-[8px] flex items-center border-[1px] border-gray-500/30 px-1 list-none rounded-md" v-if="item.major_model_version"> {{item.major_model_version}}</div>
<n-popconfirm @positive-click="()=>deleteGo(item)" placement="bottom">
<template #trigger><SvgIcon icon="mdi:delete" class="cursor-pointer" /></template>
{{ $t('mj.confirmDelete') }}
</n-popconfirm>
<SvgIcon icon="mdi:play-circle-outline" class="cursor-pointer" @click="goPlay( item )" />
<a :href="item.audio_url" download target="_blank"><SvgIcon icon="mdi:download" class="cursor-pointer"/></a>
</div>
Expand Down
18 changes: 16 additions & 2 deletions src/views/viggle/dcList.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script setup lang="ts">
import { FeedViggleTask } from '@/api/viggle';
import { ViggleTask, viggleStore } from '@/api/viggleStore';
import {NEmpty ,NButton,NPopover, NTag,NButtonGroup } from 'naive-ui'
import {NEmpty ,NButton,NPopover, NTag,NButtonGroup,useMessage ,NPopconfirm} from 'naive-ui'
import { ref, watch } from 'vue';
import {SvgIcon} from "@/components/common"
import { homeStore } from '@/store';
import { t } from '@/locales';
const st= ref({pIndex:-1});
const list= ref<ViggleTask[]>([]);
const ms = useMessage();
const csuno = new viggleStore()
const initLoad=()=>{
let arr = csuno.getObjs();
Expand All @@ -31,6 +32,13 @@ const TaskDown=async (item:ViggleTask)=>{
watch(()=>homeStore.myData.act, (n)=>{
if(n=='FeedViggleTask') initLoad()
});
const deleteGo=(v:ViggleTask)=>{
if(csuno.delete(v)) {
ms.success( t('common.deleteSuccess'))
initLoad();
}
}
initLoad()
</script>
<template>
Expand Down Expand Up @@ -69,6 +77,12 @@ initLoad()
<n-button-group size="tiny">
<n-button size="tiny" round ghost @click="TaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button>
<!-- <n-button size="tiny" round ghost ><SvgIcon icon="ri:video-add-line" /> {{ $t('video.extend') }}</n-button> -->
<n-button size="tiny" round ghost >
<n-popconfirm @positive-click="()=>deleteGo(item)" placement="bottom">
<template #trigger> <SvgIcon icon="mdi:delete" /></template>
{{ $t('mj.confirmDelete') }}
</n-popconfirm>
</n-button>
</n-button-group>
<!-- <a :href="item.video?.download_url? item.video?.download_url:item.video?.url" download target="_blank" v-if="item.video?.url|| item.video?.download_url" ><SvgIcon icon="mdi:download" class="cursor-pointer"/></a> -->
</div>
Expand Down

0 comments on commit 110f883

Please sign in to comment.