Browse Source

feat(gui-v2): confirm before delete

pull/2837/head
braks 2 years ago
parent
commit
e1e2e93dc2
  1. 17
      packages/nc-gui-v2/components/smartsheet/Sidebar.vue
  2. 10
      packages/nc-gui-v2/nuxt.config.ts
  3. 5
      packages/nc-gui-v2/tsconfig.json

17
packages/nc-gui-v2/components/smartsheet/Sidebar.vue

@ -211,13 +211,6 @@ async function onDelete(index: number) {
$e('a:view:delete', { view: view.type })
}
onMounted(() => {
notification.open({
message: 'Welcome to the View Manager',
duration: 3,
})
})
/** Rename a view */
async function onRename(index: number) {
// todo: validate if title is unique and not empty
@ -309,13 +302,21 @@ function onStopEdit() {
<MdiContentCopy class="hidden group-hover:block text-gray-500" @click.stop="onDuplicate(i)" />
</a-tooltip>
<a-popconfirm
placement="left"
:title="$t('msg.info.deleteProject')"
:ok-text="$t('general.yes')"
:cancel-text="$t('general.no')"
@confirm="onDelete(i)"
>
<a-tooltip placement="left">
<template #title>
{{ $t('activity.deleteView') }}
</template>
<MdiTrashCan class="hidden group-hover:block text-red-500" @click.stop="onDelete(i)" />
<MdiTrashCan class="hidden group-hover:block text-red-500" @click.stop />
</a-tooltip>
</a-popconfirm>
</div>
</div>
</a-menu-item>

10
packages/nc-gui-v2/nuxt.config.ts

@ -87,4 +87,14 @@ export default defineNuxtConfig({
reactivityTransform: true,
viteNode: false,
},
typescript: {
typeCheck: true,
strict: true,
tsConfig: {
compilerOptions: {
types: ['@intlify/vite-plugin-vue-i18n/client', 'vue-i18n', 'unplugin-icons/types/vue', 'nuxt-windicss'],
},
},
},
})

5
packages/nc-gui-v2/tsconfig.json

@ -12,16 +12,11 @@
"forceConsistentCasingInFileNames": true,
"types": [
"@intlify/vite-plugin-vue-i18n/client",
"vue/macro",
"vue-i18n",
"unplugin-icons/types/vue",
"nuxt-windicss"
]
},
"files": [
"nuxt-shim.d.ts",
"windi.config.ts"
],
"exclude": [
"node_modules",
"dist",

Loading…
Cancel
Save