Delete src/lib/components/admin/Users/Groups/PermissionSwitch.svelte

This commit is contained in:
Classic298 2025-09-28 21:27:06 +02:00 committed by GitHub
parent fb3eeaa126
commit a4e0c10f34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 38 deletions

View File

@ -1,38 +0,0 @@
<script lang="ts">
import { getContext } from 'svelte';
const i18n = getContext('i18n');
import Switch from '$lib/components/common/Switch.svelte';
import Warning from '$lib/components/common/Warning.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
export let label = '';
export let state = false;
export let defaultState = undefined;
export let tooltip = '';
</script>
<div class="flex w-full flex-col">
{#if tooltip}
<Tooltip content={tooltip} placement="top-start" className="flex w-full justify-between pr-2">
<div class="self-center text-xs font-medium">
{label}
</div>
<Switch bind:state />
</Tooltip>
{:else}
<div class="flex w-full justify-between pr-2">
<div class="self-center text-xs font-medium">
{label}
</div>
<Switch bind:state />
</div>
{/if}
{#if defaultState && !state}
<div class="pb-1 pl-1 pr-2 pt-1">
<Warning
text={$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
/>
</div>
{/if}
</div>