Browse Source

fix(nc-gui): pr review changes

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
2737da405a
  1. 6
      packages/nc-gui/components/dlg/ViewCreate.vue
  2. 2
      packages/nc-gui/components/nc/Select.vue
  3. 2
      packages/nc-gui/components/smartsheet/Toolbar.vue
  4. 13
      packages/nc-gui/components/smartsheet/calendar/SideMenu.vue
  5. 12
      packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue
  6. 6
      packages/nc-gui/components/smartsheet/toolbar/CalendarRange.vue

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

@ -451,14 +451,14 @@ onMounted(async () => {
</a-select-option> </a-select-option>
</NcSelect> </NcSelect>
<div <div
v-if="range.fk_to_column_id === null && isEeUI" v-if="range.fk_to_column_id === null && isEeUI && false"
class="cursor-pointer flex items-center text-gray-800 gap-1" class="cursor-pointer flex items-center text-gray-800 gap-1"
@click="range.fk_to_column_id = undefined" @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.addEndDate') }} {{ $t('activity.addEndDate') }}
</div> </div>
<template v-else-if="isEeUI"> <template v-else-if="isEeUI && false">
<span> <span>
{{ $t('activity.withEndDate') }} {{ $t('activity.withEndDate') }}
</span> </span>
@ -508,7 +508,7 @@ onMounted(async () => {
<component :is="iconMap.close" /> <component :is="iconMap.close" />
</NcButton> </NcButton>
</div> </div>
<NcButton class="mt-2" size="small" type="secondary" @click="addCalendarRange"> <NcButton v-if="false" class="mt-2" size="small" type="secondary" @click="addCalendarRange">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
Add another date field Add another date field
</NcButton> </NcButton>

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

@ -47,6 +47,8 @@ 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/components/smartsheet/Toolbar.vue

@ -51,7 +51,7 @@ const { allowCSVDownload } = useSharedView()
<LazySmartsheetToolbarCalendarRange v-if="isCalendar" /> <LazySmartsheetToolbarCalendarRange v-if="isCalendar" />
<LazySmartsheetToolbarFieldsMenu <LazySmartsheetToolbarFieldsMenu
v-if="isGrid || isGallery || isKanban || isMap || isCalendar" v-if="isGrid || isGallery || isKanban || isMap || !isCalendar"
:show-system-fields="false" :show-system-fields="false"
/> />

13
packages/nc-gui/components/smartsheet/calendar/SideMenu.vue

@ -276,7 +276,7 @@ onUnmounted(() => {
:class="{ :class="{
'!hidden': height < 918, '!hidden': height < 918,
}" }"
class="flex flex-col items-center" class="flex flex-col"
> >
<NcDateWeekSelector <NcDateWeekSelector
v-if="activeCalendarView === ('day' as const)" v-if="activeCalendarView === ('day' as const)"
@ -323,14 +323,21 @@ onUnmounted(() => {
<component :is="iconMap.search" class="h-4 w-4 mr-1 text-gray-500" /> <component :is="iconMap.search" class="h-4 w-4 mr-1 text-gray-500" />
</template> </template>
</a-input> </a-input>
<NcSelect v-model:value="sideBarFilterOption" :options="options" /> <NcSelect v-model:value="sideBarFilterOption" class="min-w-36">
<a-select-option v-for="option in options" :key="option.value" :value="option.value">
<NcTooltip :title="option.label" placement="top" show-on-truncate-only>
<template #title>{{ option.label }}</template>
{{ option.label }}
</NcTooltip>
</a-select-option>
</NcSelect>
</div> </div>
<div <div
v-if="calendarRange" v-if="calendarRange"
:ref="sideBarListRef" :ref="sideBarListRef"
:class="{ :class="{
'h-[calc(100vh-10.5rem)]': height < 918, '!h-[calc(100vh-10.5rem)]': height < 918,
'h-[calc(100vh-36.2rem)]': activeCalendarView === ('day' as const) || activeCalendarView === ('week' as const) && height > 918, 'h-[calc(100vh-36.2rem)]': activeCalendarView === ('day' as const) || activeCalendarView === ('week' as const) && height > 918,
'h-[calc(100vh-25.1rem)]': activeCalendarView === ('month' as const) || activeCalendarView === ('year' as const) && height > 918, 'h-[calc(100vh-25.1rem)]': activeCalendarView === ('month' as const) || activeCalendarView === ('year' as const) && height > 918,
}" }"

12
packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue

@ -26,9 +26,9 @@ const emit = defineEmits(['resize-start'])
> >
<NcButton <NcButton
:class="{ :class="{
'!flex border-2 rounded-lg border-brand-500': selected || hover, '!flex border-1 rounded-lg border-brand-500': selected || hover,
}" }"
class="!group-hover:(border-brand-500) !border-2 cursor-ns-resize" class="!group-hover:(border-brand-500) !border-1 cursor-ns-resize"
size="xsmall" size="xsmall"
type="secondary" type="secondary"
@mousedown.stop="emit('resize-start', 'left', $event, record)" @mousedown.stop="emit('resize-start', 'left', $event, record)"
@ -49,9 +49,9 @@ const emit = defineEmits(['resize-start'])
'bg-pink-50': color === 'pink', 'bg-pink-50': color === 'pink',
'bg-purple-50': color === 'purple', 'bg-purple-50': color === 'purple',
'group-hover:(border-brand-500)': resize, 'group-hover:(border-brand-500)': resize,
'!border-brand-500 border-2': selected || hover, '!border-brand-500 border-1': selected || hover,
}" }"
class="relative h-full ml-0.25 border-2 border-gray-50" class="relative h-full ml-0.25 border-1 border-gray-50"
> >
<div class="h-full absolute py-2"> <div class="h-full absolute py-2">
<div <div
@ -82,9 +82,9 @@ const emit = defineEmits(['resize-start'])
> >
<NcButton <NcButton
:class="{ :class="{
'!flex border-2 rounded-lg z-1 cursor-ns-resize border-brand-500': selected || hover, '!flex border-1 rounded-lg z-1 cursor-ns-resize border-brand-500': selected || hover,
}" }"
class="!group-hover:(border-brand-500) !border-2" class="!group-hover:(border-brand-500) !border-1"
size="xsmall" size="xsmall"
type="secondary" type="secondary"
@mousedown.stop="emit('resize-start', 'right', $event, record)" @mousedown.stop="emit('resize-start', 'right', $event, record)"

6
packages/nc-gui/components/smartsheet/toolbar/CalendarRange.vue

@ -150,7 +150,7 @@ const removeRange = async (id: number) => {
</NcSelect> </NcSelect>
<div <div
v-if="range.fk_to_column_id === null && isEeUI" v-if="range.fk_to_column_id === null && isEeUI && false"
class="flex cursor-pointer flex text-gray-800 items-center gap-1" class="flex cursor-pointer flex text-gray-800 items-center gap-1"
@click=" @click="
() => { () => {
@ -162,7 +162,7 @@ const removeRange = async (id: number) => {
<component :is="iconMap.plus" class="h-4 w-4" /> <component :is="iconMap.plus" class="h-4 w-4" />
{{ $t('activity.addEndDate') }} {{ $t('activity.addEndDate') }}
</div> </div>
<template v-else-if="isEeUI"> <template v-else-if="isEeUI && false">
<span> <span>
{{ $t('activity.withEndDate') }} {{ $t('activity.withEndDate') }}
</span> </span>
@ -210,7 +210,7 @@ const removeRange = async (id: number) => {
<component :is="iconMap.close" /> <component :is="iconMap.close" />
</NcButton> </NcButton>
</div> </div>
<NcButton class="mt-2" size="small" type="secondary" @click="addCalendarRange"> <NcButton v-if="false" class="mt-2" size="small" type="secondary" @click="addCalendarRange">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
Add another date field Add another date field
</NcButton> </NcButton>

Loading…
Cancel
Save