Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
chore: remove old csrf
Kyle Mendellce8166addf02
diff --git a/frontend/src/routes/settings/docker/+page.svelte b/frontend/src/routes/settings/docker/+page.svelteindex 882fc5907..7d7fff3bd 100644--- a/frontend/src/routes/settings/docker/+page.svelte+++ b/frontend/src/routes/settings/docker/+page.svelte@@ -75,9 +75,15 @@autoUpdateIntervalInput.value = currentSettings.autoUpdateInterval;});- let isPollingConfigValid = $derived(!pollingEnabledSwitch.value || (pollingIntervalInput.value >= 5 && pollingIntervalInput.value <= 1440));+ let isPollingConfigValid = $derived(+ !pollingEnabledSwitch.value ||+ (pollingIntervalInput.value >= 5 && pollingIntervalInput.value <= 1440)+ );- let isAutoUpdateConfigValid = $derived(!autoUpdateSwitch.value || (autoUpdateIntervalInput.value >= 5 && autoUpdateIntervalInput.value <= 1440));+ let isAutoUpdateConfigValid = $derived(+ !autoUpdateSwitch.value ||+ (autoUpdateIntervalInput.value >= 5 && autoUpdateIntervalInput.value <= 1440)+ );let canSave = $derived(isPollingConfigValid && isAutoUpdateConfigValid);</script>@@ -87,11 +93,17 @@<div class="settings-header"><div class="settings-header-content"><h1 class="settings-title">Docker Settings</h1>- <p class="settings-description">Configure Docker automation behavior and container management settings</p>+ <p class="settings-description">+ Configure Docker automation behavior and container management settings+ </p></div><div class="settings-actions">- <Button onclick={() => handleDockerSettingUpdates()} disabled={isLoading.saving || !canSave} class="arcane-button-save">+ <Button+ onclick={() => handleDockerSettingUpdates()}+ disabled={isLoading.saving || !canSave}+ class="arcane-button-save"+ >{#if isLoading.saving}<RefreshCw class="size-4 animate-spin" />Saving...@@ -109,7 +121,9 @@<Alert.Root variant="warning"><Zap class="size-4" /><Alert.Title>Auto-update Enabled</Alert.Title>- <Alert.Description>Automatic container updates are active with polling enabled</Alert.Description>+ <Alert.Description+ >Automatic container updates are active with polling enabled</Alert.Description+ ></Alert.Root></div>{/if}@@ -130,29 +144,63 @@</div></Card.Header><Card.Content class="space-y-6">- <div class="from-background to-muted/30 flex items-center justify-between rounded-lg border bg-gradient-to-r p-4">- <FormInput bind:input={pollingEnabledSwitch} type="switch" id="pollingEnabled" label="Enable Image Polling" description="Periodically check registries for newer image versions" />+ <div+ class="from-background to-muted/30 flex items-center justify-between rounded-lg border bg-gradient-to-r p-4"+ >+ <FormInput+ bind:input={pollingEnabledSwitch}+ type="switch"+ id="pollingEnabled"+ label="Enable Image Polling"+ description="Periodically check registries for newer image versions"+ /></div>{#if currentSettings.pollingEnabled}<div class="space-y-4 pl-4">- <FormInput bind:input={pollingIntervalInput} type="number" id="pollingInterval" label="Polling Interval (minutes)" placeholder="60" description="How often to check for new images (5-1440 minutes)" />+ <FormInput+ bind:input={pollingIntervalInput}+ type="number"+ id="pollingInterval"+ label="Polling Interval (minutes)"+ placeholder="60"+ description="How often to check for new images (5-1440 minutes)"+ />{#if pollingIntervalInput.value < 30}<Alert.Root variant="warning"><Zap class="size-4" /><Alert.Title>Rate Limiting Warning</Alert.Title>- <Alert.Description>Polling intervals below 30 minutes may trigger rate limits on Docker registries, potentially blocking your account temporarily. Consider using longer intervals for production environments.</Alert.Description>+ <Alert.Description+ >Polling intervals below 30 minutes may trigger rate limits on Docker+ registries, potentially blocking your account temporarily. Consider using longer+ intervals for production environments.</Alert.Description+ ></Alert.Root>{/if}- <div class="from-background flex items-center justify-between rounded-lg border bg-gradient-to-r to-amber-50/50 p-4">- <FormInput bind:input={autoUpdateSwitch} type="switch" id="autoUpdateSwitch" label="Auto-update Containers" description="Automatically update containers when newer images are found" />+ <div+ class="from-background flex items-center justify-between rounded-lg border bg-gradient-to-r to-amber-50/50 p-4"+ >+ <FormInput+ bind:input={autoUpdateSwitch}+ type="switch"+ id="autoUpdateSwitch"+ label="Auto-update Containers"+ description="Automatically update containers when newer images are found"+ /></div>{#if currentSettings.autoUpdate}<div class="pl-4">- <FormInput bind:input={autoUpdateIntervalInput} type="number" id="autoUpdateInterval" label="Auto-update Interval (minutes)" placeholder="60" description="How often to perform automatic updates (5-1440 minutes)" />+ <FormInput+ bind:input={autoUpdateIntervalInput}+ type="number"+ id="autoUpdateInterval"+ label="Auto-update Interval (minutes)"+ placeholder="60"+ description="How often to perform automatic updates (5-1440 minutes)"+ /></div>{/if}</div>@@ -203,22 +251,32 @@class="space-y-3"id="pruneMode">- <div class="hover:bg-muted/50 flex items-start space-x-3 rounded-lg border p-3 transition-colors">+ <div+ class="hover:bg-muted/50 flex items-start space-x-3 rounded-lg border p-3 transition-colors"+ ><RadioGroup.Item value="all" id="prune-all" class="mt-0.5" /><div class="space-y-1"><Label for="prune-all" class="cursor-pointer font-medium">All Unused Images</Label><p class="text-muted-foreground text-sm">- Remove all images not referenced by containers (equivalent to <code class="bg-background rounded px-1 py-0.5 text-xs">docker image prune -a</code>)+ Remove all images not referenced by containers (equivalent to <code+ class="bg-background rounded px-1 py-0.5 text-xs">docker image prune -a</code+ >)</p></div></div>- <div class="hover:bg-muted/50 flex items-start space-x-3 rounded-lg border p-3 transition-colors">+ <div+ class="hover:bg-muted/50 flex items-start space-x-3 rounded-lg border p-3 transition-colors"+ ><RadioGroup.Item value="dangling" id="prune-dangling" class="mt-0.5" /><div class="space-y-1">- <Label for="prune-dangling" class="cursor-pointer font-medium">Dangling Images Only</Label>+ <Label for="prune-dangling" class="cursor-pointer font-medium"+ >Dangling Images Only</Label+ ><p class="text-muted-foreground text-sm">- Remove only untagged images (equivalent to <code class="bg-background rounded px-1 py-0.5 text-xs">docker image prune</code>)+ Remove only untagged images (equivalent to <code+ class="bg-background rounded px-1 py-0.5 text-xs">docker image prune</code+ >)</p></div></div>@@ -226,14 +284,15 @@<div class="bg-muted/50 rounded-lg p-3"><p class="text-muted-foreground text-sm">- <strong>Note:</strong> This setting affects the "Prune Unused Images" action on the Images page.- {currentSettings.pruneMode === 'all' ? 'All unused images will be removed, which frees up more space but may require re-downloading images later.' : 'Only dangling images will be removed, which is safer but may leave some unused images behind.'}+ <strong>Note:</strong> This setting affects the "Prune Unused Images" action on the+ Images page.+ {currentSettings.pruneMode === 'all'+ ? 'All unused images will be removed, which frees up more space but may require re-downloading images later.'+ : 'Only dangling images will be removed, which is safer but may leave some unused images behind.'}</p></div></div></Card.Content></Card.Root>-- <input type="hidden" id="csrf_token" value={data.csrf} /></div></div>diff --git a/frontend/src/routes/settings/rbac/+page.svelte b/frontend/src/routes/settings/rbac/+page.svelteindex 978cf7199..363666493 100644--- a/frontend/src/routes/settings/rbac/+page.svelte+++ b/frontend/src/routes/settings/rbac/+page.svelte@@ -18,13 +18,27 @@id: 1,name: 'Admin',description: 'Full system access',- permissions: ['containers:manage', 'stacks:manage', 'volumes:manage', 'networks:manage', 'settings:manage', 'users:manage']+ permissions: [+ 'containers:manage',+ 'stacks:manage',+ 'volumes:manage',+ 'networks:manage',+ 'settings:manage',+ 'users:manage'+ ]},{id: 2,name: 'User',description: 'Container and stack operations',- permissions: ['containers:view', 'containers:manage', 'stacks:view', 'stacks:manage', 'volumes:view', 'networks:view']+ permissions: [+ 'containers:view',+ 'containers:manage',+ 'stacks:view',+ 'stacks:manage',+ 'volumes:view',+ 'networks:view'+ ]},{id: 3,@@ -86,10 +100,19 @@<div class="mb-6"><div class="bg-muted/30 flex items-center justify-between rounded-lg border p-4"><div class="space-y-0.5">- <label for="rbacEnabledSwitch" class="text-base font-medium">Enable Role-Based Access Control</label>- <p class="text-muted-foreground text-sm">Control user permissions with customizable roles</p>+ <label for="rbacEnabledSwitch" class="text-base font-medium"+ >Enable Role-Based Access Control</label+ >+ <p class="text-muted-foreground text-sm">+ Control user permissions with customizable roles+ </p></div>- <Switch id="rbacEnabledSwitch" name="rbacEnabled" checked={$settingsStore.auth?.rbacEnabled} onCheckedChange={() => {}} />+ <Switch+ id="rbacEnabledSwitch"+ name="rbacEnabled"+ checked={$settingsStore.auth?.rbacEnabled}+ onCheckedChange={() => {}}+ /></div></div>@@ -112,10 +135,20 @@<Card.Content><div class="space-y-2">{#each roles as role (role.id)}- <button class="flex w-full items-center justify-between rounded-md border p-3 text-left transition-colors {selectedRole.id === role.id ? 'bg-primary text-primary-foreground border-primary' : 'hover:bg-muted/50'}" onclick={() => (selectedRole = role)}>+ <button+ class="flex w-full items-center justify-between rounded-md border p-3 text-left transition-colors {selectedRole.id ===+ role.id+ ? 'bg-primary text-primary-foreground border-primary'+ : 'hover:bg-muted/50'}"+ onclick={() => (selectedRole = role)}+ ><div><div class="font-medium">{role.name}</div>- <div class="text-xs {selectedRole.id === role.id ? 'text-primary-foreground/90' : 'text-muted-foreground'}">+ <div+ class="text-xs {selectedRole.id === role.id+ ? 'text-primary-foreground/90'+ : 'text-muted-foreground'}"+ >{role.description}</div></div>@@ -152,11 +185,21 @@<div class="grid grid-cols-1 gap-4 sm:grid-cols-2"><div class="space-y-2"><label for="roleName" class="text-sm font-medium">Role Name</label>- <Input id="roleName" name="roleName" value={selectedRole.name} placeholder="Enter role name" />+ <Input+ id="roleName"+ name="roleName"+ value={selectedRole.name}+ placeholder="Enter role name"+ /></div><div class="space-y-2"><label for="roleDescription" class="text-sm font-medium">Description</label>- <Input id="roleDescription" name="roleDescription" value={selectedRole.description} placeholder="Brief description" />+ <Input+ id="roleDescription"+ name="roleDescription"+ value={selectedRole.description}+ placeholder="Brief description"+ /></div></div>@@ -170,7 +213,11 @@<div class="grid grid-cols-1 gap-2 sm:grid-cols-2">{#each category.permissions as permission (permission)}<label class="flex items-center space-x-2 text-sm">- <input type="checkbox" class="text-primary focus:ring-primary rounded border-gray-300" checked={selectedRole.permissions.includes(permission)} />+ <input+ type="checkbox"+ class="text-primary focus:ring-primary rounded border-gray-300"+ checked={selectedRole.permissions.includes(permission)}+ /><span>{permission.split(':')[1]}</span></label>{/each}@@ -184,7 +231,4 @@</Card.Root></div></div>-- <!-- Hidden CSRF token if needed -->- <input type="hidden" id="csrf_token" value={data.csrf} /></div>