mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
dev day #80
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user