diff --git a/ts/components/SpinBox.svelte b/ts/components/SpinBox.svelte index ba06309cb..722d93eca 100644 --- a/ts/components/SpinBox.svelte +++ b/ts/components/SpinBox.svelte @@ -3,16 +3,16 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -->
- (focused = true)} on:focusout={() => (focused = false)} /> - + + }} + on:mousedown={() => + longPress(() => { + if (value < max) { + change(step); + } + })} + on:mouseup={() => { + clearTimeout(pressTimer); + pressed = false; + }} + > + + {@html chevronUp} + + + {/if}
diff --git a/ts/components/icons.ts b/ts/components/icons.ts index b26924bf9..f77a7f9e3 100644 --- a/ts/components/icons.ts +++ b/ts/components/icons.ts @@ -8,5 +8,6 @@ export { default as vsplitIcon } from "@mdi/svg/svg/arrow-split-vertical.svg"; export { default as chevronDown } from "@mdi/svg/svg/chevron-down.svg"; export { default as chevronLeft } from "@mdi/svg/svg/chevron-left.svg"; export { default as chevronRight } from "@mdi/svg/svg/chevron-right.svg"; +export { default as chevronUp } from "@mdi/svg/svg/chevron-up.svg"; export { default as horizontalHandle } from "@mdi/svg/svg/drag-horizontal.svg"; export { default as verticalHandle } from "@mdi/svg/svg/drag-vertical.svg"; diff --git a/ts/lib/platform.ts b/ts/lib/platform.ts index 057ceeeb8..7aa5e137d 100644 --- a/ts/lib/platform.ts +++ b/ts/lib/platform.ts @@ -9,3 +9,7 @@ export function isApplePlatform(): boolean { || platform.startsWith("iP") ); } + +export function isDesktop(): boolean { + return !(/iphone|ipad|ipod|android/i.test(window.navigator.userAgent)); +}