Browse Source

fix: missing ui features in context menu

pull/6384/head
sreehari jayaraj 1 year ago
parent
commit
eed1d48588
  1. 12
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  2. 2
      packages/nc-gui/components/nc/MenuItem.vue
  3. 4
      packages/nc-gui/components/smartsheet/header/Menu.vue
  4. 3
      packages/nc-gui/windi.config.ts

12
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -530,7 +530,13 @@ const DlgProjectDuplicateOnOk = async (jobData: { id: string; project_id: string
<GeneralIcon icon="settings" class="group-hover:text-black" /> <GeneralIcon icon="settings" class="group-hover:text-black" />
{{ $t('activity.settings') }} {{ $t('activity.settings') }}
</NcMenuItem> </NcMenuItem>
<template v-if="project.bases && project.bases[0]">
<NcDivider />
<!-- Import Data -->
<DashboardTreeViewBaseOptions v-model:project="project" :base="project.bases[0]" />
<NcDivider />
</template>
<!-- Delete -->
<NcMenuItem <NcMenuItem
v-if="isUIAllowed('projectDelete', { roles: [stringifyRolesObj(orgRoles), projectRole].join() })" v-if="isUIAllowed('projectDelete', { roles: [stringifyRolesObj(orgRoles), projectRole].join() })"
data-testid="nc-sidebar-project-delete" data-testid="nc-sidebar-project-delete"
@ -712,8 +718,8 @@ const DlgProjectDuplicateOnOk = async (jobData: { id: string; project_id: string
{{ $t('general.duplicate') }} {{ $t('general.duplicate') }}
</div> </div>
</NcMenuItem> </NcMenuItem>
<NcDivider />
<NcMenuItem v-if="isUIAllowed('tableDelete')" @click="isTableDeleteDialogVisible = true"> <NcMenuItem v-if="isUIAllowed('table-delete')" class="!hover:bg-red-50" @click="isTableDeleteDialogVisible = true">
<div class="nc-project-option-item text-red-600"> <div class="nc-project-option-item text-red-600">
<GeneralIcon icon="delete" /> <GeneralIcon icon="delete" />
{{ $t('general.delete') }} {{ $t('general.delete') }}

2
packages/nc-gui/components/nc/MenuItem.vue

@ -8,7 +8,7 @@
<style lang="scss"> <style lang="scss">
.ant-dropdown-menu-item.nc-menu-item { .ant-dropdown-menu-item.nc-menu-item {
@apply py-2 px-2 mx-1.5 font-normal text-sm rounded-md overflow-hidden hover:bg-gray-100; @apply py-2 px-2 mx-1.5 font-normal text-dropdown rounded-md overflow-hidden hover:bg-gray-100;
} }
.nc-menu-item-inner { .nc-menu-item-inner {

4
packages/nc-gui/components/smartsheet/header/Menu.vue

@ -360,7 +360,7 @@ const onInsertAfter = () => {
</a-menu-item> </a-menu-item>
<a-divider class="!my-0" /> <a-divider class="!my-0" />
<a-menu-item v-if="!column?.pv" @click="handleDelete"> <a-menu-item v-if="!column?.pv" @click="handleDelete" class="!hover:bg-red-50">
<div class="nc-column-delete nc-header-menu-item my-0.75 text-red-600"> <div class="nc-column-delete nc-header-menu-item my-0.75 text-red-600">
<component :is="iconMap.delete" class="ml-0.75 mr-1" /> <component :is="iconMap.delete" class="ml-0.75 mr-1" />
<!-- Delete --> <!-- Delete -->
@ -375,7 +375,7 @@ const onInsertAfter = () => {
<style scoped> <style scoped>
.nc-header-menu-item { .nc-header-menu-item {
@apply text-xs flex items-center px-1 py-2 gap-1; @apply text-dropdown flex items-center px-1 py-2 gap-1;
} }
.nc-column-options { .nc-column-options {

3
packages/nc-gui/windi.config.ts

@ -165,6 +165,9 @@ export default defineConfig({
dark: colors.dark, dark: colors.dark,
light: colors.light, light: colors.light,
}, },
fontSize: {
dropdown: '0.85rem',
},
}, },
}, },
}) })

Loading…
Cancel
Save