mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03:46:47 +01:00
fix(web) small UI improvements (#2369)
* small changes in asset viewer navigation * add conditional wrapper and scroll only content * fix formatting * update conditional wrapper * remove emptz title attribute * remove conditional-wrapper as it is not needed * remove isTimeline * fix map over sidebar * fix overlap * fix conflict * revert z-index * add relative z index --------- Co-authored-by: faupau03 <paul.paffe@gmx.net>
This commit is contained in:
parent
cd43edf074
commit
98bb3de8da
5 changed files with 32 additions and 13 deletions
|
@ -46,14 +46,15 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="h-16 flex justify-between place-items-center px-3 transition-transform duration-200 z-[1001]"
|
class="h-16 flex justify-between place-items-center px-3 transition-transform duration-200 z-[1001] bg-gradient-to-b from-black/40"
|
||||||
>
|
>
|
||||||
<div>
|
<div class="text-white">
|
||||||
<CircleIconButton logo={ArrowLeft} on:click={() => dispatch('goBack')} />
|
<CircleIconButton isOpacity={true} logo={ArrowLeft} on:click={() => dispatch('goBack')} />
|
||||||
</div>
|
</div>
|
||||||
<div class="text-white flex gap-2 justify-end w-[calc(100%-3rem)] overflow-hidden">
|
<div class="text-white flex gap-2 justify-end w-[calc(100%-3rem)] overflow-hidden">
|
||||||
{#if isOwner}
|
{#if isOwner}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={asset.isArchived ? ArchiveArrowUpOutline : ArchiveArrowDownOutline}
|
logo={asset.isArchived ? ArchiveArrowUpOutline : ArchiveArrowDownOutline}
|
||||||
title={asset.isArchived ? 'Unarchive' : 'Archive'}
|
title={asset.isArchived ? 'Unarchive' : 'Archive'}
|
||||||
on:click={() => dispatch('toggleArchive')}
|
on:click={() => dispatch('toggleArchive')}
|
||||||
|
@ -63,12 +64,14 @@
|
||||||
{#if showMotionPlayButton}
|
{#if showMotionPlayButton}
|
||||||
{#if isMotionPhotoPlaying}
|
{#if isMotionPhotoPlaying}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={MotionPauseOutline}
|
logo={MotionPauseOutline}
|
||||||
title="Stop Motion Photo"
|
title="Stop Motion Photo"
|
||||||
on:click={() => dispatch('stopMotionPhoto')}
|
on:click={() => dispatch('stopMotionPhoto')}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={MotionPlayOutline}
|
logo={MotionPlayOutline}
|
||||||
title="Play Motion Photo"
|
title="Play Motion Photo"
|
||||||
on:click={() => dispatch('playMotionPhoto')}
|
on:click={() => dispatch('playMotionPhoto')}
|
||||||
|
@ -77,6 +80,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{#if showCopyButton}
|
{#if showCopyButton}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={ContentCopy}
|
logo={ContentCopy}
|
||||||
title="Copy Image"
|
title="Copy Image"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
@ -88,18 +92,21 @@
|
||||||
|
|
||||||
{#if showDownloadButton}
|
{#if showDownloadButton}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={CloudDownloadOutline}
|
logo={CloudDownloadOutline}
|
||||||
on:click={() => dispatch('download')}
|
on:click={() => dispatch('download')}
|
||||||
title="Download"
|
title="Download"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={InformationOutline}
|
logo={InformationOutline}
|
||||||
on:click={() => dispatch('showDetail')}
|
on:click={() => dispatch('showDetail')}
|
||||||
title="Info"
|
title="Info"
|
||||||
/>
|
/>
|
||||||
{#if isOwner}
|
{#if isOwner}
|
||||||
<CircleIconButton
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
logo={asset.isFavorite ? Heart : HeartOutline}
|
logo={asset.isFavorite ? Heart : HeartOutline}
|
||||||
on:click={() => dispatch('favorite')}
|
on:click={() => dispatch('favorite')}
|
||||||
title="Favorite"
|
title="Favorite"
|
||||||
|
@ -107,12 +114,22 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if isOwner}
|
{#if isOwner}
|
||||||
<CircleIconButton logo={DeleteOutline} on:click={() => dispatch('delete')} title="Delete" />
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
|
logo={DeleteOutline}
|
||||||
|
on:click={() => dispatch('delete')}
|
||||||
|
title="Delete"
|
||||||
|
/>
|
||||||
<div use:clickOutside on:outclick={() => (isShowAssetOptions = false)}>
|
<div use:clickOutside on:outclick={() => (isShowAssetOptions = false)}>
|
||||||
<CircleIconButton logo={DotsVertical} on:click={showOptionsMenu} title="More">
|
<CircleIconButton
|
||||||
|
isOpacity={true}
|
||||||
|
logo={DotsVertical}
|
||||||
|
on:click={showOptionsMenu}
|
||||||
|
title="More"
|
||||||
|
>
|
||||||
{#if isShowAssetOptions}
|
{#if isShowAssetOptions}
|
||||||
<ContextMenu {...contextMenuPosition}>
|
<ContextMenu {...contextMenuPosition}>
|
||||||
<div class="flex flex-col rounded-lg ">
|
<div class="flex flex-col rounded-lg text-black bg-immich-bg">
|
||||||
<MenuOption on:click={() => onMenuClick('addToAlbum')} text="Add to Album" />
|
<MenuOption on:click={() => onMenuClick('addToAlbum')} text="Add to Album" />
|
||||||
<MenuOption
|
<MenuOption
|
||||||
on:click={() => onMenuClick('addToSharedAlbum')}
|
on:click={() => onMenuClick('addToSharedAlbum')}
|
||||||
|
|
|
@ -378,7 +378,7 @@
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="rounded-full p-3 hover:bg-gray-500 hover:text-gray-700 text-gray-500 mx-4"
|
class="rounded-full p-3 hover:bg-gray-500 hover:text-white text-gray-500 mx-4"
|
||||||
class:navigation-button-hover={halfRightHover}
|
class:navigation-button-hover={halfRightHover}
|
||||||
on:click={navigateAssetForward}
|
on:click={navigateAssetForward}
|
||||||
>
|
>
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
|
|
||||||
.navigation-button-hover {
|
.navigation-button-hover {
|
||||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||||
color: rgb(55 65 81 / var(--tw-text-opacity));
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
||||||
transition: all 150ms;
|
transition: all 150ms;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -6,13 +6,17 @@
|
||||||
export let hoverColor = '#e2e7e9';
|
export let hoverColor = '#e2e7e9';
|
||||||
export let size = '24';
|
export let size = '24';
|
||||||
export let title = '';
|
export let title = '';
|
||||||
|
export let isOpacity = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
{title}
|
{title}
|
||||||
style:backgroundColor
|
style:backgroundColor
|
||||||
style:--immich-icon-button-hover-color={hoverColor}
|
style:--immich-icon-button-hover-color={hoverColor}
|
||||||
class="immich-circle-icon-button dark:text-immich-dark-fg hover:dark:text-immich-dark-gray rounded-full p-3 flex place-items-center place-content-center transition-all"
|
class="dark:text-immich-dark-fg rounded-full p-3 flex place-items-center place-content-center transition-all
|
||||||
|
{isOpacity
|
||||||
|
? 'hover:bg-immich-bg/30'
|
||||||
|
: 'immich-circle-icon-button hover:dark:text-immich-dark-gray'}"
|
||||||
on:click
|
on:click
|
||||||
>
|
>
|
||||||
<svelte:component this={logo} {size} />
|
<svelte:component this={logo} {size} />
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import type { UserResponseDto } from '@api';
|
import type { UserResponseDto } from '@api';
|
||||||
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
|
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
|
||||||
import SideBar from '../shared-components/side-bar/side-bar.svelte';
|
import SideBar from '../shared-components/side-bar/side-bar.svelte';
|
||||||
|
|
||||||
export let user: UserResponseDto;
|
export let user: UserResponseDto;
|
||||||
export let hideNavbar = false;
|
export let hideNavbar = false;
|
||||||
export let showUploadButton = false;
|
export let showUploadButton = false;
|
||||||
|
@ -26,9 +25,8 @@
|
||||||
class="grid md:grid-cols-[250px_auto] grid-cols-[70px_auto] relative pt-[4.25rem] h-screen bg-immich-bg dark:bg-immich-dark-bg immich-scrollbar"
|
class="grid md:grid-cols-[250px_auto] grid-cols-[70px_auto] relative pt-[4.25rem] h-screen bg-immich-bg dark:bg-immich-dark-bg immich-scrollbar"
|
||||||
>
|
>
|
||||||
<SideBar />
|
<SideBar />
|
||||||
|
|
||||||
<slot name="content">
|
<slot name="content">
|
||||||
<section class="my-8 mx-4 bg-immich-bg dark:bg-immich-dark-bg">
|
<section class="overflow-y-auto my-8 mx-4 bg-immich-bg dark:bg-immich-dark-bg">
|
||||||
{#if title}
|
{#if title}
|
||||||
<div class="flex justify-between place-items-center dark:text-immich-dark-fg px-4 h-10">
|
<div class="flex justify-between place-items-center dark:text-immich-dark-fg px-4 h-10">
|
||||||
<p class="font-medium">{title}</p>
|
<p class="font-medium">{title}</p>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<UserPageLayout user={data.user} title={data.meta.title}>
|
<UserPageLayout user={data.user} title={data.meta.title}>
|
||||||
<div slot="buttons" />
|
<div slot="buttons" />
|
||||||
|
|
||||||
<div class="h-[90%] w-full">
|
<div class="h-[90%] w-full relative z-0">
|
||||||
{#await import('$lib/components/shared-components/leaflet') then { Map, TileLayer, AssetMarkerCluster }}
|
{#await import('$lib/components/shared-components/leaflet') then { Map, TileLayer, AssetMarkerCluster }}
|
||||||
<Map latlng={initialMapCenter} zoom={7}>
|
<Map latlng={initialMapCenter} zoom={7}>
|
||||||
<TileLayer
|
<TileLayer
|
||||||
|
|
Loading…
Reference in a new issue