I finished the remaining polish so the admin app now feels fully “app‑like” across the core screens.

This commit is contained in:
Codex Agent
2025-12-28 20:48:32 +01:00
parent d3b6c6c029
commit 1e0c38fce4
23 changed files with 1250 additions and 112 deletions

View File

@@ -0,0 +1,24 @@
import type { TenantPhoto } from '../../api';
import type { PhotoModerationAction } from './photoModerationQueue';
export type SwipeDirection = 'left' | 'right';
export type SwipeModerationAction = PhotoModerationAction['action'] | null;
export function resolvePhotoSwipeAction(photo: TenantPhoto, direction: SwipeDirection): SwipeModerationAction {
if (direction === 'right') {
if (photo.status === 'pending') {
return 'approve';
}
if (photo.status === 'hidden') {
return 'show';
}
return null;
}
if (photo.status !== 'hidden') {
return 'hide';
}
return null;
}