diff --git a/Client/src/api/folders.ts b/Client/src/api/folders.ts index 1cfdee5..b57849c 100644 --- a/Client/src/api/folders.ts +++ b/Client/src/api/folders.ts @@ -32,8 +32,8 @@ export interface FolderPhotoList { overQuota: boolean } -/** 上传失败的可区分原因 */ -export type UploadError = 'too-large' | 'bad-type' | 'failed' +/** 上传失败的可区分原因(同 photos.ts,多 'full' 对应 409) */ +export type UploadError = 'full' | 'too-large' | 'bad-type' | 'failed' /** 列出文件夹内所有图片,含配额信息 */ export async function listFolderPhotos( diff --git a/Client/src/components/PhotoWallPage.tsx b/Client/src/components/PhotoWallPage.tsx index 4f48b68..2b96322 100644 --- a/Client/src/components/PhotoWallPage.tsx +++ b/Client/src/components/PhotoWallPage.tsx @@ -181,7 +181,6 @@ export function PhotoWallPage({ onExit, token, folderName, isAdmin, onForbidden const [quotaBytes, setQuotaBytes] = useState(0) const [overQuota, setOverQuota] = useState(false) const [maxItems, setMaxItems] = useState(0) - const [itemCount, setItemCount] = useState(0) // 右键菜单滑条:旋转步长 / 缩放步长 const [rotStep, setRotStep] = useState(15) const [zoomStepPx, setZoomStepPx] = useState(30) @@ -271,7 +270,6 @@ export function PhotoWallPage({ onExit, token, folderName, isAdmin, onForbidden photoLayout: photoLayout as unknown as Record>, }).then(() => { setSaveLabel('已保存') - setItemCount(els.length) }).catch((e) => { if (e instanceof Error && e.message === 'full') { showToast('已达 100 条上限,无法保存更多装饰')