Browse Source

fix/minor ui improvements and bug fix

pull/3185/head
Muhammed Mustafa 2 years ago
parent
commit
91ba29887a
  1. 8
      packages/nc-gui-v2/components/cell/Url.vue
  2. 19
      packages/nc-gui-v2/package-lock.json
  3. 1
      packages/nc-gui-v2/package.json

8
packages/nc-gui-v2/components/cell/Url.vue

@ -2,7 +2,7 @@
import type { VNodeRef } from '@vue/runtime-core'
import { message } from 'ant-design-vue'
import { ColumnInj, EditModeInj, computed, inject, isValidURL } from '#imports'
import MaterialSymbolsWarning from '~icons/material-symbols/warning'
import MiCircleWarning from '~icons/mi/circle-warning'
interface Props {
modelValue?: string | null
@ -29,7 +29,7 @@ const vModel = computed({
},
})
const isValid = computed(() => !column.value.meta?.validate || (value && isValidURL(value)))
const isValid = computed(() => value && isValidURL(value))
const url = computed(() => {
if (!value || !isValidURL(value)) return ''
@ -63,11 +63,11 @@ watch(
<span v-else class="w-9/10 overflow-ellipsis overflow-hidden">{{ value }}</span>
<div v-if="!isValid && value?.length && !editEnabled" class="mr-1 w-1/10">
<div v-if="column.meta?.validate && !isValid && value?.length && !editEnabled" class="mr-1 w-1/10">
<a-tooltip placement="top">
<template #title> Invalid URL </template>
<div class="flex flex-row items-center">
<MaterialSymbolsWarning />
<MiCircleWarning class="text-red-400 h-4" />
</div>
</a-tooltip>
</div>

19
packages/nc-gui-v2/package-lock.json generated

@ -37,6 +37,7 @@
"@iconify-json/lucide": "^1.1.36",
"@iconify-json/material-symbols": "^1.1.8",
"@iconify-json/mdi": "^1.1.25",
"@iconify-json/mi": "^1.1.2",
"@iconify-json/ri": "^1.1.3",
"@intlify/vite-plugin-vue-i18n": "^6.0.1",
"@nuxt/image-edge": "^1.0.0-27657146.da85542",
@ -1056,6 +1057,15 @@
"@iconify/types": "*"
}
},
"node_modules/@iconify-json/mi": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@iconify-json/mi/-/mi-1.1.2.tgz",
"integrity": "sha512-NPyKBxoui8Oude4ChB80iBLRdI22xpM6JFFYpDHycxREQgzfVyoOuX1ukpbWOe+IkEVvFFLZzSDOlPcipn1cgw==",
"dev": true,
"dependencies": {
"@iconify/types": "*"
}
},
"node_modules/@iconify-json/ri": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.1.3.tgz",
@ -15940,6 +15950,15 @@
"@iconify/types": "*"
}
},
"@iconify-json/mi": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@iconify-json/mi/-/mi-1.1.2.tgz",
"integrity": "sha512-NPyKBxoui8Oude4ChB80iBLRdI22xpM6JFFYpDHycxREQgzfVyoOuX1ukpbWOe+IkEVvFFLZzSDOlPcipn1cgw==",
"dev": true,
"requires": {
"@iconify/types": "*"
}
},
"@iconify-json/ri": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.1.3.tgz",

1
packages/nc-gui-v2/package.json

@ -43,6 +43,7 @@
"@iconify-json/lucide": "^1.1.36",
"@iconify-json/material-symbols": "^1.1.8",
"@iconify-json/mdi": "^1.1.25",
"@iconify-json/mi": "^1.1.2",
"@iconify-json/ri": "^1.1.3",
"@intlify/vite-plugin-vue-i18n": "^6.0.1",
"@nuxt/image-edge": "^1.0.0-27657146.da85542",

Loading…
Cancel
Save