refac: role update ui
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
let _user = {
|
||||
profile_image_url: '',
|
||||
role: 'pending',
|
||||
name: '',
|
||||
email: '',
|
||||
password: ''
|
||||
@@ -95,6 +96,23 @@
|
||||
|
||||
<div class=" px-5 pt-3 pb-5">
|
||||
<div class=" flex flex-col space-y-1.5">
|
||||
<div class="flex flex-col w-full">
|
||||
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Role')}</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<select
|
||||
class="w-full rounded-sm text-sm bg-transparent disabled:text-gray-500 dark:disabled:text-gray-500 outline-hidden"
|
||||
bind:value={_user.role}
|
||||
disabled={_user.id == sessionUser.id}
|
||||
required
|
||||
>
|
||||
<option value="admin">{$i18n.t('Admin')}</option>
|
||||
<option value="user">{$i18n.t('User')}</option>
|
||||
<option value="pending">{$i18n.t('Pending')}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col w-full">
|
||||
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Email')}</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user