diff --git a/lang/en/automations.php b/lang/en/automations.php index 8355bfce..9f869e81 100644 --- a/lang/en/automations.php +++ b/lang/en/automations.php @@ -249,7 +249,6 @@ 'minute' => 'Trigger at minute', 'weekdays' => 'Trigger on weekdays', 'day_of_month' => 'Day of month', - 'timezone_hint' => 'All times in :tz', 'weekday_names' => [ 'sun' => 'Sun', 'mon' => 'Mon', diff --git a/lang/es/automations.php b/lang/es/automations.php index b28a22c6..b32a4e99 100644 --- a/lang/es/automations.php +++ b/lang/es/automations.php @@ -249,7 +249,6 @@ 'minute' => 'Disparar al minuto', 'weekdays' => 'Disparar en días', 'day_of_month' => 'Día del mes', - 'timezone_hint' => 'Todos los horarios en :tz', 'weekday_names' => [ 'sun' => 'Dom', 'mon' => 'Lun', diff --git a/lang/pt-BR/automations.php b/lang/pt-BR/automations.php index ffc28c9e..d608a5fb 100644 --- a/lang/pt-BR/automations.php +++ b/lang/pt-BR/automations.php @@ -249,7 +249,6 @@ 'minute' => 'Disparar no minuto', 'weekdays' => 'Disparar nos dias', 'day_of_month' => 'Dia do mês', - 'timezone_hint' => 'Todos os horários em :tz', 'weekday_names' => [ 'sun' => 'Dom', 'mon' => 'Seg', diff --git a/resources/js/components/automations/config/TriggerNodeConfig.vue b/resources/js/components/automations/config/TriggerNodeConfig.vue index 054b830e..199646f6 100644 --- a/resources/js/components/automations/config/TriggerNodeConfig.vue +++ b/resources/js/components/automations/config/TriggerNodeConfig.vue @@ -84,6 +84,22 @@ const isWeekdaySelected = (value: number) => const generatedCron = computed(() => generateScheduleCron(local.value)); const humanSchedule = computed(() => scheduleSummary(local.value)); +// Append the user's timezone only for schedules pinned to a clock time +// (days/weeks/months). Minute/hour intervals are relative, so a timezone +// would be meaningless next to them. +const scheduleSummaryLine = computed(() => { + if (!humanSchedule.value) { + return ''; + } + const pinsClockTime = local.value.schedule_field === ScheduleField.Days + || local.value.schedule_field === ScheduleField.Weeks + || local.value.schedule_field === ScheduleField.Months; + + return pinsClockTime + ? `${humanSchedule.value} (${timezoneAbbr.value})` + : humanSchedule.value; +}); + watch(generatedCron, (cron) => { if (local.value.trigger_type === TriggerType.Schedule) { local.value.cron = cron; @@ -269,8 +285,7 @@ watch(local, (val) => emit('update', val), { deep: true }); -

{{ humanSchedule }}

-

{{ $t('automations.config.trigger.schedule.timezone_hint', { tz: timezoneAbbr }) }}

+

{{ scheduleSummaryLine }}