fix(web): user management responsive design (#5698)

* fix: user management tailwind

* use top instead of inset-y-0

* add types to createEventDispatcher
This commit is contained in:
martin
2023-12-14 17:55:15 +01:00
committed by GitHub
parent 8e39d389b5
commit f2270ad757
36 changed files with 257 additions and 135 deletions

View File

@@ -50,7 +50,12 @@
let message = '';
let isSendingMessage = false;
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
deleteComment: void;
deleteLike: void;
addComment: void;
close: void;
}>();
$: showDeleteReaction = Array(reactions.length).fill(false);
$: {

View File

@@ -725,9 +725,9 @@
albumId={album?.id}
albums={appearsInAlbums}
on:close={() => ($isShowDetail = false)}
on:close-viewer={handleCloseViewer}
on:description-focus-in={disableKeyDownEvent}
on:description-focus-out={enableKeyDownEvent}
on:closeViewer={handleCloseViewer}
on:descriptionFocusIn={disableKeyDownEvent}
on:descriptionFocusOut={enableKeyDownEvent}
/>
</div>
{/if}

View File

@@ -87,7 +87,13 @@
unsubscribe();
});
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
close: void;
descriptionFocusIn: void;
descriptionFocusOut: void;
click: AlbumResponseDto;
closeViewer: void;
}>();
const getMegapixel = (width: number, height: number): number | undefined => {
const megapixel = Math.round((height * width) / 1_000_000);
@@ -114,11 +120,11 @@
};
const handleFocusIn = () => {
dispatch('description-focus-in');
dispatch('descriptionFocusIn');
};
const handleFocusOut = async () => {
dispatch('description-focus-out');
dispatch('descriptionFocusOut');
try {
await api.assetApi.updateAsset({
id: asset.id,
@@ -241,7 +247,7 @@
href="{AppRoute.PEOPLE}/{person.id}?previousRoute={albumId
? `${AppRoute.ALBUMS}/${albumId}`
: AppRoute.PHOTOS}"
on:click={() => dispatch('close-viewer')}
on:click={() => dispatch('closeViewer')}
>
<div class="relative">
<ImageThumbnail

View File

@@ -11,7 +11,13 @@
let intersecting = false;
let container: HTMLDivElement;
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
hidden: HTMLDivElement;
intersected: {
container: HTMLDivElement;
position: BucketPosition;
};
}>();
onMount(() => {
if (typeof IntersectionObserver !== 'undefined') {