@@ -35,10 +35,11 @@ ipcMain.on('addApp', (message: IpcMainEvent, application: any) => {
35
35
36
36
/**
37
37
* @event getApps
38
- * @desc Retrieves the existing list of applications belonging to the user
38
+ * @desc Retrieves the existing list of applications belonging to the user and current user setting for mode of preference
39
39
* @return Returns the list of applications
40
40
*/
41
41
// Load settings.json and returns updated state back to the render process on ipc 'dashboard' request
42
+
42
43
ipcMain . on ( 'getApps' , message => {
43
44
// Retrives file contents from settings.json for current Apps
44
45
const state = JSON . parse (
@@ -51,7 +52,7 @@ ipcMain.on('getApps', message => {
51
52
// Destructure list of services from state to be rendered on the dashboard
52
53
const dashboardList = state . services . map ( ( arr : string [ ] ) => [ arr [ 0 ] , arr [ 3 ] , arr [ 4 ] ] ) ;
53
54
54
- // Sync event - return new applications list w/ Mode
55
+ // Sync event - return new applications list w/ user settings: Mode
55
56
message . returnValue = [ dashboardList , temp [ "mode" ] ] ;
56
57
} ) ;
57
58
@@ -78,7 +79,11 @@ ipcMain.on('deleteApp', (message: IpcMainEvent, index) => {
78
79
message . returnValue = state . services . map ( ( arr : string [ ] ) => [ arr [ 0 ] , arr [ 3 ] , arr [ 4 ] ] ) ;
79
80
} ) ;
80
81
81
- //Modes
82
+ /**
83
+ * @event changeMode
84
+ * @desc Changes user's mode/theme preference fron settings.json
85
+ * @return Returns the newly update setting preference of the app to the renderer end
86
+ */
82
87
// Loads existing setting JSON and update settings to include updated mode version
83
88
ipcMain . on ( 'changeMode' , ( message : IpcMainEvent , currMode : string ) => {
84
89
// Retrives file contents from settings.json
0 commit comments