aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/RecipesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/RecipesStore.js')
-rw-r--r--src/stores/RecipesStore.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/stores/RecipesStore.js b/src/stores/RecipesStore.js
index d39b87401..3d3a506cc 100644
--- a/src/stores/RecipesStore.js
+++ b/src/stores/RecipesStore.js
@@ -8,8 +8,7 @@ import Request from './lib/Request';
8import { matchRoute } from '../helpers/routing-helpers'; 8import { matchRoute } from '../helpers/routing-helpers';
9import { asarRecipesPath } from '../helpers/asar-helpers'; 9import { asarRecipesPath } from '../helpers/asar-helpers';
10 10
11// TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed 11const debug = require('../preload-safe-debug')('Ferdium:RecipeStore');
12// const debug = require('debug')('Ferdium:RecipeStore');
13 12
14export default class RecipesStore extends Store { 13export default class RecipesStore extends Store {
15 @observable allRecipesRequest = new CachedRequest(this.api.recipes, 'all'); 14 @observable allRecipesRequest = new CachedRequest(this.api.recipes, 'all');
@@ -48,7 +47,7 @@ export default class RecipesStore extends Store {
48 return activeRecipe; 47 return activeRecipe;
49 } 48 }
50 49
51 console.log(`Recipe ${match.id} not installed`); 50 debug(`Recipe ${match.id} not installed`);
52 } 51 }
53 52
54 return null; 53 return null;
@@ -79,7 +78,7 @@ export default class RecipesStore extends Store {
79 const recipes = {}; 78 const recipes = {};
80 79
81 // Hackfix, reference this.all to fetch services 80 // Hackfix, reference this.all to fetch services
82 console.log(`Check Recipe updates for ${this.all.map(recipe => recipe.id)}`); 81 debug(`Check Recipe updates for ${this.all.map(recipe => recipe.id)}`);
83 82
84 for (const r of recipeIds) { 83 for (const r of recipeIds) {
85 const recipe = this.one(r); 84 const recipe = this.one(r);
@@ -108,7 +107,7 @@ export default class RecipesStore extends Store {
108 } 107 }
109 108
110 const updates = [...remoteUpdates, ...localUpdates]; 109 const updates = [...remoteUpdates, ...localUpdates];
111 console.log( 110 debug(
112 'Got update information (local, remote):', 111 'Got update information (local, remote):',
113 localUpdates, 112 localUpdates,
114 remoteUpdates, 113 remoteUpdates,
@@ -146,7 +145,7 @@ export default class RecipesStore extends Store {
146 145
147 if (!this.stores.recipes.isInstalled(recipeId)) { 146 if (!this.stores.recipes.isInstalled(recipeId)) {
148 router.push('/settings/recipes'); 147 router.push('/settings/recipes');
149 console.log(`Recipe ${recipeId} is not installed, trying to install it`); 148 debug(`Recipe ${recipeId} is not installed, trying to install it`);
150 149
151 const recipe = await this.installRecipeRequest.execute(recipeId) 150 const recipe = await this.installRecipeRequest.execute(recipeId)
152 ._promise; 151 ._promise;