mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(web): added types and some small changes (#1722)
This commit is contained in:
parent
c90dcde7cc
commit
bd71e087d4
6 changed files with 20 additions and 49 deletions
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import type Icon from 'svelte-material-icons/AbTesting.svelte';
|
||||
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export let logo: any;
|
||||
export let logo: typeof Icon;
|
||||
export let title: string;
|
||||
export let value: string;
|
||||
export let unit: string | undefined = undefined;
|
||||
|
|
@ -13,13 +13,10 @@
|
|||
}
|
||||
|
||||
const maxLength = 13;
|
||||
let result = '';
|
||||
const valueLength = parseInt(value).toString().length;
|
||||
const zeroLength = maxLength - valueLength;
|
||||
for (let i = 0; i < zeroLength; i++) {
|
||||
result += '0';
|
||||
}
|
||||
return result;
|
||||
|
||||
return '0'.repeat(zeroLength);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue