mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
refactor(web): user-settings (#3700)
* refactor(web): user-settings * feat: move the logic to the server * use const * fix: error 403 * fix: remove console.log
This commit is contained in:
parent
53f5643994
commit
78a2a9e666
6 changed files with 22 additions and 26 deletions
web/src/lib/components/user-settings-page
|
@ -1,6 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { api, APIKeyResponseDto } from '@api';
|
||||
import { onMount } from 'svelte';
|
||||
import PencilOutline from 'svelte-material-icons/PencilOutline.svelte';
|
||||
import TrashCanOutline from 'svelte-material-icons/TrashCanOutline.svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
@ -12,7 +11,7 @@
|
|||
import { locale } from '$lib/stores/preferences.store';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
|
||||
let keys: APIKeyResponseDto[] = [];
|
||||
export let keys: APIKeyResponseDto[];
|
||||
|
||||
let newKey: Partial<APIKeyResponseDto> | null = null;
|
||||
let editKey: APIKeyResponseDto | null = null;
|
||||
|
@ -25,10 +24,6 @@
|
|||
year: 'numeric',
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
refreshKeys();
|
||||
});
|
||||
|
||||
async function refreshKeys() {
|
||||
const { data } = await api.keyApi.getKeys();
|
||||
keys = data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue