Loading lib/Controller/ViewController.php +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ class ViewController extends Controller { $hideEventExport = $this->config->getAppValue($this->appName, 'hideEventExport', 'no') === 'yes'; $forceEventAlarmType = $this->config->getAppValue($this->appName, 'forceEventAlarmType', ''); if (!in_array($forceEventAlarmType, ['DISPLAY', 'EMAIL'], true)) { $forceEventAlarmType = null; $forceEventAlarmType = false; } $talkEnabled = $this->appManager->isEnabledForUser('spreed'); Loading src/components/Editor/Alarm/AlarmList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ export default { addAlarm(totalSeconds) { this.$store.commit('addAlarmToCalendarObjectInstance', { calendarObjectInstance: this.calendarObjectInstance, type: this.forceEventAlarmType ?? 'DISPLAY', type: this.forceEventAlarmType || 'DISPLAY', totalSeconds, }) }, Loading src/components/Editor/Alarm/AlarmListItem.vue +10 −3 Original line number Diff line number Diff line Loading @@ -98,14 +98,14 @@ class="property-alarm-item__options"> <Actions> <ActionRadio v-if="canChangeAlarmType && (isAlarmTypeDisplay || forceEventAlarmType === null || forceEventAlarmType === 'DISPLAY')" v-if="canChangeAlarmType || (!isAlarmTypeDisplay && forceEventAlarmType === 'DISPLAY')" :name="alarmTypeName" :checked="isAlarmTypeDisplay" @change="changeType('DISPLAY')"> {{ $t('calendar', 'Notification') }} </ActionRadio> <ActionRadio v-if="canChangeAlarmType && (isAlarmTypeEmail || forceEventAlarmType === null || forceEventAlarmType === 'EMAIL')" v-if="canChangeAlarmType || (!isAlarmTypeEmail && forceEventAlarmType === 'EMAIL')" :name="alarmTypeName" :checked="isAlarmTypeEmail" @change="changeType('EMAIL')"> Loading Loading @@ -266,8 +266,15 @@ export default { return true }, /** * Changing the alarm type is allowed if the alarm type does * not match the forceEventAlarmType (yet). * * If no alarm type is forced (forceEventAlarmType === false), * this will return true as well. */ canChangeAlarmType() { return this.forceEventAlarmType !== null && this.alarm.type !== this.forceEventAlarmType return this.alarm.type !== this.forceEventAlarmType }, alarmTypeName() { return this._uid + '-radio-type-name' Loading src/store/settings.js +3 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ const state = { tasksEnabled: false, timezone: 'automatic', hideEventExport: false, forceEventAlarmType: null, forceEventAlarmType: false, // user-defined Nextcloud settings momentLocale: 'en', } Loading Loading @@ -162,6 +162,8 @@ Initial settings: - TalkEnabled: ${talkEnabled} - TasksEnabled: ${tasksEnabled} - Timezone: ${timezone} - HideEventExport: ${hideEventExport} - ForceEventAlarmType: ${forceEventAlarmType} `) state.appVersion = appVersion Loading src/views/Calendar.vue +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ export default { timezone: loadState('calendar', 'timezone'), showTasks: loadState('calendar', 'show_tasks'), hideEventExport: loadState('calendar', 'hide_event_export'), forceEventAlarmType: loadState('calendar', 'force_event_alarm_type', null), forceEventAlarmType: loadState('calendar', 'force_event_alarm_type', false), }) this.$store.dispatch('initializeCalendarJsConfig') Loading Loading
lib/Controller/ViewController.php +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ class ViewController extends Controller { $hideEventExport = $this->config->getAppValue($this->appName, 'hideEventExport', 'no') === 'yes'; $forceEventAlarmType = $this->config->getAppValue($this->appName, 'forceEventAlarmType', ''); if (!in_array($forceEventAlarmType, ['DISPLAY', 'EMAIL'], true)) { $forceEventAlarmType = null; $forceEventAlarmType = false; } $talkEnabled = $this->appManager->isEnabledForUser('spreed'); Loading
src/components/Editor/Alarm/AlarmList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ export default { addAlarm(totalSeconds) { this.$store.commit('addAlarmToCalendarObjectInstance', { calendarObjectInstance: this.calendarObjectInstance, type: this.forceEventAlarmType ?? 'DISPLAY', type: this.forceEventAlarmType || 'DISPLAY', totalSeconds, }) }, Loading
src/components/Editor/Alarm/AlarmListItem.vue +10 −3 Original line number Diff line number Diff line Loading @@ -98,14 +98,14 @@ class="property-alarm-item__options"> <Actions> <ActionRadio v-if="canChangeAlarmType && (isAlarmTypeDisplay || forceEventAlarmType === null || forceEventAlarmType === 'DISPLAY')" v-if="canChangeAlarmType || (!isAlarmTypeDisplay && forceEventAlarmType === 'DISPLAY')" :name="alarmTypeName" :checked="isAlarmTypeDisplay" @change="changeType('DISPLAY')"> {{ $t('calendar', 'Notification') }} </ActionRadio> <ActionRadio v-if="canChangeAlarmType && (isAlarmTypeEmail || forceEventAlarmType === null || forceEventAlarmType === 'EMAIL')" v-if="canChangeAlarmType || (!isAlarmTypeEmail && forceEventAlarmType === 'EMAIL')" :name="alarmTypeName" :checked="isAlarmTypeEmail" @change="changeType('EMAIL')"> Loading Loading @@ -266,8 +266,15 @@ export default { return true }, /** * Changing the alarm type is allowed if the alarm type does * not match the forceEventAlarmType (yet). * * If no alarm type is forced (forceEventAlarmType === false), * this will return true as well. */ canChangeAlarmType() { return this.forceEventAlarmType !== null && this.alarm.type !== this.forceEventAlarmType return this.alarm.type !== this.forceEventAlarmType }, alarmTypeName() { return this._uid + '-radio-type-name' Loading
src/store/settings.js +3 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ const state = { tasksEnabled: false, timezone: 'automatic', hideEventExport: false, forceEventAlarmType: null, forceEventAlarmType: false, // user-defined Nextcloud settings momentLocale: 'en', } Loading Loading @@ -162,6 +162,8 @@ Initial settings: - TalkEnabled: ${talkEnabled} - TasksEnabled: ${tasksEnabled} - Timezone: ${timezone} - HideEventExport: ${hideEventExport} - ForceEventAlarmType: ${forceEventAlarmType} `) state.appVersion = appVersion Loading
src/views/Calendar.vue +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ export default { timezone: loadState('calendar', 'timezone'), showTasks: loadState('calendar', 'show_tasks'), hideEventExport: loadState('calendar', 'hide_event_export'), forceEventAlarmType: loadState('calendar', 'force_event_alarm_type', null), forceEventAlarmType: loadState('calendar', 'force_event_alarm_type', false), }) this.$store.dispatch('initializeCalendarJsConfig') Loading