Skip to content

Commit

Permalink
v2.14.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Jan 23, 2024
1 parent 73cc0eb commit e8e6e8f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions api/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = (req, res) => {
,googleId: process.env.TJ_GOOGLE_ID?? ""
, notify : process.env.SYS_NOTIFY?? ""
,disableGpt4 : process.env.DISABLE_GPT4?? ""
,isWsrv: process.env.MJ_IMG_WSRV?? ""

}
}
Expand Down
9 changes: 8 additions & 1 deletion changlog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# 功能升级日志
# 2.14.5 计划

# 计划
- 😄 新增: `temperature``top_p` 补回设置

# 2.14.6
- 😄 新增: 语言版本`法语` `土耳其语` 感谢 @M4K4R PR
- 🐞 修复: 手机端token被遮挡 #98
- 🐞 修复: 环境变量 打开wsrv图片图床 `MJ_IMG_WSRV=1`
- 🐞 修复: midjourney图片 wsrv图床 bug

# 2.14.5
- 😄 新增: midjourney wsrv访问图片
# 2.14.4
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.14.5",
"version": "2.14.6",
"private": false,
"description": "ChatGPT Web Midjourney Proxy",
"author": "Dooy <[email protected]>",
Expand Down
3 changes: 2 additions & 1 deletion service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ router.post('/session', async (req, res) => {
const notify = process.env.SYS_NOTIFY?? "" ;
const disableGpt4 = process.env.DISABLE_GPT4?? "" ;
const isUploadR2 = isNotEmptyString(process.env.R2_DOMAIN);
const isWsrv = process.env.MJ_IMG_WSRV?? ""

const data= { disableGpt4,
const data= { disableGpt4,isWsrv,
notify , baiduId, googleId,isHideServer,isUpload, auth: hasAuth
, model: currentModel(),amodel,isApiGallery,cmodels,isUploadR2
}
Expand Down
10 changes: 5 additions & 5 deletions src/api/mjsave.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gptServerStore } from "@/store";
import { gptServerStore, homeStore } from "@/store";
import localforage from "localforage"
import { mlog } from "./mjapi";

Expand Down Expand Up @@ -69,15 +69,15 @@ export const url2base64= async (url:string,key?:string)=>{
}

export const wsrvUrl=(url:string)=>{
if( url.indexOf('attachments')>0 ){
const arr = url.split('attachments',2);
url= 'https://cdn.discordapp.com/attachments'+ arr[1];
const arr = url.split(/([a-z\-]+)ttachments/ig, 3 );
if( arr.length==3){
url= `https://cdn.discordapp.com/${arr[1]}ttachments`+ arr[2];
}
return `https://wsrv.nl/?url=`+ encodeURIComponent(url);
}

export const mjImgUrl= (url:string)=>{
if (gptServerStore.myData.MJ_CDN_WSRV) return wsrvUrl(url);
if (gptServerStore.myData.MJ_CDN_WSRV || homeStore.myData.session.isWsrv ) return wsrvUrl(url);
return url;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ const buttonDisabled = computed(() => {
const footerClass = computed(() => {
let classes = ['p-4']
if (isMobile.value)
classes = ['sticky', 'left-0', 'bottom-0', 'right-0', 'p-2', 'pr-3', 'overflow-hidden']
classes = ['sticky', 'left-0', 'bottom-0', 'right-0', 'p-2', 'pr-3'] //, 'overflow-hidden'
return classes
})
Expand Down

0 comments on commit e8e6e8f

Please sign in to comment.