update at 2026-02-11 12:10:49

This commit is contained in:
douboer
2026-02-11 12:10:49 +08:00
parent 5e4fffbce4
commit 0dbb991522
3 changed files with 31 additions and 4 deletions

View File

@@ -104,7 +104,9 @@ async function savePngToAlbum(filePath) {
return { success: true }
} catch (error) {
const errMsg = String(error && error.errMsg ? error.errMsg : error)
const needAuth = errMsg.includes('auth deny') || errMsg.includes('authorize')
const lowerErrMsg = errMsg.toLowerCase()
const needAuth = lowerErrMsg.includes('auth deny') || lowerErrMsg.includes('authorize')
const privateApiBanned = lowerErrMsg.includes('private api banned')
if (needAuth) {
const modalRes = await showModal({
@@ -120,6 +122,10 @@ async function savePngToAlbum(filePath) {
return {
success: false,
needAuth,
privateApiBanned,
reason: privateApiBanned
? 'private_api_banned'
: (needAuth ? 'auth_denied' : 'save_failed'),
error,
}
}