Skip to content

Commit

Permalink
v2.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Sep 23, 2024
1 parent 90d30c4 commit 411c807
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 功能升级日志

# 计划
# 2.21.1
- 😄 优化:dall格式图片本地存储(flex,idemgram 不会图片链接过期而找不到 )
- 😄 优化:kling图片本地存储

# 2.20.10
- 😄 新增:模型 `o1-preview` `o1-mini`

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.20.10",
"version": "2.21.1",
"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.20.10"
"version": "2.21.1"
},
"tauri": {
"allowlist": {
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export default {
"forward_up": "Push Forward and Move Up",
"right_turn_forward": "Turn Right and Push Forward",
"left_turn_forward": "Turn Left and Push Forward"
,kling:'Kling'

},
"mjset": {
Expand Down
1 change: 1 addition & 0 deletions src/locales/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export default {
"forward_up": "Avancer et monter",
"right_turn_forward": "Tourner à droite et avancer",
"left_turn_forward": "Tourner à gauche et avancer"
,kling:'Kling'
},
"mjset": {
"server": "Serveur",
Expand Down
1 change: 1 addition & 0 deletions src/locales/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export default {
"forward_up": "앞으로 밀고 위로 이동하기",
"right_turn_forward": "오른쪽으로 돌리고 앞으로 밀기",
"left_turn_forward": "왼쪽으로 돌리고 앞으로 밀기"
,kling:'Kling'
},
"mjset": {
"server": "서버"
Expand Down
1 change: 1 addition & 0 deletions src/locales/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export default {
"forward_up": "Продвинуть вперед и поднять",
"right_turn_forward": "Повернуть вправо и продвинуться вперед",
"left_turn_forward": "Повернуть влево и продвинуться вперед"
,kling:'Kling'

},
"mjset": {
Expand Down
1 change: 1 addition & 0 deletions src/locales/tr-TR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export default {
"forward_up": "İleri it ve yukarı kaldır",
"right_turn_forward": "Sağa dön ve ileri git",
"left_turn_forward": "Sola dön ve ileri git"
,kling:'Kling'
},
"mjset": {
"server": "Sunucu",
Expand Down
1 change: 1 addition & 0 deletions src/locales/vi-VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export default {
"forward_up": "Đẩy tới và di chuyển lên",
"right_turn_forward": "Quay phải và đẩy tới",
"left_turn_forward": "Quay trái và đẩy tới"
,kling:'Kling'
},
"mjset": {
"server": "Máy chủ",
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 @@ -324,6 +324,8 @@ export default {
,forward_up: '推进上移'
,right_turn_forward: '右旋推进'
,left_turn_forward: '左旋推进'

,kling:'可灵'
},

draw: {
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export default {
"forward_up": "推進上移",
"right_turn_forward": "右旋推進",
"left_turn_forward": "左旋推進"
,kling:'可灵'

},
"mjset": {
Expand Down
47 changes: 47 additions & 0 deletions src/views/kling/kgImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<script setup lang="ts">
import { localGet, mlog, url2base64 } from '@/api';
import { ref } from 'vue';
import { LazyImg } from 'vue-waterfall-plugin-next'
const pp= defineProps<{item:any}>();
const emit= defineEmits(['kgSuccess','kgClick']);
const st= ref({uri_base64:'',isLoad:false})
const load = async ()=>{
mlog('kg-Image', pp.item );
if( pp.item.task && pp.item.task.request_id && pp.item.src){
let key= 'kg:'+pp.item.task.request_id;
mlog('key>> ', key );
try {
let base64 = await localGet(key );
if(!base64) {
const ubase64= await url2base64(`https://wsrv.nl/?url=${encodeURIComponent(pp.item.src)}` ,key );
base64= ubase64.base64;
mlog('图片已保存>>', ubase64.key )
}
if(base64) st.value.uri_base64= base64 as string;
} catch (error) {
mlog('图片保存失败',error);
}
}
mlog('图片已保存>>', st.value.uri_base64 )
st.value.isLoad= true
}
load();
</script>

<template>
<LazyImg :url="st.uri_base64?st.uri_base64:pp.item.src" v-if="st.isLoad" @success="emit('kgSuccess')" @click="emit('kgClick', {base64:st.uri_base64, src:pp.item.src} )" />
</template>
12 changes: 11 additions & 1 deletion src/views/kling/kgList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { klingFeed } from '@/api/kling';
import { mlog } from '@/api';
import { SvgIcon } from '@/components/common';
import { t } from '@/locales';
import KgImage from './kgImage.vue';
const list= ref<KlingTask[]>([]);
const list2= ref<ViewCard[]>([]);
Expand Down Expand Up @@ -62,6 +63,14 @@ const goShow=( item:any)=>{
//console.log('goShow', item);
nextTick(() => showImg.value?.click());
}
const goShow2=( item:any)=>{
//console.log('goShow', isMobile );
if( isMobile.value) return ;
st.value.show= true;
st.value.showImg= (item.base64?item.base64: item.src) as string ;
//console.log('goShow', item);
nextTick(() => showImg.value?.click());
}
initLoad();
watch(()=>homeStore.myData.act, (n)=>{
Expand Down Expand Up @@ -99,7 +108,8 @@ const getFeed=( item:any)=>{
<SvgIcon icon="ri:play-fill" />
</a>
</div>
<LazyImg :url="item.src" @success="item.isLoad=1" @click="goShow(item )" v-else-if="item.src" />
<!-- <LazyImg :url="item.src" @success="item.isLoad=1" @click="goShow(item )" v-else-if="item.src" /> -->
<KgImage :item="item" @kg-success="item.isLoad=1" @kg-click="goShow2 " v-else-if="item.src" />
<div v-else class="w-[200px] h-[200px]"></div>


Expand Down
2 changes: 1 addition & 1 deletion src/views/luma/voInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const handleUpdateValue=(v:string)=>{
<n-tab-pane name="runway" tab="Runway">
<RunwayInput />
</n-tab-pane>
<n-tab-pane name="kling" tab="Kling">
<n-tab-pane name="kling" :tab="$t('mj.kling')">
<KlingInput />
</n-tab-pane>
</n-tabs>
Expand Down
7 changes: 4 additions & 3 deletions src/views/mj/dallText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
import { useBasicLayout } from '@/hooks/useBasicLayout'
import { NImage,NButton,NModal,useMessage } from 'naive-ui'
import { computed , ref,watch } from 'vue'
import { localGet,mlog, url2base64 } from '@/api'
import { isDallImageModel, localGet,mlog, url2base64 } from '@/api'
import { homeStore } from '@/store'
const { isMobile } = useBasicLayout()
const st = ref({isLoadImg:false,uri_base64:''})
const props = defineProps<{chat:Chat.Chat}>();
const chat = computed(() =>props.chat);
const load = async ()=>{
mlog('load', chat.value.myid, chat.value.opt?.imageUrl );
if(chat.value.model!='dall-e-3' || !chat.value.myid || !chat.value.opt?.imageUrl ){
mlog('load-dall', chat.value.myid, chat.value.opt?.imageUrl );
//if(chat.value.model!='dall-e-3' || !chat.value.myid || !chat.value.opt?.imageUrl ){
if( !isDallImageModel(chat.value.model) || !chat.value.myid || !chat.value.opt?.imageUrl ){
st.value.isLoadImg=true;
return ;
}
Expand Down

0 comments on commit 411c807

Please sign in to comment.