mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-09-06 08:52:58 +02:00
Completely replace outdated template config rendering
- Deleted respective old files - Renamed new components
This commit is contained in:
31
web/frontend/src/Config.root.svelte
Normal file
31
web/frontend/src/Config.root.svelte
Normal file
@@ -0,0 +1,31 @@
|
||||
<script>
|
||||
import { getContext } from 'svelte'
|
||||
import { init } from './utils.js'
|
||||
import { Card, CardHeader, CardTitle } from 'sveltestrap'
|
||||
|
||||
import PlotSettings from './config/PlotSettings.svelte'
|
||||
import AdminSettings from './config/AdminSettings.svelte'
|
||||
|
||||
const { query: initq } = init()
|
||||
|
||||
const ccconfig = getContext('cc-config')
|
||||
|
||||
export let user
|
||||
|
||||
</script>
|
||||
|
||||
{#if user.IsAdmin}
|
||||
<Card style="margin-bottom: 1.5em;">
|
||||
<CardHeader>
|
||||
<CardTitle class="mb-1">Admin Options</CardTitle>
|
||||
</CardHeader>
|
||||
<AdminSettings/>
|
||||
</Card>
|
||||
{/if}
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="mb-1">Plotting Options</CardTitle>
|
||||
</CardHeader>
|
||||
<PlotSettings config={ccconfig}/>
|
||||
</Card>
|
Reference in New Issue
Block a user