mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-21 23:44:30 +00:00
fix(home): ensure event hour displays correctly with timezone
Timezone parameter is now mandatory for <start-time-icon>. Solves #1618
This commit is contained in:
parent
d485c7e113
commit
39b4356ea6
3 changed files with 5 additions and 4 deletions
|
@ -81,6 +81,7 @@
|
||||||
:small="true"
|
:small="true"
|
||||||
v-if="!mergedOptions.hideDate && event.options.showStartTime"
|
v-if="!mergedOptions.hideDate && event.options.showStartTime"
|
||||||
:date="event.beginsOn.toString()"
|
:date="event.beginsOn.toString()"
|
||||||
|
:timezone="event.options.timezone"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
|
|
|
@ -20,16 +20,16 @@ import Clock from "vue-material-design-icons/ClockTimeTenOutline.vue";
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
date: string;
|
date: string;
|
||||||
timezone?: string;
|
timezone: string | null;
|
||||||
small?: boolean;
|
small?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{ small: false, timezone: "Etc/UTC" }
|
{ small: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const dateObj = computed<Date>(() => new Date(props.date));
|
const dateObj = computed<Date>(() => new Date(props.date));
|
||||||
|
|
||||||
const time = computed<string>(() =>
|
const time = computed<string>(() =>
|
||||||
formatTimeString(props.date, props.timezone)
|
formatTimeString(props.date, props.timezone ?? undefined)
|
||||||
);
|
);
|
||||||
|
|
||||||
const smallStyle = computed<string>(() => (props.small ? "0.9" : "2"));
|
const smallStyle = computed<string>(() => (props.small ? "0.9" : "2"));
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
>
|
>
|
||||||
<start-time-icon
|
<start-time-icon
|
||||||
:date="event.beginsOn.toString()"
|
:date="event.beginsOn.toString()"
|
||||||
:timezone="event.options.timezone ?? undefined"
|
:timezone="event.options.timezone"
|
||||||
class="absolute right-3 -top-16"
|
class="absolute right-3 -top-16"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue