implemented password update procedure
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<script>
|
||||
import { t } from '../../translations.svelte.js';
|
||||
import { user } from '../../user.svelte.js';
|
||||
import EditableField from './EditableField.svelte';
|
||||
import ClickInput from './ClickInput.svelte';
|
||||
import ClickSelect from './ClickSelect.svelte';
|
||||
import ClickInput from '../../Components/ClickInput.svelte';
|
||||
import ClickSelect from '../../Components/ClickSelect.svelte';
|
||||
import EditPassword from './EditPassword.svelte';
|
||||
let editPassword = false;
|
||||
|
||||
async function patch(changeset){
|
||||
const url = `${location.protocol}//${location.host.replace('5173','8080')}/api/user/${user.id}`;
|
||||
@@ -65,6 +66,16 @@
|
||||
<ClickSelect key='theme' value={user.theme} fetchOptions={fetchThemes} onUpdate={patch} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{t('user.password')}</th>
|
||||
<td>
|
||||
{#if editPassword}
|
||||
<EditPassword bind:editPassword={editPassword} />
|
||||
{:else}
|
||||
<button onclick={() => editPassword = true}>{t('user.edit_password')}</button>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{t('user.permissions')}</th>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user