diff --git a/changlog.md b/changlog.md index 8aae5afb4b..ef58db7027 100644 --- a/changlog.md +++ b/changlog.md @@ -1,6 +1,10 @@ # 功能升级日志 # 计划 +# 2.21.9 +- 😄 新增:mj 默认版本为6.1,填写的有保存下次打开 可以重新载入 +- 🐞 修复:默认语言(第一次载入的时候)会根据浏览器语言对应,目前支持 中文简体、英语、中文繁体、法语、俄语、韩语、土耳其语、越南语 如果没在这个列表内则为英语 + # 2.21.8 - 😄 新增:flux.1.1-pro 画图模型 - 😄 新增:runway3 支持 参考视频 diff --git a/package.json b/package.json index c928b4c466..a16e51bd76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-web-midjourney-proxy", - "version": "2.21.8", + "version": "2.21.9", "private": false, "description": "ChatGPT Web Midjourney Proxy", "author": "Dooy ", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f35d7f23aa..3b3252f34a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "ChatGPT-MJ", - "version": "2.21.8" + "version": "2.21.9" }, "tauri": { "allowlist": { diff --git a/src/store/modules/app/helper.ts b/src/store/modules/app/helper.ts index 88411bfc8f..85c2643240 100644 --- a/src/store/modules/app/helper.ts +++ b/src/store/modules/app/helper.ts @@ -14,7 +14,26 @@ export interface AppState { } export function defaultSetting(): AppState { - return { siderCollapsed: false, theme: homeStore.myData.session.theme=='light'?'light': 'auto', language: 'zh-CN' } + const userLang = navigator.language || navigator.userLanguage; + let content:Language= 'en-US'; + if (userLang.startsWith('zh-HK') || userLang.startsWith('zh-TW')) { + content = 'zh-TW'; // 繁体中文 + } else if (userLang.startsWith('zh')) { + content = 'zh-CN'; // 简体中文 + } else if (userLang.startsWith('fr')) { + content = 'fr-FR'; // 法语 + } else if (userLang.startsWith('ko')) { + content = 'ko-KR'; // 韩语 + } else if (userLang.startsWith('ru')) { + content = 'ru-RU'; // 俄文 + } else if (userLang.startsWith('vi')) { + content = 'vi-VN'; // 越南语 + } else if (userLang.startsWith('tr')) { + content = 'tr-TR'; // 土耳其语 + } else { + content = 'en-US'; // 英语 + } + return { siderCollapsed: false, theme: homeStore.myData.session.theme=='light'?'light': 'auto', language: content } } export function getLocalSetting(): AppState { diff --git a/src/views/mj/aiDrawInputItem.vue b/src/views/mj/aiDrawInputItem.vue index d295f8b816..644302f4ac 100644 --- a/src/views/mj/aiDrawInputItem.vue +++ b/src/views/mj/aiDrawInputItem.vue @@ -21,7 +21,7 @@ const vf=[{s:'width: 100%; height: 100%;',label:'1:1'} ,{s:'width: 50%; height: 100%;',label:'9:16'} ]; -const f=ref({bili:-1, quality:'',view:'',light:'',shot:'',style:'', styles:'',version:'--v 6.0',sref:'',cref:'',cw:'',}); +const f=ref({bili:-1, quality:'',view:'',light:'',shot:'',style:'', styles:'',version:'--v 6.1',sref:'',cref:'',cw:'',}); const st =ref({text:'',isDisabled:false,isLoad:false ,fileBase64:[],bot:'',showFace:false,upType:'' }); @@ -203,8 +203,22 @@ watch(()=>homeStore.myData.act,(n)=>{ // n=='copy' && copy2(); n=='same2' && same2(); }); +watch(()=>f.value,(n)=>{ + mlog("变化", n ) + localStorage.setItem("mjinput", JSON.stringify(n)) +},{deep:true} ); onMounted(()=>{ homeStore.myData.act=='same2' && same2(); + + let minput= localStorage.getItem('mjinput') + if(minput ){ + try { + const a=JSON.parse(minput) + f.value=a + } catch (error) { + mlog("错误", error ) + } + } }); diff --git a/src/views/mj/aiModel.vue b/src/views/mj/aiModel.vue index 3650f53735..0dded84b66 100644 --- a/src/views/mj/aiModel.vue +++ b/src/views/mj/aiModel.vue @@ -18,7 +18,7 @@ model:[ 'gpt-4-turbo-2024-04-09','o1-preview','o1-mini','o1-preview-2024-09-12', ,`gpt-4-vision-preview`,`gpt-3.5-turbo-1106` ,'gpt-3.5-turbo-0125' ,'gpt-3.5-turbo-0301','gpt-3.5-turbo-0613','gpt-4-all','gpt-3.5-net' ,'gemini-pro',"gemini-pro-vision",'gemini-pro-1.5',"gemini-1.5-pro-exp-0801" -,'claude-3-5-sonnet-20241022','claude-3-sonnet-20240229','claude-3-opus-20240229','claude-3-haiku-20240307','claude-3-5-sonnet-20240620','','suno-v3' +,'claude-3-5-sonnet-20241022','claude-3-sonnet-20240229','claude-3-opus-20240229','claude-3-haiku-20240307','claude-3-5-sonnet-20240620','suno-v3' ] ,maxToken:4096 });