feat: add tooltip for right top widget of windows
This commit is contained in:
parent
04a328159b
commit
4710871c97
|
@ -4,7 +4,7 @@ import WindowMax from '@/components/icons/WindowMax.vue'
|
||||||
import WindowClose from '@/components/icons/WindowClose.vue'
|
import WindowClose from '@/components/icons/WindowClose.vue'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useThemeVars } from 'naive-ui'
|
import { useThemeVars } from 'naive-ui'
|
||||||
import { Quit, WindowMinimise, WindowToggleMaximise } from 'wailsjs/runtime/runtime.js'
|
import { Quit, WindowIsMaximised, WindowMinimise, WindowToggleMaximise } from 'wailsjs/runtime/runtime.js'
|
||||||
|
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -33,15 +33,30 @@ const handleClose = () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-space :wrap-item="false" align="center" justify="center" :size="0">
|
<n-space :wrap-item="false" align="center" justify="center" :size="0">
|
||||||
|
<n-tooltip :show-arrow="false">
|
||||||
|
{{ $t('menu.minimise') }}
|
||||||
|
<template #trigger>
|
||||||
<div class="btn-wrapper" @click="handleMinimise">
|
<div class="btn-wrapper" @click="handleMinimise">
|
||||||
<window-min />
|
<window-min />
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</n-tooltip>
|
||||||
|
<n-tooltip :show-arrow="false">
|
||||||
|
{{ WindowIsMaximised() ? $t('menu.restore') : $t('menu.maximise') }}
|
||||||
|
<template #trigger>
|
||||||
<div class="btn-wrapper" @click="handleMaximise">
|
<div class="btn-wrapper" @click="handleMaximise">
|
||||||
<window-max />
|
<window-max />
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</n-tooltip>
|
||||||
|
<n-tooltip :show-arrow="false">
|
||||||
|
{{ $t('menu.close') }}
|
||||||
|
<template #trigger>
|
||||||
<div class="btn-wrapper" @click="handleClose">
|
<div class="btn-wrapper" @click="handleClose">
|
||||||
<window-close />
|
<window-close />
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</n-tooltip>
|
||||||
</n-space>
|
</n-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -180,6 +180,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
"minimise": "Minimise",
|
||||||
|
"maximise": "Maximise",
|
||||||
|
"restore": "Restore Down",
|
||||||
|
"close": "Close",
|
||||||
"preferences": "Preferences",
|
"preferences": "Preferences",
|
||||||
"help": "Help",
|
"help": "Help",
|
||||||
"check_update": "Check for Updates..."
|
"check_update": "Check for Updates..."
|
||||||
|
|
|
@ -181,6 +181,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
"minimise": "最小化",
|
||||||
|
"maximise": "最大化",
|
||||||
|
"restore": "还原",
|
||||||
|
"close": "关闭",
|
||||||
"preferences": "偏好设置",
|
"preferences": "偏好设置",
|
||||||
"help": "帮助",
|
"help": "帮助",
|
||||||
"check_update": "检查更新..."
|
"check_update": "检查更新..."
|
||||||
|
|
Loading…
Reference in New Issue