From ce988c280f5ca6dfc202d209e66d7cfce257c43b Mon Sep 17 00:00:00 2001 From: Bennett Date: Wed, 26 Feb 2020 12:12:02 +0100 Subject: Implement user.css and user.js (#401) * #83 Implement user.css and user.js * Fix button layout in settings * Fix user script not loading Co-authored-by: Amine --- src/stores/ServicesStore.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/stores') 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 { this.actions.service.createFromLegacyService.listen(this._createFromLegacyService.bind(this)); this.actions.service.updateService.listen(this._updateService.bind(this)); this.actions.service.deleteService.listen(this._deleteService.bind(this)); - this.actions.service.openDarkmodeCss.listen(this._openDarkmodeCss.bind(this)); + this.actions.service.openRecipeFile.listen(this._openRecipeFile.bind(this)); this.actions.service.clearCache.listen(this._clearCache.bind(this)); this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); this.actions.service.detachService.listen(this._detachService.bind(this)); @@ -334,7 +334,7 @@ export default class ServicesStore extends Store { this.actionStatus = request.result.status; } - @action async _openDarkmodeCss({ recipe }) { + @action async _openRecipeFile({ recipe, file }) { // Get directory for recipe const normalDirectory = getRecipeDirectory(recipe); const devDirectory = getDevRecipeDirectory(recipe); @@ -349,10 +349,10 @@ export default class ServicesStore extends Store { return; } - // Create and open darkmode.css - const file = path.join(directory, 'darkmode.css'); - await fs.ensureFile(file); - shell.showItemInFolder(file); + // Create and open file + const filePath = path.join(directory, file); + await fs.ensureFile(filePath); + shell.showItemInFolder(filePath); } @action async _clearCache({ serviceId }) { -- cgit v1.2.3-70-g09d2