Chargement/Sauvegarde profil via l'UI
This commit is contained in:
@ -10,7 +10,7 @@ exports.loadProfile = function(profilePath) {
|
||||
|
||||
dispatch({ type: LOAD_PROFILE, profilePath: profilePath });
|
||||
|
||||
return Util.System.loadJSONFile(profilePath)
|
||||
return Util.System.loadJSON(profilePath)
|
||||
.then(function(profile) {
|
||||
dispatch({ type: LOAD_PROFILE_SUCCESS, profile: profile });
|
||||
return profile;
|
||||
|
@ -39,10 +39,19 @@ exports.loadDesktopApps = function() {
|
||||
};
|
||||
};
|
||||
|
||||
exports.saveProfile = function(profile) {
|
||||
exports.saveProfile = function(destPath, profile) {
|
||||
return function(dispatch, getState) {
|
||||
|
||||
|
||||
dispatch({ type: SAVE_PROFILE, profile: profile, path: destPath });
|
||||
|
||||
return Util.System.saveJSON(destPath, profile)
|
||||
.then(function() {
|
||||
dispatch({ type: SAVE_PROFILE_SUCCESS, profile: profile, path: destPath });
|
||||
})
|
||||
.catch(function(err) {
|
||||
dispatch({ type: SAVE_PROFILE_FAILED, error: err });
|
||||
})
|
||||
;
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ exports.runApp = function(execPath) {
|
||||
|
||||
dispatch({ type: RUN_APP, execPath: execPath });
|
||||
|
||||
return Util.System.runApp(execPath)
|
||||
return Util.System.runApp(execPath, { clearFreeDesktopFlags: true })
|
||||
.then(function() {
|
||||
dispatch({ type: RUN_APP_SUCCESS, execPath: execPath });
|
||||
return execPath;
|
||||
|
Reference in New Issue
Block a user