mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
@@ -7,12 +7,16 @@
|
||||
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let devices: SessionResponseDto[];
|
||||
interface Props {
|
||||
devices: SessionResponseDto[];
|
||||
}
|
||||
|
||||
let { devices = $bindable() }: Props = $props();
|
||||
|
||||
const refresh = () => getSessions().then((_devices) => (devices = _devices));
|
||||
|
||||
$: currentDevice = devices.find((device) => device.current);
|
||||
$: otherDevices = devices.filter((device) => !device.current);
|
||||
let currentDevice = $derived(devices.find((device) => device.current));
|
||||
let otherDevices = $derived(devices.filter((device) => !device.current));
|
||||
|
||||
const handleDelete = async (device: SessionResponseDto) => {
|
||||
const isConfirmed = await dialogController.show({
|
||||
@@ -78,7 +82,7 @@
|
||||
{$t('log_out_all_devices').toUpperCase()}
|
||||
</h3>
|
||||
<div class="flex justify-end">
|
||||
<Button color="red" size="sm" on:click={handleDeleteAll}>{$t('log_out_all_devices')}</Button>
|
||||
<Button color="red" size="sm" onclick={handleDeleteAll}>{$t('log_out_all_devices')}</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user