Skip to content

Commit

Permalink
fixup! feat(TimePicker): to native
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <[email protected]>
  • Loading branch information
GVodyanov committed Nov 12, 2024
1 parent e98bafc commit 2bc13af
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions src/components/Editor/Properties/PropertyTitleTimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div v-if="!isReadOnly"
class="property-title-time-picker__time-pickers">
<div :class="{ 'property-title-time-picker__time-pickers--all-day': isAllDay && !showTimezoneSelect}"
<div :class="{ 'property-title-time-picker__time-pickers--all-day': isAllDay}"
class="property-title-time-picker__time-pickers__inner">
<div class="property-title-time-picker__time-pickers-from">
<span>{{ $t('calendar', 'From') }}</span>
Expand All @@ -23,7 +23,7 @@
:date="startDate"
type="time"
@change="changeStartTime" />
<NcTimezonePicker v-if="showTimezoneSelect" :value="startTimezone" @input="changeStartTimezone" />
<NcTimezonePicker v-if="showTimezoneSelect && !isAllDay" :value="startTimezone" @input="changeStartTimezone" />
</div>

<div class="property-title-time-picker__time-pickers-to">
Expand All @@ -35,10 +35,10 @@
:date="endDate"
type="time"
@change="changeEndTime" />
<NcTimezonePicker v-if="showTimezoneSelect" :value="endTimezone" @input="changeEndTimezone" />
<NcTimezonePicker v-if="showTimezoneSelect && !isAllDay" :value="endTimezone" @input="changeEndTimezone" />
</div>
</div>
<NcButton v-if="!showTimezoneSelect"
<NcButton v-if="!showTimezoneSelect && !isAllDay"
type="tertiary"
@click="showTimezoneSelect = !showTimezoneSelect">
<template>
Expand Down Expand Up @@ -339,7 +339,7 @@ export default {
height: var(--default-clickable-area);
overflow-y: clip !important;
flex-grow: 2;
min-width: 200px !important;
min-width: 200px;
flex-shrink: 1;
margin: 0;
}
Expand All @@ -358,9 +358,9 @@ export default {
.property-title-time-picker__time-pickers-from, .property-title-time-picker__time-pickers-to {
display: flex;
flex-wrap: nowrap;
flex-wrap: wrap;

Check warning on line 361 in src/components/Editor/Properties/PropertyTitleTimePicker.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Properties/PropertyTitleTimePicker.vue#L361

Added line #L361 was not covered by tests
gap: var(--default-grid-baseline);
justify-content: stretch;
justify-content: flex-end;
width: 100%;
align-items: center;

Check warning on line 365 in src/components/Editor/Properties/PropertyTitleTimePicker.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Properties/PropertyTitleTimePicker.vue#L365

Added line #L365 was not covered by tests
Expand All @@ -369,11 +369,11 @@ export default {
}
:deep(input[type="time"]) {
min-width: 7rem;
min-width: calc(var(--clickable-area-large) * 0.5);
}
:deep(input[type="date"]) {
min-width: 10rem;
min-width: var(--clickable-area-large);
}
.native-datetime-picker {
Expand All @@ -396,19 +396,9 @@ export default {
.property-title-time-picker__time-pickers--all-day {

Check warning on line 396 in src/components/Editor/Properties/PropertyTitleTimePicker.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Properties/PropertyTitleTimePicker.vue#L396

Added line #L396 was not covered by tests
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
width: 100%;
gap: calc(var(--default-grid-baseline) * 2);
.property-title-time-picker__time-pickers-from, .property-title-time-picker__time-pickers-to {
flex-wrap: wrap !important;
flex-basis: 300px;
}
:deep(.v-select) {
min-width: 100px !important;
}
}

Check warning on line 403 in src/components/Editor/Properties/PropertyTitleTimePicker.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Properties/PropertyTitleTimePicker.vue#L403

Added line #L403 was not covered by tests
:deep(button.vs__open-indicator-button) {
Expand Down

0 comments on commit 2bc13af

Please sign in to comment.