From b5415630065eeff91c5557559deb3453049d908a Mon Sep 17 00:00:00 2001 From: Kuingsmile <96409857+Kuingsmile@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:58:03 +0800 Subject: [PATCH] :sparkles: Feature(custom): migrate sm.ms to s.ee --- FAQ.md | 4 ++-- FAQ_EN.md | 4 ++-- README.md | 2 +- README_cn.md | 2 +- src/main/apis/delete/smms.ts | 4 ++-- src/main/manage/apis/smms.ts | 22 ++++++++-------------- src/renderer/i18n/locales/en.json | 6 +++--- src/renderer/i18n/locales/zh-CN.json | 6 +++--- src/renderer/i18n/locales/zh-TW.json | 6 +++--- src/renderer/manage/utils/constants.ts | 2 +- 10 files changed, 26 insertions(+), 32 deletions(-) diff --git a/FAQ.md b/FAQ.md index 3eb32015..43846a3d 100644 --- a/FAQ.md +++ b/FAQ.md @@ -24,7 +24,7 @@ PicList 添加的所有新功能未影响 PicGo 的原有功能,因此你可 - 腾讯云 COS - 七牛云 Kodo - 又拍云 -- SM.MS +- S.EE - Imgur - GitHub - WebDav @@ -49,7 +49,7 @@ PicList本体支持了如下图床: - `腾讯云 COS` - `又拍云` - `GitHub` -- `SM.MS` +- `S.EE` - `阿里云 OSS` - `Imgur` - `Webdav` diff --git a/FAQ_EN.md b/FAQ_EN.md index 7d51befc..c26e8b09 100644 --- a/FAQ_EN.md +++ b/FAQ_EN.md @@ -24,7 +24,7 @@ Currently, the supported image hosting platforms are: - Tencent Cloud COS - Qiniu Cloud Kodo - Upyun -- SM.MS +- S.EE - Imgur - GitHub - Webdav @@ -49,7 +49,7 @@ PicList itself supports the following image hosting platforms: - Tencent Cloud COS - Upyun - GitHub -- SM.MS +- S.EE - Aliyun OSS - Imgur - Webdav diff --git a/README.md b/README.md index d762262a..900836bb 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ PicList supports a wide range of storage providers. | **Aliyun OSS** | ✅ | ✅ | | **Tencent COS** | ✅ | ✅ | | **GitHub / Gitee** | ✅ | ✅ | -| **SM.MS / Imgur** | ✅ | ✅ | +| **S.EE / Imgur** | ✅ | ✅ | | **WebDAV / SFTP** | ✅ | ✅ | | **Local File System** | ✅ | ✅ | | **Lsky Pro / Doge Cloud** | ✅ | ✅ | diff --git a/README_cn.md b/README_cn.md index 824b4629..e65e89ee 100644 --- a/README_cn.md +++ b/README_cn.md @@ -145,7 +145,7 @@ PicList 支持广泛的存储提供商。 | **阿里云 OSS** | ✅ | ✅ | | **腾讯云 COS** | ✅ | ✅ | | **GitHub / Gitee** | ✅ | ✅ | -| **SM.MS / Imgur** | ✅ | ✅ | +| **S.EE / Imgur** | ✅ | ✅ | | **WebDAV / SFTP** | ✅ | ✅ | | **本地文件系统** | ✅ | ✅ | | **兰空图床 / 多吉云** | ✅ | ✅ | diff --git a/src/main/apis/delete/smms.ts b/src/main/apis/delete/smms.ts index 917d43ab..1bc9b921 100644 --- a/src/main/apis/delete/smms.ts +++ b/src/main/apis/delete/smms.ts @@ -8,7 +8,7 @@ interface IConfigMap { } export default class SmmsApi { - static readonly #baseUrl = 'https://smms.app/api/v2' + static readonly #baseUrl = 'https://s.ee/api/v1' static async delete(configMap: IConfigMap): Promise { const { hash, config } = configMap @@ -20,7 +20,7 @@ export default class SmmsApi { const { token } = config try { - const response: AxiosResponse = await axios.get(`${SmmsApi.#baseUrl}/delete/${hash}`, { + const response: AxiosResponse = await axios.get(`${SmmsApi.#baseUrl}/file/delete/${hash}`, { headers: { Authorization: token, }, diff --git a/src/main/manage/apis/smms.ts b/src/main/manage/apis/smms.ts index d487afd7..cbbf3de1 100644 --- a/src/main/manage/apis/smms.ts +++ b/src/main/manage/apis/smms.ts @@ -14,7 +14,7 @@ import { isImage } from '~/utils/common' import { commonTaskStatus, IWindowList } from '~/utils/enum' class SmmsApi { - baseUrl = 'https://smms.app/api/v2' + baseUrl = 'https://s.ee/api/v1' token: string axiosInstance: AxiosInstance logger: ManageLogger @@ -43,7 +43,7 @@ class SmmsApi { key: item.path, fileName: item.filename, fileSize: item.size, - formatedTime: new Date(item.created_at).toLocaleString(), + formatedTime: new Date(item.created_at * 1000).toLocaleString(), isDir: false, checked: false, match: false, @@ -71,17 +71,14 @@ class SmmsApi { finished: false, } do { - res = await this.axiosInstance('/upload_history', { + res = await this.axiosInstance('/files', { method: 'GET', - headers: { - 'Content-Type': 'multipart/form-data', - }, params: { page: marker, }, }) if (res && res.status === 200 && res.data && res.data.success) { - if (res.data.Count === 0) { + if (res.data.data.length === 0) { result.success = true result.finished = true window?.webContents.send('refreshFileTransferList', result) @@ -129,18 +126,15 @@ class SmmsApi { nextMarker: '', success: false, } - const res = await this.axiosInstance('/upload_history', { + const res = await this.axiosInstance('/files', { method: 'GET', - headers: { - 'Content-Type': 'multipart/form-data', - }, params: { page: currentPage, }, }) if (res?.status !== 200 || !res?.data?.success) return result - if (res.data.Count === 0) return { ...result, success: true } + if (res.data.data.length === 0) return { ...result, success: true } res.data.data.forEach((item: any) => { result.fullList.push(this.formatFile(item)) @@ -162,7 +156,7 @@ class SmmsApi { * } */ async deleteBucketFile({ DeleteHash }: IStringKeyMap): Promise { - const res = await this.axiosInstance(`/delete/${DeleteHash}`, { + const res = await this.axiosInstance(`/file/delete/${DeleteHash}`, { method: 'GET', params: { hash: DeleteHash, @@ -203,7 +197,7 @@ class SmmsApi { }) const headers = form.getHeaders() headers.Authorization = this.token - const url = `${this.baseUrl}/upload` + const url = `${this.baseUrl}/file/upload` gotUpload(instance, url, 'POST', form, headers, id, this.logger) } return true diff --git a/src/renderer/i18n/locales/en.json b/src/renderer/i18n/locales/en.json index eade1d79..ad7393ac 100644 --- a/src/renderer/i18n/locales/en.json +++ b/src/renderer/i18n/locales/en.json @@ -466,9 +466,9 @@ "webPathTips": "Used to assemble the public URL" }, "smms": { - "explain": "For mainland China, please use the backup domain https://smms.app and avoid sending too many requests in a short time", - "tokenDesc": "SM.MS Token, available in your SM.MS profile", - "tokenPlaceholder": "Please enter SM.MS Token" + "explain": "Migrated to https://s.ee, please use the new API token", + "tokenDesc": "S.EE Token, available in your S.EE profile", + "tokenPlaceholder": "Please enter S.EE Token" }, "specialDesc": "Special configuration", "specialPlaceholder": "Please enter special configuration", diff --git a/src/renderer/i18n/locales/zh-CN.json b/src/renderer/i18n/locales/zh-CN.json index a72ce54b..c09e117e 100644 --- a/src/renderer/i18n/locales/zh-CN.json +++ b/src/renderer/i18n/locales/zh-CN.json @@ -466,9 +466,9 @@ "webPathTips": "用于拼接访问网址" }, "smms": { - "explain": "大陆地区请访问备用域名https://smms.app,不要短时大量请求", - "tokenDesc": "SM.MS Token, 可在 SM.MS 个人中心获取", - "tokenPlaceholder": "请输入 SM.MS Token" + "explain": "已迁移至https://s.ee,请使用新的API token", + "tokenDesc": "S.EE Token, 可在 S.EE 个人中心获取", + "tokenPlaceholder": "请输入 S.EE Token" }, "specialDesc": "特殊配置", "specialPlaceholder": "请输入特殊配置", diff --git a/src/renderer/i18n/locales/zh-TW.json b/src/renderer/i18n/locales/zh-TW.json index 18d1c75e..1a4f361a 100644 --- a/src/renderer/i18n/locales/zh-TW.json +++ b/src/renderer/i18n/locales/zh-TW.json @@ -466,9 +466,9 @@ "webPathTips": "用於拼接對外存取網址" }, "smms": { - "explain": "中國大陸地區請訪問備用網域 https://smms.app,請勿在短時間內大量請求", - "tokenDesc": "SM.MS Token,可在 SM.MS 個人中心取得", - "tokenPlaceholder": "請輸入 SM.MS Token" + "explain": "已遷移至 https://s.ee,請使用新的 API token", + "tokenDesc": "S.EE Token,可在 S.EE 個人中心取得", + "tokenPlaceholder": "請輸入 S.EE Token" }, "specialDesc": "特殊設定", "specialPlaceholder": "請輸入特殊設定", diff --git a/src/renderer/manage/utils/constants.ts b/src/renderer/manage/utils/constants.ts index 404bed06..e745bc6a 100644 --- a/src/renderer/manage/utils/constants.ts +++ b/src/renderer/manage/utils/constants.ts @@ -78,7 +78,7 @@ const isAutoCustomUrlTooltip = t('pages.manage.constant.isAutoCustomUrlTip') export const supportedPicBedList: IStringKeyMap = { smms: { - name: 'SM.MS', + name: 'S.EE', icon: 'smms', configOptions: { alias: {