Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Jan 23, 2024
2 parents cb0d1d0 + 92ef7d8 commit 30443c6
Show file tree
Hide file tree
Showing 17 changed files with 155 additions and 55 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## :tada: 2.7.2 (2024-01-23)


### :sparkles: Features

* **custom:** add build-in aws s3 support, add endpoint for upyun ([efc6a16](https://github.com/Kuingsmile/piclist/commit/efc6a16)), closes [#143](https://github.com/Kuingsmile/piclist/issues/143) [#134](https://github.com/Kuingsmile/piclist/issues/134)
* **custom:** add new area support for qiniu cloud ([89fc032](https://github.com/Kuingsmile/piclist/commit/89fc032))
* **custom:** manage page auto import support build-in s3 ([48ec494](https://github.com/Kuingsmile/piclist/commit/48ec494))
* **custom:** support build-in s3 remote delete ([d1e2792](https://github.com/Kuingsmile/piclist/commit/d1e2792))


### :bug: Bug Fixes

* **custom:** fix gallery copy bug of aws-s3 ([0e81ccd](https://github.com/Kuingsmile/piclist/commit/0e81ccd))
* **custom:** fix s3 remote delete bug when url is modified locally ([58248bc](https://github.com/Kuingsmile/piclist/commit/58248bc))
* **custom:** update formatConvertObj to use JSON.stringify ([719e74f](https://github.com/Kuingsmile/piclist/commit/719e74f))


### :pencil: Documentation

* **custom:** update FAQ ([c6dc1ea](https://github.com/Kuingsmile/piclist/commit/c6dc1ea))
* **custom:** update version changelog ([9e69702](https://github.com/Kuingsmile/piclist/commit/9e69702))



## :tada: 2.7.1 (2024-01-15)


Expand Down
7 changes: 4 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ PicList所有新功能的添加没有影响到PicGo的原有功能,所以你
PicList本体支持了如下图床:

- `七牛图床`
- `AWS S3 兼容平台`
- `腾讯云 COS`
- `又拍云`
- `GitHub`
Expand Down Expand Up @@ -125,7 +126,7 @@ PicList兼容绝大部分的PicGo插件。然而由于PicList使用了更新的e

### docker run

修改`./piclist`为你自己的路径,修改`piclist123456`为你自己的密钥。
修改 `./piclist`为你自己的路径,修改 `piclist123456`为你自己的密钥。

```bash
docker run -d \
Expand All @@ -139,7 +140,7 @@ docker run -d \

### docker-compose

下载piclist-core仓库的`docker-compose.yml`文件,或者复制以下内容到`docker-compose.yml`文件中:
下载piclist-core仓库的 `docker-compose.yml`文件,或者复制以下内容到 `docker-compose.yml`文件中:

```yaml
version: '3.3'
Expand All @@ -156,7 +157,7 @@ services:
command: node /usr/local/bin/picgo-server -k piclist123456
```
你可以修改`volumes`为你自己的路径,修改`command`为你自己的密钥。
你可以修改 `volumes`为你自己的路径,修改 `command`为你自己的密钥。

然后运行

Expand Down
1 change: 1 addition & 0 deletions FAQ_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Yes. With the newly added image hosting management function, you can upload file
PicList itself supports the following image hosting platforms:

- Qiniu Cloud
- AWS S3 compatible platform
- Tencent Cloud COS
- Upyun
- GitHub
Expand Down
17 changes: 7 additions & 10 deletions currentVersion.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
✨ Features

- 新增内置兰空图床上传和删除支持
- Webdav图床现在支持设置URL参数后缀
- 现在支持指定每种图片格式对应的转换后格式
- 现在默认启用mozJPEG编码器以减小文件体积
- 现在打开手册页面会询问打开方式
- 优化了重命名选项的提示
- 更新提示窗口现在提供跳转至版本发布页手动下载的选项
- 新增内置S3 API兼容平台支持
- 现在又拍云图床支持自定义接口地址
- 七牛云新建存储桶新增`亚太-河内`支持

🐛 Bug Fixes

- 修复了sftp图床上传相同文件名的图片会报错的问题
- 修复了imgur图床转换格式为webp时,文件名错误的问题
- 修复了部分i18n错误的问题
- 修复了修改s3图床相册链接后,拷贝图片链接没有对应修改的问题
- 修复了修改s3图床相册连接后,云端删除失效的问题
- 修复了设置精细转换格式时的序列化错误
- 修复了界面翻译错误
22 changes: 12 additions & 10 deletions currentVersion_en.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
✨ Features

- Add built-in Lsky Pro image bed upload and delete support
- Webdav image bed now supports setting URL parameter suffix
- Now you can specify the converted format for each image format
- Now enable the mozJPEG encoder by default to reduce file size
- Now the open manual page will ask for the open method
- Optimize the prompt of the rename option
- The update prompt window now provides an option to jump to the version release page to download manually
- Add support for built-in S3 API compatible platform
- Upyun now supports custom interface addresses
- Qiniu Cloud new bucket supports `Asia-Pacific-Hanoi`

🐛 Bug Fixes

- Fixed the problem that uploading images with the same file name to the sftp image bed will report an error
- Fixed the problem that the file name is incorrect when converting the format of the imgur image bed to webp
- Fixed some i18n errors
- 修复了修改s3图床相册链接后,拷贝图片链接没有对应修改的问题
- 修复了修改s3图床相册连接后,云端删除失效的问题
- 修复了设置精细转换格式时的序列化错误
- 修复了界面翻译错误

- Fix the problem that the copied image link is not modified after modifying the s3 album link
- Fixed the problem that the cloud deletion is invalid after modifying the s3 album connection
- Fixed serialization error when setting fine conversion format
- Fixed interface translation error
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "piclist",
"version": "2.7.1",
"version": "2.7.2",
"author": {
"name": "Kuingsmile",
"email": "[email protected]"
Expand Down Expand Up @@ -68,7 +68,7 @@
"multer": "^1.4.5-lts.1",
"node-ssh-no-cpu-features": "^1.0.1",
"nodejs-file-downloader": "^4.12.1",
"piclist": "^1.7.6",
"piclist": "^1.7.7",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.0",
"proxy-agent": "^5.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ app.config.globalProperties.$builtInPicBed = [
'sftpplist',
'telegraphplist',
'piclist',
'lskyplist'
'lskyplist',
'aws-s3-plist'
]

app.config.globalProperties.$$db = db
Expand Down
3 changes: 2 additions & 1 deletion src/main/manage/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const QiniuAreaCodeName : IStringKeyMap = {
z2: '华南-广东',
na0: '北美-洛杉矶',
as0: '亚太-新加坡',
'ap-northeast-1': '亚太-首尔'
'ap-northeast-1': '亚太-首尔',
'ap-southeast-2': '亚太-河内'
}

const TencentAreaCodeName : IStringKeyMap = {
Expand Down
7 changes: 5 additions & 2 deletions src/main/utils/deleteFunc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ async function getDogeToken (accessKey: string, secretKey: string): Promise<{} |

export async function removeFileFromS3InMain (configMap: IStringKeyMap, dogeMode: boolean = false) {
try {
const { imgUrl, config: { accessKeyID, secretAccessKey, bucketName, endpoint, pathStyleAccess, rejectUnauthorized, proxy } } = configMap
let { config: { region } } = configMap
const { url: rawUrl, type, config: { accessKeyID, secretAccessKey, bucketName, endpoint, pathStyleAccess, rejectUnauthorized, proxy } } = configMap
let { imgUrl, config: { region } } = configMap
if (type === 'aws-s3' || type === 'aws-s3-plist') {
imgUrl = rawUrl || imgUrl || ''
}
const url = new URL(!/^https?:\/\//.test(imgUrl) ? `http://${imgUrl}` : imgUrl)
let fileKey = url.pathname.replace(/^\/+/, '')
if (pathStyleAccess) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/utils/pasteTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const formatCustomLink = (customLink: string, item: ImgInfo) => {

export default async (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) => {
let url = item.url || item.imgUrl
url = handleUrlEncodeWithSetting(item.url || item.imgUrl)
if (item.type === 'aws-s3' || item.type === 'aws-s3-plist') {
url = item.imgUrl || item.url || ''
}
url = handleUrlEncodeWithSetting(url)
const useShortUrl = db.get('settings.useShortUrl') || false
if (useShortUrl) {
url = await generateShortUrl(url)
Expand Down
1 change: 1 addition & 0 deletions src/renderer/apis/allApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import LskyplistApi from './lskyplist'
const apiMap: IStringKeyMap = {
aliyun: AliyunApi,
'aws-s3': AwsS3Api,
'aws-s3-plist': AwsS3Api,
github: GithubApi,
imgur: ImgurApi,
local: LocalApi,
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/manage/pages/logIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ function handleConfigImport (alias: string) {
async function getCurrentConfigList () {
await manageStore.refreshConfig()
const configList = await getPicBedsConfig<any>('uploader') ?? {}
const pbList = ['aliyun', 'aws-s3', 'github', 'imgur', 'local', 'qiniu', 'sftpplist', 'smms', 'tcyun', 'upyun', 'webdavplist']
const pbList = ['aliyun', 'aws-s3', 'aws-s3-plist', 'github', 'imgur', 'local', 'qiniu', 'sftpplist', 'smms', 'tcyun', 'upyun', 'webdavplist']
const filteredConfigList = pbList.flatMap((pb) => {
const config = configList[pb]
Expand Down Expand Up @@ -615,7 +615,7 @@ async function transUpToManage (config: IUploaderConfigListItem, picBedName: str
? 'webdav'
: picBedName === 'sftpplist'
? 'sftp'
: picBedName === 'aws-s3'
: picBedName === 'aws-s3' || picBedName === 'aws-s3-plist'
? 's3plist'
: picBedName}-${config._configName ?? 'Default'}-imp`
if (!autoImportPicBed.includes(picBedName) || isImported(alias)) return
Expand Down Expand Up @@ -797,6 +797,7 @@ async function transUpToManage (config: IUploaderConfigListItem, picBedName: str
delete resultMap.paging
break
case 'aws-s3':
case 'aws-s3-plist':
if (!config.accessKeyID || !config.secretAccessKey) return
Object.assign(resultMap, {
...commonConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/pages/PicGoSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ function handleSaveConfig () {
return imageExtList.includes(item[0]) && availableFormat.includes(item[1])
})
const formatConvertObjFilter = Object.fromEntries(formatConvertObjEntriesFilter)
compressForm.formatConvertObj = formatConvertObjFilter
compressForm.formatConvertObj = JSON.stringify(formatConvertObjFilter)
saveConfig('buildIn.compress', toRaw(compressForm))
saveConfig('buildIn.watermark', toRaw(waterMarkForm))
closeDialog()
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/pages/TrayPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ async function copyTheLink (item: ImgInfo) {
async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) {
let url = item.url || item.imgUrl
if (item.type === 'aws-s3' || item.type === 'aws-s3-plist') {
url = item.imgUrl || item.url || ''
}
if ((await getConfig('settings.encodeOutputURL')) === true) {
url = handleUrlEncode(url)
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/pages/Upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ function handleSaveConfig () {
return imageExtList.includes(item[0]) && availableFormat.includes(item[1])
})
const formatConvertObjFilter = Object.fromEntries(formatConvertObjEntriesFilter)
compressForm.formatConvertObj = formatConvertObjFilter
compressForm.formatConvertObj = JSON.stringify(formatConvertObjFilter)
saveConfig('buildIn.compress', toRaw(compressForm))
saveConfig('buildIn.watermark', toRaw(waterMarkForm))
closeDialog()
Expand Down
3 changes: 2 additions & 1 deletion src/universal/utils/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ export const picBedsCanbeDeleted = [
'huaweicloud-uploader',
'alist',
'piclist',
'lskyplist'
'lskyplist',
'aws-s3-plist'
]
Loading

0 comments on commit 30443c6

Please sign in to comment.