Browse Source

fix(nc-gui): some browser console warnings

pull/7855/head
Ramesh Mane 4 months ago
parent
commit
67801754c0
  1. 2
      packages/nc-gui/components/account/Profile.vue
  2. 6
      packages/nc-gui/components/account/Token.vue
  3. 4
      packages/nc-gui/components/account/UserList.vue
  4. 3
      packages/nc-gui/components/nc/Switch.vue
  5. 2
      packages/nc-gui/components/project/AccessSettings.vue
  6. 4
      packages/nc-gui/components/roles/Selector.vue
  7. 2
      packages/nc-gui/components/smartsheet/Form.vue
  8. 15
      packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue
  9. 2
      packages/nc-gui/components/workspace/CollaboratorsList.vue
  10. 2
      packages/nc-gui/components/workspace/InviteSection.vue

2
packages/nc-gui/components/account/Profile.vue

@ -94,7 +94,7 @@ const onValidate = async (_: any, valid: boolean) => {
<a-input
v-model:value="email"
class="w-full !rounded-md !py-1.5"
:placeholder="$t('general.email')"
:placeholder="$t('labels.email')"
disabled
data-testid="nc-account-settings-email-input"
/>

6
packages/nc-gui/components/account/Token.vue

@ -312,17 +312,17 @@ const handleCancel = () => {
class="flex pl-5 py-3 justify-between token items-center border-l-1 border-r-1 border-b-1"
>
<span class="text-black font-bold text-3.5 text-start w-2/9">
<GeneralTruncateText placement="top" length="20">
<GeneralTruncateText placement="top" :length="20">
{{ el.description }}
</GeneralTruncateText>
</span>
<span class="text-gray-500 font-medium text-3.5 text-start w-2/9">
<GeneralTruncateText placement="top" length="20">
<GeneralTruncateText placement="top" :length="20">
{{ el.created_by }}
</GeneralTruncateText>
</span>
<span class="text-gray-500 font-medium text-3.5 text-start w-3/9">
<GeneralTruncateText v-if="el.token === selectedToken.id && selectedToken.isShow" placement="top" length="29">
<GeneralTruncateText v-if="el.token === selectedToken.id && selectedToken.isShow" placement="top" :length="29">
{{ el.token }}
</GeneralTruncateText>
<span v-else>************************************</span>

4
packages/nc-gui/components/account/UserList.vue

@ -239,11 +239,11 @@ const openDeleteModal = (user: UserType) => {
<template #title>
{{ el.email }}
</template>
<GeneralTruncateText length="29">
<GeneralTruncateText :length="29">
{{ el.display_name }}
</GeneralTruncateText>
</NcTooltip>
<GeneralTruncateText v-else length="29">
<GeneralTruncateText v-else :length="29">
{{ el.email }}
</GeneralTruncateText>
</div>

3
packages/nc-gui/components/nc/Switch.vue

@ -13,7 +13,8 @@ const onChange = (e: boolean) => {
</script>
<template>
<a-switch v-model:checked="checked" :disabled="disabled" class="nc-switch" :size="size" @change="onChange"> </a-switch>
<a-switch v-model:checked="checked" :disabled="disabled" class="nc-switch" v-bind="$attrs" :size="size" @change="onChange">
</a-switch>
<span v-if="$slots.default" class="cursor-pointer pl-2" @click="checked = !checked">
<slot />
</span>

2
packages/nc-gui/components/project/AccessSettings.vue

@ -224,7 +224,7 @@ watch(isInviteModalVisible, () => {
: null
"
:description="false"
:on-role-change="(role: ProjectRoles) => updateCollaborator(collab, role)"
:on-role-change="(role) => updateCollaborator(collab, role as ProjectRoles)"
/>
</template>
<template v-else>

4
packages/nc-gui/components/roles/Selector.vue

@ -11,7 +11,7 @@ const props = withDefaults(
description?: boolean
inherit?: string
onRoleChange: (role: keyof typeof RoleLabels) => void
size: 'sm' | 'md' | 'lg'
size?: 'sm' | 'md' | 'lg'
}>(),
{
description: true,
@ -38,7 +38,7 @@ function onChangeRole(val: SelectValue) {
<div ref="dropdownRef" size="lg" class="nc-roles-selector relative" @click="isDropdownOpen = !isDropdownOpen">
<RolesBadge data-testid="roles" :role="roleRef" :inherit="inheritRef === role" :size="sizeRef" clickable />
<a-select
v-model:value="roleRef"
:value="roleRef"
:open="isDropdownOpen"
:dropdown-match-select-width="false"
dropdown-class-name="!rounded-lg !h-fit max-w-[350px] nc-role-selector-dropdown"

2
packages/nc-gui/components/smartsheet/Form.vue

@ -456,7 +456,7 @@ async function submitCallback() {
}
const updateColMeta = useDebounceFn(async (col: Record<string, any>) => {
if (col.id) {
if (col.id && isEditable) {
try {
await $api.dbView.formColumnUpdate(col.id, col)
} catch (e: any) {

15
packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue

@ -3,11 +3,16 @@ import type { TableType, ViewType } from 'nocodb-sdk'
import { ViewTypes } from 'nocodb-sdk'
import { LockType } from '~/lib'
const props = defineProps<{
view: ViewType
table: TableType
inSidebar: boolean
}>()
const props = withDefaults(
defineProps<{
view: ViewType
table: TableType
inSidebar?: boolean
}>(),
{
inSidebar: false,
},
)
const emits = defineEmits(['rename', 'closeModal', 'delete'])

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

@ -118,7 +118,7 @@ onMounted(async () => {
:roles="accessibleRoles"
:description="false"
class="cursor-pointer"
:on-role-change="(role: WorkspaceUserRoles) => updateCollaborator(collab, role)"
:on-role-change="(role) => updateCollaborator(collab, role as WorkspaceUserRoles)"
/>
</div>
</template>

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

@ -242,7 +242,7 @@ const onPaste = (e: ClipboardEvent) => {
class="px-1 min-w-[152px] nc-invite-role-selector"
:role="inviteData.roles"
:roles="allowedRoles"
:on-role-change="(role: WorkspaceUserRoles) => (inviteData.roles = role)"
:on-role-change="(role) => (inviteData.roles = role as WorkspaceUserRoles)"
:description="true"
/>

Loading…
Cancel
Save