From c272fa903df2ce473a8a66bbd1411d779fc2151f Mon Sep 17 00:00:00 2001 From: arabcoders Date: Sun, 4 Jan 2026 23:25:30 +0300 Subject: [PATCH] Feat: Add popover component with the ability to disable it --- ui/app/components/Popover.vue | 350 ++++++++++++++++++++++++++++ ui/app/components/SettingsPanel.vue | 14 ++ ui/app/types/popover.d.ts | 16 ++ 3 files changed, 380 insertions(+) create mode 100644 ui/app/components/Popover.vue create mode 100644 ui/app/types/popover.d.ts diff --git a/ui/app/components/Popover.vue b/ui/app/components/Popover.vue new file mode 100644 index 00000000..0ad176f4 --- /dev/null +++ b/ui/app/components/Popover.vue @@ -0,0 +1,350 @@ + + + + + diff --git a/ui/app/components/SettingsPanel.vue b/ui/app/components/SettingsPanel.vue index a792ac32..8c4ced72 100644 --- a/ui/app/components/SettingsPanel.vue +++ b/ui/app/components/SettingsPanel.vue @@ -140,6 +140,19 @@ Choose the aspect ratio for thumbnail display.

+
+ +
+ + +
+

+ + Show additional information over certain elements. +

+
@@ -244,6 +257,7 @@ const toast_position = useStorage('toast_position', POSITION.TOP_RIGHT const toast_dismiss_on_click = useStorage('toast_dismiss_on_click', true) const toast_target = useStorage('toast_target', 'toast') const show_thumbnail = useStorage('show_thumbnail', true) +const show_popover = useStorage('show_popover', true) const thumbnail_ratio = useStorage<'is-16by9' | 'is-3by1'>('thumbnail_ratio', 'is-3by1') const separator = useStorage('url_separator', separators[0]?.value ?? ',') const simpleMode = useStorage('simple_mode', config.app.simple_mode || false) diff --git a/ui/app/types/popover.d.ts b/ui/app/types/popover.d.ts new file mode 100644 index 00000000..fe9c28fb --- /dev/null +++ b/ui/app/types/popover.d.ts @@ -0,0 +1,16 @@ +export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' +export type PopoverTrigger = 'hover' | 'click' | 'focus' + +export interface PopoverProps { + title?: string + description?: string + placement?: PopoverPlacement + trigger?: PopoverTrigger + offset?: number + disabled?: boolean + closeOnClickOutside?: boolean + minWidth?: number + maxWidth?: number + maxHeight?: number + showDelay?: number +}