Browse Source

refactor(gui-v2): replace toast with message

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2860/head
Pranav C 2 years ago
parent
commit
71421e2275
  1. 2
      packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilterMenu.vue
  2. 6
      packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue
  3. 3
      packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue

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

@ -39,7 +39,7 @@ const applyChanges = async () => {
ref="filterComp" ref="filterComp"
class="nc-table-toolbar-menu" class="nc-table-toolbar-menu"
:auto-save="autosave" :auto-save="autosave"
@update:filtersLength="filtersLength = $event" @update:filters-length="filtersLength = $event"
> >
<div class="d-flex align-end mt-2 min-h-[30px]" @click.stop> <div class="d-flex align-end mt-2 min-h-[30px]" @click.stop>
<a-checkbox id="col-filter-checkbox" v-model:checked="autosave" class="col-filter-checkbox" hide-details dense> <a-checkbox id="col-filter-checkbox" v-model:checked="autosave" class="col-filter-checkbox" hide-details dense>

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

@ -2,6 +2,7 @@
import { useClipboard } from '@vueuse/core' import { useClipboard } from '@vueuse/core'
import { ViewTypes } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk'
import { computed } from 'vue' import { computed } from 'vue'
import { message } from 'ant-design-vue'
import { useToast } from 'vue-toastification' import { useToast } from 'vue-toastification'
import { useNuxtApp } from '#app' import { useNuxtApp } from '#app'
import { useSmartsheetStoreOrThrow } from '#imports' import { useSmartsheetStoreOrThrow } from '#imports'
@ -13,8 +14,8 @@ const { isUIAllowed } = useUIPermission()
const { view, $api } = useSmartsheetStoreOrThrow() const { view, $api } = useSmartsheetStoreOrThrow()
const { copy } = useClipboard() const { copy } = useClipboard()
const toast = useToast()
const { $e } = useNuxtApp() const { $e } = useNuxtApp()
const toast = useToast()
const { dashboardUrl } = useDashboard() const { dashboardUrl } = useDashboard()
let showShareModel = $ref(false) let showShareModel = $ref(false)
@ -95,7 +96,7 @@ const saveShareLinkPassword = async () => {
const copyLink = () => { const copyLink = () => {
copy(sharedViewUrl?.value as string) copy(sharedViewUrl?.value as string)
toast.info('Copied to clipboard') message.success('Copied to clipboard')
} }
</script> </script>
@ -159,6 +160,7 @@ const copyLink = () => {
.share-link-box { .share-link-box {
@apply flex p-2 w-full items-center align-center gap-1 bg-gray-100 rounded; @apply flex p-2 w-full items-center align-center gap-1 bg-gray-100 rounded;
} }
:deep(.ant-collapse-header) { :deep(.ant-collapse-header) {
@apply !text-xs; @apply !text-xs;
} }

3
packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue

@ -2,6 +2,7 @@
import { useClipboard } from '@vueuse/core' import { useClipboard } from '@vueuse/core'
import { ViewTypes } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk'
import { useToast } from 'vue-toastification' import { useToast } from 'vue-toastification'
import { message } from 'ant-design-vue'
import { useRoute } from '#app' import { useRoute } from '#app'
import { onMounted, useSmartsheetStoreOrThrow } from '#imports' import { onMounted, useSmartsheetStoreOrThrow } from '#imports'
import { extractSdkResponseErrorMsg } from '~/utils/errorUtils' import { extractSdkResponseErrorMsg } from '~/utils/errorUtils'
@ -80,7 +81,7 @@ const renderAllowCSVDownload = (view: SharedViewType) => {
const copyLink = (view: SharedViewType) => { const copyLink = (view: SharedViewType) => {
copy(`${dashboardUrl?.value as string}/${sharedViewUrl(view)}`) copy(`${dashboardUrl?.value as string}/${sharedViewUrl(view)}`)
toast.info('Copied to clipboard') message.success('Copied to clipboard')
} }
const deleteLink = async (id: string) => { const deleteLink = async (id: string) => {

Loading…
Cancel
Save