1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02: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:
faupau 2023-05-09 17:10:13 +02:00 committed by GitHub
parent cd43edf074
commit 98bb3de8da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 13 deletions

View File

@ -46,14 +46,15 @@
</script>
<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>
<CircleIconButton logo={ArrowLeft} on:click={() => dispatch('goBack')} />
<div class="text-white">
<CircleIconButton isOpacity={true} logo={ArrowLeft} on:click={() => dispatch('goBack')} />
</div>
<div class="text-white flex gap-2 justify-end w-[calc(100%-3rem)] overflow-hidden">
{#if isOwner}
<CircleIconButton
isOpacity={true}
logo={asset.isArchived ? ArchiveArrowUpOutline : ArchiveArrowDownOutline}
title={asset.isArchived ? 'Unarchive' : 'Archive'}
on:click={() => dispatch('toggleArchive')}
@ -63,12 +64,14 @@
{#if showMotionPlayButton}
{#if isMotionPhotoPlaying}
<CircleIconButton
isOpacity={true}
logo={MotionPauseOutline}
title="Stop Motion Photo"
on:click={() => dispatch('stopMotionPhoto')}
/>
{:else}
<CircleIconButton
isOpacity={true}
logo={MotionPlayOutline}
title="Play Motion Photo"
on:click={() => dispatch('playMotionPhoto')}
@ -77,6 +80,7 @@
{/if}
{#if showCopyButton}
<CircleIconButton
isOpacity={true}
logo={ContentCopy}
title="Copy Image"
on:click={() => {
@ -88,18 +92,21 @@
{#if showDownloadButton}
<CircleIconButton
isOpacity={true}
logo={CloudDownloadOutline}
on:click={() => dispatch('download')}
title="Download"
/>
{/if}
<CircleIconButton
isOpacity={true}
logo={InformationOutline}
on:click={() => dispatch('showDetail')}
title="Info"
/>
{#if isOwner}
<CircleIconButton
isOpacity={true}
logo={asset.isFavorite ? Heart : HeartOutline}
on:click={() => dispatch('favorite')}
title="Favorite"
@ -107,12 +114,22 @@
{/if}
{#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)}>
<CircleIconButton logo={DotsVertical} on:click={showOptionsMenu} title="More">
<CircleIconButton
isOpacity={true}
logo={DotsVertical}
on:click={showOptionsMenu}
title="More"
>
{#if isShowAssetOptions}
<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('addToSharedAlbum')}

View File

@ -378,7 +378,7 @@
}}
>
<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}
on:click={navigateAssetForward}
>
@ -422,7 +422,7 @@
.navigation-button-hover {
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;
}
</style>

View File

@ -6,13 +6,17 @@
export let hoverColor = '#e2e7e9';
export let size = '24';
export let title = '';
export let isOpacity = false;
</script>
<button
{title}
style:backgroundColor
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
>
<svelte:component this={logo} {size} />

View File

@ -3,7 +3,6 @@
import type { UserResponseDto } from '@api';
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
import SideBar from '../shared-components/side-bar/side-bar.svelte';
export let user: UserResponseDto;
export let hideNavbar = 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"
>
<SideBar />
<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}
<div class="flex justify-between place-items-center dark:text-immich-dark-fg px-4 h-10">
<p class="font-medium">{title}</p>

View File

@ -45,7 +45,7 @@
<UserPageLayout user={data.user} title={data.meta.title}>
<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 }}
<Map latlng={initialMapCenter} zoom={7}>
<TileLayer