From f3b0c6f1e7a37973f2d43a8ff56fbe19adc28ac4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 14 Jul 2022 17:52:59 +0900 Subject: [PATCH] chore(client): tweak ui --- packages/client/src/components/ui/tooltip.vue | 2 +- packages/client/src/ui/_common_/navbar.vue | 30 ++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/client/src/components/ui/tooltip.vue b/packages/client/src/components/ui/tooltip.vue index 152c939a1..f81bf2fc5 100644 --- a/packages/client/src/components/ui/tooltip.vue +++ b/packages/client/src/components/ui/tooltip.vue @@ -116,7 +116,7 @@ const setPosition = () => { let top: number; if (props.targetElement) { - left = (rect.left + window.pageXOffset) + props.innerMargin; + left = (rect.left + props.targetElement.offsetWidth + window.pageXOffset) + props.innerMargin; top = rect.top + window.pageYOffset + (props.targetElement.offsetHeight / 2); } else { left = props.x + props.innerMargin; diff --git a/packages/client/src/ui/_common_/navbar.vue b/packages/client/src/ui/_common_/navbar.vue index 4fb398014..924dda25d 100644 --- a/packages/client/src/ui/_common_/navbar.vue +++ b/packages/client/src/ui/_common_/navbar.vue @@ -4,29 +4,38 @@ - - {{ $ts.timeline }} + + {{ i18n.ts.timeline }}
- - {{ $ts.controlPanel }} + + {{ i18n.ts.controlPanel }} - - {{ $ts.settings }} + + {{ i18n.ts.settings }} @@ -38,6 +47,7 @@ import * as os from '@/os'; import { navbarItemDef } from '@/navbar'; import { $i, openAccountMenu as openAccountMenu_ } from '@/account'; import { defaultStore } from '@/store'; +import { i18n } from '@/i18n'; const iconOnly = ref(false);