Browse Source

fix(nc-gui): view create modal design fix

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
7b534ee1ff
  1. 46
      packages/nc-gui/components/dlg/ViewCreate.vue
  2. 2
      packages/nc-gui/components/nc/Select.vue
  3. 2
      packages/nc-gui/lang/en.json

46
packages/nc-gui/components/dlg/ViewCreate.vue

@ -37,7 +37,7 @@ interface Form {
// for calendar view only // for calendar view only
calendarRange: Array<{ calendarRange: Array<{
fk_from_column_id: string fk_from_column_id: string
fk_to_column_id: string | null // for ee only fk_to_column_id: string | undefined // for ee only
}> }>
} }
@ -371,7 +371,7 @@ onMounted(async () => {
</div> </div>
<a <a
v-if="!form.copy_from_id" v-if="!form.copy_from_id"
class="text-sm !no-underline !hover:text-brand-500 text-brand-500" class="text-sm !text-gray-600 !hover:text-gray-600"
href="https://docs.nocodb.com/views/view-types/calendar/" href="https://docs.nocodb.com/views/view-types/calendar/"
target="_blank" target="_blank"
> >
@ -428,19 +428,24 @@ onMounted(async () => {
<span> <span>
{{ $t('labels.organiseBy') }} {{ $t('labels.organiseBy') }}
</span> </span>
<NcSelect <NcSelect v-model:value="range.fk_from_column_id" :disabled="isMetaLoading" :loading="isMetaLoading">
v-model:value="range.fk_from_column_id" <a-select-option v-for="(option, id) in viewSelectFieldOptions" :key="id" :value="option.value">
:disabled="isMetaLoading" <div class="flex items-center">
:loading="isMetaLoading" <SmartsheetHeaderIcon :column="option" />
:options="viewSelectFieldOptions" <NcTooltip class="truncate flex-1" placement="top" show-on-truncate-only>
/> <template #title>{{ option.label }}</template>
{{ option.label }}
</NcTooltip>
</div>
</a-select-option>
</NcSelect>
<div <div
v-if="range.fk_to_column_id === null && isEeUI" v-if="range.fk_to_column_id === null && isEeUI"
class="cursor-pointer flex items-center gap-1 mb-1" class="cursor-pointer flex items-center text-gray-800 gap-1"
@click="range.fk_to_column_id = ''" @click="range.fk_to_column_id = undefined"
> >
<component :is="iconMap.plus" class="h-4 w-4" /> <component :is="iconMap.plus" class="h-4 w-4" />
{{ $t('activity.setEndDate') }} {{ $t('activity.addEndDate') }}
</div> </div>
<template v-else-if="isEeUI"> <template v-else-if="isEeUI">
<span> <span>
@ -451,11 +456,20 @@ onMounted(async () => {
v-model:value="range.fk_to_column_id" v-model:value="range.fk_to_column_id"
:disabled="isMetaLoading" :disabled="isMetaLoading"
:loading="isMetaLoading" :loading="isMetaLoading"
:options="viewSelectFieldOptions"
:placeholder="$t('placeholder.notSelected')" :placeholder="$t('placeholder.notSelected')"
class="!rounded-r-none nc-to-select" class="!rounded-r-none nc-to-select"
/> >
<NcButton class="!rounded-l-none" size="small" type="secondary" @click="range.fk_to_column_id = null"> <a-select-option v-for="(option, id) in viewSelectFieldOptions" :key="id" :value="option.value">
<div class="flex items-center">
<SmartsheetHeaderIcon :column="option" />
<NcTooltip class="truncate flex-1" placement="top" show-on-truncate-only>
<template #title>{{ option.label }}</template>
{{ option.label }}
</NcTooltip>
</div>
</a-select-option>
</NcSelect>
<NcButton class="!rounded-l-none !border-l-0" size="small" type="secondary" @click="range.fk_to_column_id = null">
<component :is="iconMap.delete" class="h-4 w-4" /> <component :is="iconMap.delete" class="h-4 w-4" />
</NcButton> </NcButton>
</div> </div>
@ -498,4 +512,8 @@ onMounted(async () => {
@apply !content-['']; @apply !content-[''];
} }
} }
.nc-to-select .ant-select-selector {
@apply !rounded-r-none;
}
</style> </style>

2
packages/nc-gui/components/nc/Select.vue

@ -47,8 +47,6 @@ const onChange = (value: string) => {
:allow-clear="allowClear" :allow-clear="allowClear"
:disabled="loading" :disabled="loading"
:dropdown-class-name="dropdownClassName" :dropdown-class-name="dropdownClassName"
:dropdown-match-select-width="dropdownMatchSelectWidth"
:filter-option="filterOption"
:loading="loading" :loading="loading"
:mode="mode" :mode="mode"
:placeholder="placeholder" :placeholder="placeholder"

2
packages/nc-gui/lang/en.json

@ -683,7 +683,7 @@
} }
}, },
"activity": { "activity": {
"setEndDate": "Set End Date", "addEndDate": "Add end date",
"withEndDate": "with end date", "withEndDate": "with end date",
"calendar": "Calendar", "calendar": "Calendar",
"viewSettings": "View settings", "viewSettings": "View settings",

Loading…
Cancel
Save