add admin user page
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
<svelte:options accessors={true} />
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSolid } from 'svelte-heros-v2';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let id: string | null = null;
|
||||
export let name: string | null = null;
|
||||
@ -14,6 +13,11 @@
|
||||
|
||||
export let inputElement: HTMLInputElement | undefined = undefined;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
function input(e: Event & { currentTarget: EventTarget & HTMLInputElement }) {
|
||||
dispatch('input', e);
|
||||
}
|
||||
|
||||
let initialType = type;
|
||||
|
||||
let passwordEyeSize = {
|
||||
@ -38,6 +42,7 @@
|
||||
{disabled}
|
||||
bind:value
|
||||
bind:this={inputElement}
|
||||
on:input={input}
|
||||
/>
|
||||
{:else}
|
||||
<div>
|
||||
@ -58,11 +63,12 @@
|
||||
class:checkbox-sm={type === 'checkbox' && size === 'sm'}
|
||||
class:checkbox-md={type === 'checkbox' && size === 'md'}
|
||||
class:checkbox-lg={type === 'checkbox' && size === 'lg'}
|
||||
class:input,input-bordered,w-full={type !== 'checkbox'}
|
||||
class:input,w-full={type !== 'checkbox'}
|
||||
class:input-xs={type !== 'checkbox' && size === 'xs'}
|
||||
class:input-sm={type !== 'checkbox' && size === 'sm'}
|
||||
class:input-md={type !== 'checkbox' && size === 'md'}
|
||||
class:input-lg={type !== 'checkbox' && size === 'lg'}
|
||||
class:input-bordered={type !== 'checkbox'}
|
||||
class:pr-11={initialType === 'password'}
|
||||
{id}
|
||||
{name}
|
||||
@ -77,6 +83,7 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
value = e.target?.value;
|
||||
input(e);
|
||||
}}
|
||||
/>
|
||||
{#if initialType === 'password'}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
export let id: string;
|
||||
export let name: string | null = null;
|
||||
export let value: string;
|
||||
export let value: string | null = null;
|
||||
export let label: string | null = null;
|
||||
export let notice: string | null = null;
|
||||
export let required = false;
|
||||
|
Reference in New Issue
Block a user