diff options
author | Bennett <hello@vantezzen.io> | 2020-02-26 12:12:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 12:12:02 +0100 |
commit | ce988c280f5ca6dfc202d209e66d7cfce257c43b (patch) | |
tree | f469740cba0141af5b15a50b764a79f0b9b84a91 /src/stores/ServicesStore.js | |
parent | Avoid AppVeyor builds on i18n-only commits (diff) | |
download | ferdium-app-ce988c280f5ca6dfc202d209e66d7cfce257c43b.tar.gz ferdium-app-ce988c280f5ca6dfc202d209e66d7cfce257c43b.tar.zst ferdium-app-ce988c280f5ca6dfc202d209e66d7cfce257c43b.zip |
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 <amine@mouafik.fr>
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 12 |
1 files changed, 6 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 }) { |