diff --git a/src/renderer/components/drawer/Drawer-settings.vue b/src/renderer/components/drawer/Drawer-settings.vue
index aa66af5..a413b99 100644
--- a/src/renderer/components/drawer/Drawer-settings.vue
+++ b/src/renderer/components/drawer/Drawer-settings.vue
@@ -10,11 +10,19 @@
>
-
Auto-start Timer
+
Auto-start Work Timer
+
+
+
Auto-start Break Timer
+
@@ -55,8 +63,12 @@ export default {
return this.$store.getters.alwaysOnTop
},
- autoStartTimer() {
- return this.$store.getters.autoStartTimer
+ autoStartWorkTimer() {
+ return this.$store.getters.autoStartWorkTimer
+ },
+
+ autoStartBreakTimer() {
+ return this.$store.getters.autoStartBreakTimer
},
minToTray() {
@@ -87,10 +99,19 @@ export default {
this.$store.dispatch('setViewState', payload)
},
- selectAutoStartTimer() {
+ selectAutoStartWorkTimer() {
+ const payload = {
+ key: 'autoStartWorkTimer',
+ val: !this.autoStartWorkTimer
+ }
+ this.$store.dispatch('setSetting', payload)
+ this.$store.dispatch('setViewState', payload)
+ },
+
+ selectAutoStartBreakTimer() {
const payload = {
- key: 'autoStartTimer',
- val: !this.autoStartTimer
+ key: 'autoStartBreakTimer',
+ val: !this.autoStartBreakTimer
}
this.$store.dispatch('setSetting', payload)
this.$store.dispatch('setViewState', payload)
diff --git a/src/renderer/components/timer/Timer-controller.vue b/src/renderer/components/timer/Timer-controller.vue
index c15ab44..2bc28c5 100644
--- a/src/renderer/components/timer/Timer-controller.vue
+++ b/src/renderer/components/timer/Timer-controller.vue
@@ -7,8 +7,12 @@ import { logger } from '@/utils/logger'
export default {
computed: {
// store getters
- autoStartTimer() {
- return this.$store.getters.autoStartTimer
+ autoStartWorkTimer() {
+ return this.$store.getters.autoStartWorkTimer
+ },
+
+ autoStartBreakTimer() {
+ return this.$store.getters.autoStartBreakTimer
},
currentRound() {
@@ -51,7 +55,10 @@ export default {
},
dispatchTimer() {
EventBus.$emit('timer-init', {
- auto: this.autoStartTimer
+ auto:
+ this.currentRound === 'work'
+ ? this.autoStartWorkTimer
+ : this.autoStartBreakTimer
})
}
},
diff --git a/src/renderer/store/modules/View.js b/src/renderer/store/modules/View.js
index d4b18d4..59608aa 100644
--- a/src/renderer/store/modules/View.js
+++ b/src/renderer/store/modules/View.js
@@ -3,10 +3,14 @@ import { localStore } from './index'
const state = {
currentDrawer: 'appDrawerTimer',
drawerOpen: false,
- autoStartTimer:
- localStore.get('autoStartTimer') === undefined
+ autoStartWorkTimer:
+ localStore.get('autoStartWorkTimer') === undefined
? true
- : localStore.get('autoStartTimer'),
+ : localStore.get('autoStartWorkTimer'),
+ autoStartBreakTimer:
+ localStore.get('autoStartBreakTimer') === undefined
+ ? true
+ : localStore.get('autoStartBreakTimer'),
alwaysOnTop: localStore.get('alwaysOnTop'),
minToTray: localStore.get('minToTray'),
notifications: localStore.get('notifications'),
@@ -15,8 +19,12 @@ const state = {
}
const getters = {
- autoStartTimer() {
- return state.autoStartTimer
+ autoStartWorkTimer() {
+ return state.autoStartWorkTimer
+ },
+
+ autoStartBreakTimer() {
+ return state.autoStartBreakTimer
},
currentDrawer() {
diff --git a/src/renderer/utils/LocalStore.js b/src/renderer/utils/LocalStore.js
index 589e0c2..694995f 100644
--- a/src/renderer/utils/LocalStore.js
+++ b/src/renderer/utils/LocalStore.js
@@ -13,7 +13,8 @@ export const defaults = generateSettings()
function generateSettings() {
return {
alwaysOnTop: false,
- autoStartTimer: true,
+ autoStartWorkTimer: true,
+ autoStartBreakTimer: true,
minToTray: false,
notifications: true,
workRounds: 4,