fix: 移除未使用的 itemCount state

This commit is contained in:
cc 2026-06-24 23:20:32 +08:00
parent 3248146c46
commit 26443a1df5
2 changed files with 2 additions and 4 deletions

View File

@ -32,8 +32,8 @@ export interface FolderPhotoList {
overQuota: boolean overQuota: boolean
} }
/** 上传失败的可区分原因 */ /** 上传失败的可区分原因(同 photos.ts多 'full' 对应 409 */
export type UploadError = 'too-large' | 'bad-type' | 'failed' export type UploadError = 'full' | 'too-large' | 'bad-type' | 'failed'
/** 列出文件夹内所有图片,含配额信息 */ /** 列出文件夹内所有图片,含配额信息 */
export async function listFolderPhotos( export async function listFolderPhotos(

View File

@ -181,7 +181,6 @@ export function PhotoWallPage({ onExit, token, folderName, isAdmin, onForbidden
const [quotaBytes, setQuotaBytes] = useState(0) const [quotaBytes, setQuotaBytes] = useState(0)
const [overQuota, setOverQuota] = useState(false) const [overQuota, setOverQuota] = useState(false)
const [maxItems, setMaxItems] = useState(0) const [maxItems, setMaxItems] = useState(0)
const [itemCount, setItemCount] = useState(0)
// 右键菜单滑条:旋转步长 / 缩放步长 // 右键菜单滑条:旋转步长 / 缩放步长
const [rotStep, setRotStep] = useState(15) const [rotStep, setRotStep] = useState(15)
const [zoomStepPx, setZoomStepPx] = useState(30) const [zoomStepPx, setZoomStepPx] = useState(30)
@ -271,7 +270,6 @@ export function PhotoWallPage({ onExit, token, folderName, isAdmin, onForbidden
photoLayout: photoLayout as unknown as Record<string, Record<string, unknown>>, photoLayout: photoLayout as unknown as Record<string, Record<string, unknown>>,
}).then(() => { }).then(() => {
setSaveLabel('已保存') setSaveLabel('已保存')
setItemCount(els.length)
}).catch((e) => { }).catch((e) => {
if (e instanceof Error && e.message === 'full') { if (e instanceof Error && e.message === 'full') {
showToast('已达 100 条上限,无法保存更多装饰') showToast('已达 100 条上限,无法保存更多装饰')