()
-
+
diff --git a/app/gui2/src/components/widgets/DropdownWidget.vue b/app/gui2/src/components/widgets/DropdownWidget.vue
new file mode 100644
index 0000000000..40796e4b6c
--- /dev/null
+++ b/app/gui2/src/components/widgets/DropdownWidget.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
diff --git a/app/gui2/src/components/widgets/PlaceholderWidget.vue b/app/gui2/src/components/widgets/PlaceholderWidget.vue
new file mode 100644
index 0000000000..92d735290a
--- /dev/null
+++ b/app/gui2/src/components/widgets/PlaceholderWidget.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/gui2/src/components/widgets/SliderWidget.vue b/app/gui2/src/components/widgets/SliderWidget.vue
new file mode 100644
index 0000000000..0e32f38c73
--- /dev/null
+++ b/app/gui2/src/components/widgets/SliderWidget.vue
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
diff --git a/app/gui2/src/util/events.ts b/app/gui2/src/util/events.ts
index 17b73e90ab..93da372ee5 100644
--- a/app/gui2/src/util/events.ts
+++ b/app/gui2/src/util/events.ts
@@ -88,6 +88,26 @@ export function useWindowEventConditional
(
})
}
+/**
+ * Add an event listener on document for the duration of condition being true.
+ * @param condition the condition that determines if event is bound
+ * @param event name of event to register
+ * @param handler event handler
+ */
+export function useDocumentEventConditional(
+ event: K,
+ condition: WatchSource,
+ handler: (e: DocumentEventMap[K]) => void,
+ options?: boolean | AddEventListenerOptions,
+): void {
+ watch(condition, (conditionMet, _, onCleanup) => {
+ if (conditionMet) {
+ document.addEventListener(event, handler, options)
+ onCleanup(() => document.removeEventListener(event, handler, options))
+ }
+ })
+}
+
// const hasWindow = typeof window !== 'undefined'
// const platform = hasWindow ? window.navigator?.platform ?? '' : ''
// const isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(platform)