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
|
|
|
|
- `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";
|
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;
|
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>
|
|
|
|
|
2023-03-06 11:44:38 +01:00
|
|
|
{#if isAdmin == true}
|
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}
|
|
|
|
|
|
|
|
<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>
|