mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-03 21:57:01 +00:00
Nc feat/Readonly source followup (#8795)
* feat: allow partial column update (GUI) * feat: allow partial column update (backend) * refactor: swagger schema description correction * feat: allow edit from multi field editor * fix: allow meta update in api level * fix: add tooltip and docs link * fix: multi field editor corrections * fix: allow table meta update * fix: allow table meta update * fix: allow column validation update * fix: block adding new option directly from cell * fix: add tooltip for column menu options * refactor: tooltips * test: replace index with count as parameter * fix: corrections * refactor: hint text update
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
allowMetaWrite: boolean
|
||||
allowDataWrite: boolean
|
||||
}>()
|
||||
|
||||
const emits = defineEmits(['update:allowMetaWrite', 'update:allowDataWrite'])
|
||||
|
||||
const dataWrite = useVModel(props, 'allowDataWrite', emits)
|
||||
const metaWrite = useVModel(props, 'allowMetaWrite', emits)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-form-item>
|
||||
<template #help>
|
||||
<span class="text-small">
|
||||
{{ $t('tooltip.allowDataWrite') }}
|
||||
</span>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="flex gap-1 justify-end">
|
||||
<span>
|
||||
{{ $t('labels.allowDataWrite') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="flex justify-start">
|
||||
<NcTooltip :disabled="!metaWrite" placement="topLeft">
|
||||
<template #title>
|
||||
{{ $t('tooltip.dataWriteOptionDisabled') }}
|
||||
</template>
|
||||
<a-switch v-model:checked="dataWrite" :disabled="metaWrite" data-testid="nc-allow-data-write" size="small"></a-switch>
|
||||
</NcTooltip>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<template #help>
|
||||
<span class="text-small">
|
||||
<span class="font-weight-medium" :class="{ 'nc-allow-meta-write-help': metaWrite }">
|
||||
{{ $t('labels.notRecommended') }}:
|
||||
</span>
|
||||
{{ $t('tooltip.allowMetaWrite') }}
|
||||
</span>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="flex gap-1 justify-end">
|
||||
<span>
|
||||
{{ $t('labels.allowMetaWrite') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<a-switch v-model:checked="metaWrite" data-testid="nc-allow-meta-write" class="nc-allow-meta-write" size="small"></a-switch>
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.nc-allow-meta-write.ant-switch-checked {
|
||||
background: #b33870;
|
||||
}
|
||||
|
||||
.nc-allow-meta-write-help {
|
||||
color: #b33870;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user