mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Fix web lint issues
This commit is contained in:
parent
6725954b70
commit
4f7a3afbfc
40 changed files with 122 additions and 121 deletions
|
|
@ -2,9 +2,7 @@
|
|||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
import ArrowLeft from 'svelte-material-icons/ArrowLeft.svelte';
|
||||
import DotsVertical from 'svelte-material-icons/DotsVertical.svelte';
|
||||
import CloudDownloadOutline from 'svelte-material-icons/CloudDownloadOutline.svelte';
|
||||
import TrashCanOutline from 'svelte-material-icons/TrashCanOutline.svelte';
|
||||
import InformationOutline from 'svelte-material-icons/InformationOutline.svelte';
|
||||
import CircleIconButton from '../shared-components/circle-icon-button.svelte';
|
||||
const dispatch = createEventDispatcher();
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@
|
|||
let isShowDetail = false;
|
||||
let appearsInAlbums: AlbumResponseDto[] = [];
|
||||
|
||||
const onKeyboardPress = (keyInfo: KeyboardEvent) => handleKeyboardPress(keyInfo.key);
|
||||
|
||||
onMount(() => {
|
||||
document.addEventListener('keydown', (keyInfo) => handleKeyboardPress(keyInfo.key));
|
||||
document.addEventListener('keydown', onKeyboardPress);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
document.removeEventListener('keydown', (e) => {});
|
||||
document.removeEventListener('keydown', onKeyboardPress);
|
||||
});
|
||||
|
||||
const handleKeyboardPress = (key: string) => {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,14 @@
|
|||
import { browser } from '$app/env';
|
||||
import { AssetResponseDto, AlbumResponseDto } from '@api';
|
||||
|
||||
type Leaflet = typeof import('leaflet');
|
||||
type LeafletMap = import('leaflet').Map;
|
||||
type LeafletMarker = import('leaflet').Marker;
|
||||
|
||||
// Map Property
|
||||
let map: any;
|
||||
let leaflet: any;
|
||||
let marker: any;
|
||||
let map: LeafletMap;
|
||||
let leaflet: Leaflet;
|
||||
let marker: LeafletMarker;
|
||||
|
||||
export let asset: AssetResponseDto;
|
||||
$: if (asset.exifInfo?.latitude != null && asset.exifInfo?.longitude != null) {
|
||||
|
|
@ -31,7 +35,6 @@
|
|||
|
||||
async function drawMap(lat: number, lon: number) {
|
||||
if (!leaflet) {
|
||||
// @ts-ignore
|
||||
leaflet = await import('leaflet');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
export let root: HTMLElement | null = null;
|
||||
|
||||
let intersecting = false;
|
||||
let container: any;
|
||||
let container: HTMLDivElement;
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
onMount(() => {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@
|
|||
|
||||
const assetData = URL.createObjectURL(data);
|
||||
return assetData;
|
||||
} catch (e) {}
|
||||
} catch {
|
||||
// Do nothing
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||
import { api, AssetResponseDto, getFileUrl } from '@api';
|
||||
|
||||
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
let asset: AssetResponseDto;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let videoPlayerNode: HTMLVideoElement;
|
||||
let isVideoLoading = true;
|
||||
let videoUrl: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue