update at 2026-02-11 12:10:49
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user