This commit is contained in:
Tomas Dvorak
2025-11-02 21:31:00 +01:00
parent b9cea0cd77
commit 087f30e82c
130 changed files with 20104 additions and 34330 deletions
@@ -201,6 +201,9 @@ const SettingsAdminPage: React.FC = () => {
api_base_url: (settings as any).api_base_url,
// homepage matches display
finished_match_display_days: (settings as any).finished_match_display_days as any,
storage_quota_mb: (settings as any).storage_quota_mb as any,
storage_warn_threshold: (settings as any).storage_warn_threshold as any,
storage_critical_threshold: (settings as any).storage_critical_threshold as any,
};
const saved = await updateAdminSettings(payload);
setSettings((prev) => ({ ...prev, ...saved }));
@@ -276,6 +279,39 @@ const SettingsAdminPage: React.FC = () => {
<FormLabel>Název klubu</FormLabel>
<Input value={settings.club_name || ''} onChange={handleChange('club_name')} />
</FormControl>
<Heading size="sm">Úložiště souborů</Heading>
<SimpleGrid columns={{ base: 1, md: 3 }} spacing={4}>
<FormControl>
<FormLabel>Kapacita úložiště (MB)</FormLabel>
<Input
type="number"
min={0}
value={(settings as any).storage_quota_mb ?? 15360}
onChange={handleNumChange('storage_quota_mb' as any)}
/>
</FormControl>
<FormControl>
<FormLabel>Varování při (%)</FormLabel>
<Input
type="number"
min={0}
max={100}
value={(settings as any).storage_warn_threshold ?? 80}
onChange={handleNumChange('storage_warn_threshold' as any)}
/>
</FormControl>
<FormControl>
<FormLabel>Kritické při (%)</FormLabel>
<Input
type="number"
min={0}
max={100}
value={(settings as any).storage_critical_threshold ?? 95}
onChange={handleNumChange('storage_critical_threshold' as any)}
/>
</FormControl>
</SimpleGrid>
<FormControl>
<FormLabel>Logo klubu</FormLabel>
<HStack align="center" spacing={3}>