mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
bad merge and fix tests
This commit is contained in:
parent
5d5f9024f6
commit
709bddf0f0
@ -134,6 +134,12 @@
|
|||||||
|
|
||||||
let startX: number = 0;
|
let startX: number = 0;
|
||||||
let startY: number = 0;
|
let startY: number = 0;
|
||||||
|
|
||||||
|
// As of iOS17, there is a preference for long press speed, which is not available for mobile web.
|
||||||
|
// The defaults are as follows:
|
||||||
|
// fast: 200ms
|
||||||
|
// default: 500ms
|
||||||
|
// slow: ??ms
|
||||||
function longPress(element: HTMLElement, { onLongPress }: { onLongPress: () => void }) {
|
function longPress(element: HTMLElement, { onLongPress }: { onLongPress: () => void }) {
|
||||||
let didPress = false;
|
let didPress = false;
|
||||||
const start = (evt: PointerEvent) => {
|
const start = (evt: PointerEvent) => {
|
||||||
@ -216,7 +222,10 @@
|
|||||||
>
|
>
|
||||||
<!-- Outline on focus -->
|
<!-- Outline on focus -->
|
||||||
<div
|
<div
|
||||||
class={['absolute z-40 size-full outline-4 -outline-offset-4 outline-immich-primary', { 'rounded-xl': selected }]}
|
class={[
|
||||||
|
'pointer-events-none absolute z-40 size-full outline-4 -outline-offset-4 outline-immich-primary',
|
||||||
|
{ 'rounded-xl': selected },
|
||||||
|
]}
|
||||||
data-outline
|
data-outline
|
||||||
></div>
|
></div>
|
||||||
{#if (!loaded || thumbError) && asset.thumbhash}
|
{#if (!loaded || thumbError) && asset.thumbhash}
|
||||||
@ -229,35 +238,10 @@
|
|||||||
></canvas>
|
></canvas>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- as of iOS17, there is a preference for long press speed, which is not available for mobile web.
|
|
||||||
The defaults are as follows:
|
|
||||||
fast: 200ms
|
|
||||||
default: 500ms
|
|
||||||
slow: ??ms
|
|
||||||
-->
|
|
||||||
<div
|
<div
|
||||||
class={['group absolute top-[0px] bottom-[0px]', { 'cursor-not-allowed': disabled, 'cursor-pointer': !disabled }]}
|
class={['group absolute top-[0px] bottom-[0px]', { 'cursor-not-allowed': disabled, 'cursor-pointer': !disabled }]}
|
||||||
style:width="inherit"
|
style:width="inherit"
|
||||||
style:height="inherit"
|
style:height="inherit"
|
||||||
onmouseenter={onMouseEnter}
|
|
||||||
onmouseleave={onMouseLeave}
|
|
||||||
use:longPress={{ onLongPress: () => onSelect?.($state.snapshot(asset)) }}
|
|
||||||
onkeydown={(evt) => {
|
|
||||||
if (evt.key === 'Enter') {
|
|
||||||
callClickHandlers();
|
|
||||||
}
|
|
||||||
if (evt.key === 'x') {
|
|
||||||
onSelect?.(asset);
|
|
||||||
}
|
|
||||||
if (document.activeElement === element && evt.key === 'Escape') {
|
|
||||||
focusNext((element) => element.dataset.thumbnailFocusContainer === undefined, true);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onclick={handleClick}
|
|
||||||
bind:this={element}
|
|
||||||
data-thumbnail-focus-container
|
|
||||||
tabindex={0}
|
|
||||||
role="link"
|
|
||||||
>
|
>
|
||||||
<!-- Select asset button -->
|
<!-- Select asset button -->
|
||||||
{#if !usingMobileDevice && mouseOver && !disableLinkMouseOver}
|
{#if !usingMobileDevice && mouseOver && !disableLinkMouseOver}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user