From f76d5deb6e626b15b747cea78a7116a7d9064103 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 23 Apr 2022 15:23:38 -0500 Subject: [PATCH] Tooltips overhaul --- src/components/Nav.vue | 28 +++-- src/components/Options.vue | 2 +- src/components/fields/Slider.vue | 2 +- src/features/achievements/Achievement.vue | 4 +- src/features/tooltip.ts | 25 ---- .../tooltips}/Tooltip.vue | 80 +++++++++--- src/features/tooltips/tooltip.ts | 115 ++++++++++++++++++ src/features/trees/Tree.vue | 7 -- src/features/trees/TreeNode.vue | 66 +--------- src/features/trees/tree.ts | 15 --- src/util/proxies.ts | 6 +- src/util/vue.tsx | 8 +- 12 files changed, 212 insertions(+), 146 deletions(-) delete mode 100644 src/features/tooltip.ts rename src/{components => features/tooltips}/Tooltip.vue (59%) create mode 100644 src/features/tooltips/tooltip.ts diff --git a/src/components/Nav.vue b/src/components/Nav.vue index 05ae72a..66453b3 100644 --- a/src/components/Nav.vue +++ b/src/components/Nav.vue @@ -3,7 +3,7 @@
{{ title }}
- v{{ versionNumber }}
@@ -26,51 +26,56 @@
- + forum
- + info
- + library_books
- + settings
- + v{{ versionNumber }}
- + library_books
- + settings
- + info
- + forum @@ -105,7 +110,8 @@ import { ComponentPublicInstance, ref } from "vue"; import Info from "./Info.vue"; import Options from "./Options.vue"; import SavesManager from "./SavesManager.vue"; -import Tooltip from "./Tooltip.vue"; +import Tooltip from "features/tooltips/Tooltip.vue"; +import { TooltipDirection } from "features/tooltips/tooltip"; const info = ref | null>(null); const savesManager = ref | null>(null); diff --git a/src/components/Options.vue b/src/components/Options.vue index b2281aa..afc9739 100644 --- a/src/components/Options.vue +++ b/src/components/Options.vue @@ -30,7 +30,7 @@ import { coerceComponent, render } from "util/vue"; import { computed, ref, toRefs } from "vue"; import Select from "./fields/Select.vue"; import Toggle from "./fields/Toggle.vue"; -import Tooltip from "./Tooltip.vue"; +import Tooltip from "features/tooltips/Tooltip.vue"; const isOpen = ref(false); diff --git a/src/components/fields/Slider.vue b/src/components/fields/Slider.vue index 7ac610f..a6371e8 100644 --- a/src/components/fields/Slider.vue +++ b/src/components/fields/Slider.vue @@ -9,7 +9,7 @@