Browse Source

fix: refactor and type infer

pull/6463/head
sreehari jayaraj 1 year ago
parent
commit
e85c7ebbc0
  1. 5
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  2. 2
      packages/nc-gui/components/roles/Badge.vue
  3. 2
      packages/nc-gui/components/workspace/InviteSection.vue

5
packages/nc-gui/components/dlg/share-and-collaborate/View.vue

@ -1,4 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ViewType } from 'nocodb-sdk'
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
import ManageUsers from './ManageUsers.vue' import ManageUsers from './ManageUsers.vue'
import { useViewsStore } from '~/store/views' import { useViewsStore } from '~/store/views'
@ -14,7 +15,7 @@ const { project } = storeToRefs(projectStore)
const { navigateToProjectPage } = projectStore const { navigateToProjectPage } = projectStore
const { activeView } = storeToRefs(useViewsStore()) const { activeView } = storeToRefs(useViewsStore())
let view let view: globalThis.Ref<ViewType | undefined>
if (isViewToolbar) { if (isViewToolbar) {
try { try {
const store = useSmartsheetStoreOrThrow() const store = useSmartsheetStoreOrThrow()
@ -95,7 +96,7 @@ watch(showShareModal, (val) => {
:width="formStatus === 'manageCollaborators' ? '60rem' : '40rem'" :width="formStatus === 'manageCollaborators' ? '60rem' : '40rem'"
> >
<div v-if="formStatus === 'project-collaborateSaving'" class="flex flex-row w-full px-5 justify-between items-center py-1"> <div v-if="formStatus === 'project-collaborateSaving'" class="flex flex-row w-full px-5 justify-between items-center py-1">
<div class="flex text-base" :style="{ fontWeight: 500 }">Adding Members</div> <div class="flex text-base font-bold">Adding Members</div>
<a-spin :indicator="indicator" /> <a-spin :indicator="indicator" />
</div> </div>
<template v-else-if="formStatus === 'project-collaborateSaved'"> <template v-else-if="formStatus === 'project-collaborateSaved'">

2
packages/nc-gui/components/roles/Badge.vue

@ -41,7 +41,7 @@ const roleProperties = computed(() => {
<template> <template>
<div <div
class="flex items-start" class="flex items-start rounded-md"
:class="{ :class="{
'cursor-pointer': clickableRef, 'cursor-pointer': clickableRef,
}" }"

2
packages/nc-gui/components/workspace/InviteSection.vue

@ -135,7 +135,7 @@ const onPaste = (e: ClipboardEvent) => {
const inputArray = pastedText?.split(',') || pastedText?.split(' ') || pastedText?.split('') const inputArray = pastedText?.split(',') || pastedText?.split(' ') || pastedText?.split('')
// if data is pasted to a already existing text in input // if data is pasted to a already existing text in input
// we add existingInput + pasted data // we add existingInput + pasted data
if (inputArray?.length === 1 && inviteData.email.length > 1) { if (inputArray?.length === 1 && inviteData.email.length) {
inputArray[0] = inviteData.email += inputArray[0] inputArray[0] = inviteData.email += inputArray[0]
} }
inputArray?.forEach((el) => { inputArray?.forEach((el) => {

Loading…
Cancel
Save