1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 12:26:47 +01:00

try to fix identation

This commit is contained in:
Yonggan 2023-06-10 15:03:06 +02:00
parent 6f09f28206
commit 40c727b74a
6 changed files with 460 additions and 460 deletions

View file

@ -8,13 +8,13 @@
</script> </script>
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'; import {page} from '$app/stores';
import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte'; import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte';
import { handleError } from '$lib/utils/handle-error'; import {handleError} from '$lib/utils/handle-error';
import { AssetResponseDto, SharedLinkResponseDto, ThumbnailFormat } from '@api'; import {AssetResponseDto, SharedLinkResponseDto, ThumbnailFormat} from '@api';
import AssetViewer from '../../asset-viewer/asset-viewer.svelte'; import AssetViewer from '../../asset-viewer/asset-viewer.svelte';
import { flip } from 'svelte/animate'; import {flip} from 'svelte/animate';
import { archivedAsset } from '$lib/stores/archived-asset.store'; import {archivedAsset} from '$lib/stores/archived-asset.store';
export let assets: AssetResponseDto[]; export let assets: AssetResponseDto[];
export let sharedLink: SharedLinkResponseDto | undefined = undefined; export let sharedLink: SharedLinkResponseDto | undefined = undefined;
@ -46,7 +46,7 @@
} }
const viewAssetHandler = (event: CustomEvent) => { const viewAssetHandler = (event: CustomEvent) => {
const { asset }: { asset: AssetResponseDto } = event.detail; const {asset}: { asset: AssetResponseDto } = event.detail;
currentViewAssetIndex = assets.findIndex((a) => a.id == asset.id); currentViewAssetIndex = assets.findIndex((a) => a.id == asset.id);
selectedAsset = assets[currentViewAssetIndex]; selectedAsset = assets[currentViewAssetIndex];
@ -55,7 +55,7 @@
}; };
const selectAssetHandler = (event: CustomEvent) => { const selectAssetHandler = (event: CustomEvent) => {
const { asset }: { asset: AssetResponseDto } = event.detail; const {asset}: { asset: AssetResponseDto } = event.detail;
let temp = new Set(selectedAssets); let temp = new Set(selectedAssets);
if (selectedAssets.has(asset)) { if (selectedAssets.has(asset)) {

View file

@ -11,13 +11,13 @@
import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte';
import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.svelte'; import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.svelte';
import SelectAll from 'svelte-material-icons/SelectAll.svelte'; import SelectAll from 'svelte-material-icons/SelectAll.svelte';
import { archivedAsset } from '$lib/stores/archived-asset.store'; import {archivedAsset} from '$lib/stores/archived-asset.store';
import { handleError } from '$lib/utils/handle-error'; import {handleError} from '$lib/utils/handle-error';
import { api, AssetResponseDto } from '@api'; import {api, AssetResponseDto} from '@api';
import { onMount } from 'svelte'; import {onMount} from 'svelte';
import DotsVertical from 'svelte-material-icons/DotsVertical.svelte'; import DotsVertical from 'svelte-material-icons/DotsVertical.svelte';
import Plus from 'svelte-material-icons/Plus.svelte'; import Plus from 'svelte-material-icons/Plus.svelte';
import type { PageData } from './$types'; import type {PageData} from './$types';
import CircleIconButton from "$lib/components/elements/buttons/circle-icon-button.svelte"; import CircleIconButton from "$lib/components/elements/buttons/circle-icon-button.svelte";
export let data: PageData; export let data: PageData;
@ -28,7 +28,7 @@
onMount(async () => { onMount(async () => {
try { try {
const { data: assets } = await api.assetApi.getAllAssets({ const {data: assets} = await api.assetApi.getAllAssets({
isArchived: true, isArchived: true,
withoutThumbs: true withoutThumbs: true
}); });
@ -61,21 +61,21 @@
assets={selectedAssets} assets={selectedAssets}
clearSelect={() => (selectedAssets = new Set())} clearSelect={() => (selectedAssets = new Set())}
> >
<ArchiveAction unarchive onAssetArchive={(asset) => onAssetDelete(asset.id)} /> <ArchiveAction unarchive onAssetArchive={(asset) => onAssetDelete(asset.id)}/>
<CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll}/> <CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll}/>
<CreateSharedLink /> <CreateSharedLink/>
<AssetSelectContextMenu icon={Plus} title="Add"> <AssetSelectContextMenu icon={Plus} title="Add">
<AddToAlbum /> <AddToAlbum/>
<AddToAlbum shared /> <AddToAlbum shared/>
</AssetSelectContextMenu> </AssetSelectContextMenu>
<DeleteAssets {onAssetDelete} /> <DeleteAssets {onAssetDelete}/>
<AssetSelectContextMenu icon={DotsVertical} title="Add"> <AssetSelectContextMenu icon={DotsVertical} title="Add">
<DownloadAction menuItem /> <DownloadAction menuItem/>
<FavoriteAction menuItem removeFavorite={isAllFavorite} /> <FavoriteAction menuItem removeFavorite={isAllFavorite}/>
</AssetSelectContextMenu> </AssetSelectContextMenu>
</AssetSelectControlBar> </AssetSelectControlBar>
{/if} {/if}
</svelte:fragment> </svelte:fragment>
<GalleryViewer assets={$archivedAsset} bind:selectedAssets viewFrom="archive-page" /> <GalleryViewer assets={$archivedAsset} bind:selectedAssets viewFrom="archive-page"/>
</UserPageLayout> </UserPageLayout>

View file

@ -2,13 +2,13 @@
import ImageThumbnail from '$lib/components/assets/thumbnail/image-thumbnail.svelte'; import ImageThumbnail from '$lib/components/assets/thumbnail/image-thumbnail.svelte';
import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte'; import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte';
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte'; import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
import { AppRoute } from '$lib/constants'; import {AppRoute} from '$lib/constants';
import { AssetTypeEnum, SearchExploreResponseDto, api } from '@api'; import {AssetTypeEnum, SearchExploreResponseDto, api} from '@api';
import ClockOutline from 'svelte-material-icons/ClockOutline.svelte'; import ClockOutline from 'svelte-material-icons/ClockOutline.svelte';
import HeartMultipleOutline from 'svelte-material-icons/HeartMultipleOutline.svelte'; import HeartMultipleOutline from 'svelte-material-icons/HeartMultipleOutline.svelte';
import MotionPlayOutline from 'svelte-material-icons/MotionPlayOutline.svelte'; import MotionPlayOutline from 'svelte-material-icons/MotionPlayOutline.svelte';
import PlayCircleOutline from 'svelte-material-icons/PlayCircleOutline.svelte'; import PlayCircleOutline from 'svelte-material-icons/PlayCircleOutline.svelte';
import type { PageData } from './$types'; import type {PageData} from './$types';
export let data: PageData; export let data: PageData;
@ -71,7 +71,7 @@
<div <div
class="filter brightness-75 rounded-xl overflow-hidden w-[calc((100vw-(72px+5rem))/2)] max-w-[156px] flex justify-center" class="filter brightness-75 rounded-xl overflow-hidden w-[calc((100vw-(72px+5rem))/2)] max-w-[156px] flex justify-center"
> >
<Thumbnail thumbnailSize={156} asset={item.data} readonly /> <Thumbnail thumbnailSize={156} asset={item.data} readonly/>
</div> </div>
<span <span
class="capitalize absolute bottom-2 w-full text-center text-sm font-medium text-white text-ellipsis w-100 px-1 hover:cursor-pointer backdrop-blur-[1px]" class="capitalize absolute bottom-2 w-full text-center text-sm font-medium text-white text-ellipsis w-100 px-1 hover:cursor-pointer backdrop-blur-[1px]"
@ -95,7 +95,7 @@
<div <div
class="filter brightness-75 rounded-xl overflow-hidden w-[calc((100vw-(72px+5rem))/2)] max-w-[156px] justify-center flex" class="filter brightness-75 rounded-xl overflow-hidden w-[calc((100vw-(72px+5rem))/2)] max-w-[156px] justify-center flex"
> >
<Thumbnail thumbnailSize={156} asset={item.data} readonly /> <Thumbnail thumbnailSize={156} asset={item.data} readonly/>
</div> </div>
<span <span
class="capitalize absolute bottom-2 w-full text-center text-sm font-medium text-white text-ellipsis w-100 px-1 hover:cursor-pointer backdrop-blur-[1px]" class="capitalize absolute bottom-2 w-full text-center text-sm font-medium text-white text-ellipsis w-100 px-1 hover:cursor-pointer backdrop-blur-[1px]"
@ -108,7 +108,7 @@
</div> </div>
{/if} {/if}
<hr class="dark:border-immich-dark-gray mb-4" /> <hr class="dark:border-immich-dark-gray mb-4"/>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-8"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-8">
<div class="flex flex-col gap-6 dark:text-immich-dark-fg"> <div class="flex flex-col gap-6 dark:text-immich-dark-fg">
@ -119,7 +119,7 @@
class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary content-center gap-2" class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary content-center gap-2"
draggable="false" draggable="false"
> >
<HeartMultipleOutline size={24} /> <HeartMultipleOutline size={24}/>
<span>Favorites</span> <span>Favorites</span>
</a> </a>
<a <a
@ -127,7 +127,7 @@
class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary content-center gap-2" class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary content-center gap-2"
draggable="false" draggable="false"
> >
<ClockOutline size={24} /> <ClockOutline size={24}/>
<span>Recently added</span> <span>Recently added</span>
</a> </a>
</div> </div>
@ -139,7 +139,7 @@
href="/search?type={AssetTypeEnum.Video}" href="/search?type={AssetTypeEnum.Video}"
class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary items-center gap-2" class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary items-center gap-2"
> >
<PlayCircleOutline size={24} /> <PlayCircleOutline size={24}/>
<span>Videos</span> <span>Videos</span>
</a> </a>
<div> <div>
@ -147,7 +147,7 @@
href="/search?motion=true" href="/search?motion=true"
class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary items-center gap-2" class="w-full flex text-sm font-medium hover:text-immich-primary dark:hover:text-immich-dark-primary items-center gap-2"
> >
<MotionPlayOutline size={24} /> <MotionPlayOutline size={24}/>
<span>Motion photos</span> <span>Motion photos</span>
</a> </a>
</div> </div>