Skip to content

Commit 8494987

Browse files
committed
feat: show label about timezone
1 parent feb0520 commit 8494987

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

web/src/components/ScheduleForm.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
v-model="formValid"
66
v-if="templates && item != null"
77
>
8+
<v-alert
9+
v-model="showInfo"
10+
color="info"
11+
text
12+
dismissible
13+
>
14+
Use environment variable <code>SEMAPHORE_SCHEDULE_TIMEZONE</code> or config param
15+
<code>schedule.timezone</code> to set timezone for Schedule.
16+
</v-alert>
817

918
<v-alert
1019
:value="formError"
@@ -330,10 +339,23 @@ export default {
330339
months: [],
331340
weekdays: [],
332341
rawCron: false,
342+
showInfo: true,
333343
};
334344
},
335345
346+
watch: {
347+
showInfo(val) {
348+
if (val) {
349+
localStorage.removeItem('schedule_hide_info');
350+
} else {
351+
localStorage.setItem('schedule_hide_info', '1');
352+
}
353+
},
354+
},
355+
336356
async created() {
357+
this.showInfo = localStorage.getItem('schedule_hide_info') !== '1';
358+
337359
this.templates = (await axios({
338360
method: 'get',
339361
url: `/api/project/${this.projectId}/templates`,

0 commit comments

Comments
 (0)