diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 12 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 20 |
2 files changed, 26 insertions, 6 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index e38b82f03..ae6ba11c5 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -58,7 +58,7 @@ export default class ServicesStore extends Store { | |||
58 | this.actions.service.createFromLegacyService.listen(this._createFromLegacyService.bind(this)); | 58 | this.actions.service.createFromLegacyService.listen(this._createFromLegacyService.bind(this)); |
59 | this.actions.service.updateService.listen(this._updateService.bind(this)); | 59 | this.actions.service.updateService.listen(this._updateService.bind(this)); |
60 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); | 60 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); |
61 | this.actions.service.openDarkmodeCss.listen(this._openDarkmodeCss.bind(this)); | 61 | this.actions.service.openRecipeFile.listen(this._openRecipeFile.bind(this)); |
62 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); | 62 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); |
63 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); | 63 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); |
64 | this.actions.service.detachService.listen(this._detachService.bind(this)); | 64 | this.actions.service.detachService.listen(this._detachService.bind(this)); |
@@ -334,7 +334,7 @@ export default class ServicesStore extends Store { | |||
334 | this.actionStatus = request.result.status; | 334 | this.actionStatus = request.result.status; |
335 | } | 335 | } |
336 | 336 | ||
337 | @action async _openDarkmodeCss({ recipe }) { | 337 | @action async _openRecipeFile({ recipe, file }) { |
338 | // Get directory for recipe | 338 | // Get directory for recipe |
339 | const normalDirectory = getRecipeDirectory(recipe); | 339 | const normalDirectory = getRecipeDirectory(recipe); |
340 | const devDirectory = getDevRecipeDirectory(recipe); | 340 | const devDirectory = getDevRecipeDirectory(recipe); |
@@ -349,10 +349,10 @@ export default class ServicesStore extends Store { | |||
349 | return; | 349 | return; |
350 | } | 350 | } |
351 | 351 | ||
352 | // Create and open darkmode.css | 352 | // Create and open file |
353 | const file = path.join(directory, 'darkmode.css'); | 353 | const filePath = path.join(directory, file); |
354 | await fs.ensureFile(file); | 354 | await fs.ensureFile(filePath); |
355 | shell.showItemInFolder(file); | 355 | shell.showItemInFolder(filePath); |
356 | } | 356 | } |
357 | 357 | ||
358 | @action async _clearCache({ serviceId }) { | 358 | @action async _clearCache({ serviceId }) { |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index feee282e4..26e83b725 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -240,5 +240,25 @@ export default class SettingsStore extends Store { | |||
240 | }, | 240 | }, |
241 | }); | 241 | }); |
242 | } | 242 | } |
243 | |||
244 | if (!this.all.migration['5.4.4-beta.2-settings']) { | ||
245 | const { | ||
246 | showServiceNavigationBar, | ||
247 | } = this.all.app; | ||
248 | |||
249 | this.actions.settings.update({ | ||
250 | type: 'app', | ||
251 | data: { | ||
252 | navigationBarBehaviour: showServiceNavigationBar ? 'custom' : 'never', | ||
253 | }, | ||
254 | }); | ||
255 | |||
256 | this.actions.settings.update({ | ||
257 | type: 'migration', | ||
258 | data: { | ||
259 | '5.4.4-beta.2-settings': true, | ||
260 | }, | ||
261 | }); | ||
262 | } | ||
243 | } | 263 | } |
244 | } | 264 | } |