Import Tripoli Cloud frontend prototype

React/TypeScript/Vite/Tailwind prototype from the design session (login,
dashboard, photos, backups, settings views with mocked API layer).
Infra work (Rust services, Ansible, OpenTofu) follows in subsequent commits.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Adam Belkacemi 2026-09-16 21:21:43 +02:00
commit 5dbd3b96f6
73 changed files with 4789 additions and 0 deletions

View file

@ -0,0 +1,18 @@
import { useEffect, useState } from 'react';
import { getAlbums, getPhotoTiles } from '../api/photos';
import type { Album, PhotoScope, PhotoTile } from '../types';
const SCOPES: PhotoScope[] = ['Tout', 'Personnes', 'Lieux'];
export function usePhotos() {
const [albums, setAlbums] = useState<Album[]>([]);
const [tiles, setTiles] = useState<PhotoTile[]>([]);
const [scope, setScope] = useState<PhotoScope>('Tout');
useEffect(() => {
void getAlbums().then(setAlbums);
void getPhotoTiles().then(setTiles);
}, []);
return { albums, tiles, scopes: SCOPES, scope, setScope };
}