2024-07-25 17:10:00 +02:00
|
|
|
<!--
|
|
|
|
@component Main Config Option Component, Wrapper for admin and user sub-components
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
- `ìsAdmin Bool!`: Is currently logged in user admin authority
|
2025-01-21 18:35:03 +01:00
|
|
|
- `isSupport Bool!`: Is currently logged in user support authority
|
2024-07-25 17:10:00 +02:00
|
|
|
- `isApi Bool!`: Is currently logged in user api authority
|
|
|
|
- `username String!`: Empty string if auth. is disabled, otherwise the username as string
|
|
|
|
-->
|
|
|
|
|
2022-08-26 11:45:14 +02:00
|
|
|
<script>
|
2024-03-09 10:30:40 +01:00
|
|
|
import { Card, CardHeader, CardTitle } from "@sveltestrap/sveltestrap";
|
2024-07-04 17:30:16 +02:00
|
|
|
import UserSettings from "./config/UserSettings.svelte";
|
2025-01-21 18:35:03 +01:00
|
|
|
import SupportSettings from "./config/SupportSettings.svelte";
|
2024-03-09 10:30:40 +01:00
|
|
|
import AdminSettings from "./config/AdminSettings.svelte";
|
2022-08-26 11:45:14 +02:00
|
|
|
|
2024-03-09 10:30:40 +01:00
|
|
|
export let isAdmin;
|
2025-01-21 18:35:03 +01:00
|
|
|
export let isSupport;
|
2024-07-04 17:30:16 +02:00
|
|
|
export let isApi;
|
|
|
|
export let username;
|
2024-11-27 10:50:11 +01:00
|
|
|
export let ncontent;
|
2022-08-26 11:45:14 +02:00
|
|
|
</script>
|
|
|
|
|
2025-01-21 18:35:03 +01:00
|
|
|
{#if isAdmin}
|
2024-03-09 10:30:40 +01:00
|
|
|
<Card style="margin-bottom: 1.5em;">
|
2022-08-26 11:45:14 +02:00
|
|
|
<CardHeader>
|
2024-03-09 10:30:40 +01:00
|
|
|
<CardTitle class="mb-1">Admin Options</CardTitle>
|
2022-08-26 11:45:14 +02:00
|
|
|
</CardHeader>
|
2024-11-27 10:50:11 +01:00
|
|
|
<AdminSettings {ncontent}/>
|
2024-03-09 10:30:40 +01:00
|
|
|
</Card>
|
2022-08-26 11:45:14 +02:00
|
|
|
{/if}
|
|
|
|
|
2025-01-21 18:35:03 +01:00
|
|
|
{#if isSupport || isAdmin}
|
|
|
|
<Card style="margin-bottom: 1.5em;">
|
|
|
|
<CardHeader>
|
|
|
|
<CardTitle class="mb-1">Support Options</CardTitle>
|
|
|
|
</CardHeader>
|
|
|
|
<SupportSettings/>
|
|
|
|
</Card>
|
|
|
|
{/if}
|
|
|
|
|
2022-08-26 11:45:14 +02:00
|
|
|
<Card>
|
2024-03-09 10:30:40 +01:00
|
|
|
<CardHeader>
|
2024-07-04 17:30:16 +02:00
|
|
|
<CardTitle class="mb-1">User Options</CardTitle>
|
2024-03-09 10:30:40 +01:00
|
|
|
</CardHeader>
|
2024-07-04 17:30:16 +02:00
|
|
|
<UserSettings {username} {isApi}/>
|
2022-08-26 11:45:14 +02:00
|
|
|
</Card>
|