Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
type AlbumListRequestStatus = 'idle' | 'pending' | 'success' | 'error'
export function getAlbumListState(
status: AlbumListRequestStatus,
visibleAlbumCount: number,
): 'loading' | 'empty' | 'error' | 'ready' {
if (status === 'pending' || status === 'idle') return 'loading'
if (status === 'error') return 'error'
return visibleAlbumCount === 0 ? 'empty' : 'ready'
}