Browse Source

refactor(gui-v2): show tooltip in bottomEnd when sidebar is open

pull/2948/head
braks 2 years ago
parent
commit
f6bfdd262d
  1. 6
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue
  2. 8
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue
  3. 7
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/Reload.vue
  4. 2
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue

6
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue

@ -1,11 +1,15 @@
<script setup lang="ts">
import MdiAddIcon from '~icons/mdi/plus-outline'
import { inject, ref } from '#imports'
import { RightSidebarInj } from '~/context'
const emits = defineEmits(['addRow'])
const sidebarOpen = inject(RightSidebarInj, ref(true))
</script>
<template>
<a-tooltip placement="left">
<a-tooltip :placement="sidebarOpen ? 'bottomRight' : 'left'">
<template #title> {{ $t('activity.addRow') }} </template>
<div class="nc-sidebar-right-item hover:after:bg-primary/75 group">

8
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue

@ -1,15 +1,17 @@
<script setup lang="ts">
import { inject, useTable } from '#imports'
import { MetaInj } from '~/context'
import { inject, ref, useTable } from '#imports'
import { MetaInj, RightSidebarInj } from '~/context'
import MdiDeleteIcon from '~icons/mdi/delete-outline'
const meta = inject(MetaInj)
const { deleteTable } = useTable()
const sidebarOpen = inject(RightSidebarInj, ref(true))
</script>
<template>
<a-tooltip placement="left">
<a-tooltip :placement="sidebarOpen ? 'bottomRight' : 'left'">
<template #title> {{ $t('activity.deleteTable') }} </template>
<div class="nc-sidebar-right-item hover:after:bg-red-500 group">

7
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/Reload.vue

@ -1,12 +1,15 @@
<script setup lang="ts">
import { ReloadViewDataHookInj } from '~/context'
import { ReloadViewDataHookInj, RightSidebarInj } from '~/context'
import MdiReloadIcon from '~icons/mdi/reload'
import { inject, ref } from '#imports'
const reloadTri = inject(ReloadViewDataHookInj)
const sidebarOpen = inject(RightSidebarInj, ref(true))
</script>
<template>
<a-tooltip placement="left">
<a-tooltip :placement="sidebarOpen ? 'bottomRight' : 'left'">
<template #title> {{ $t('general.reload') }} </template>
<div class="nc-sidebar-right-item hover:after:bg-green-500 group">

2
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue

@ -8,7 +8,7 @@ const sidebarOpen = inject(RightSidebarInj, ref(false))
</script>
<template>
<a-tooltip placement="left">
<a-tooltip :placement="sidebarOpen ? 'bottomRight' : 'left'">
<template #title> {{ $t('tooltip.toggleNavDraw') }} </template>
<div class="nc-sidebar-right-item hover:after:bg-pink-500 group">

Loading…
Cancel
Save