Skip to content

Commit 94f5660

Browse files
Disabling the Auto Save and Auto Mode button on the UI (#220)
* Disabling the Auto Save and Auto Mode button on the UI * Fixing the eslint error for Ubuntu latest * Changing 'Auto save' to 'Auto Save' * fixing the Auto Save test in App.test.js --------- Co-authored-by: Ravikiran Chollangi <[email protected]>
1 parent 62ac4fc commit 94f5660

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ const createWindow = () => {
304304
else updateTitle(arg);
305305
});
306306
ipcMain.on('autoSave', (event, arg) => {
307-
store.set('autoSave', arg.autoSave);
307+
console.log('Auto Save feature is disabled.');
308308
});
309309
};
310310

src/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ function App() {
308308
<div className="power-tables">
309309
<div className="switches-container">
310310
<div className="row">
311-
<div className="switch">Auto save</div>
311+
<div className="switch">Auto Save</div>
312312
<Switch
313-
checked={autoSave}
313+
checked={false}
314314
onChange={autoSaveChanged}
315315
onColor="#f11f5e"
316316
uncheckedIcon={false}
@@ -319,6 +319,7 @@ function App() {
319319
activeBoxShadow="0px 0px 1px 10px rgba(0, 0, 0, 0.2)"
320320
height={20}
321321
width={40}
322+
disabled
322323
/>
323324
</div>
324325
<div className="row">
@@ -333,6 +334,7 @@ function App() {
333334
activeBoxShadow="0px 0px 1px 10px rgba(0, 0, 0, 0.2)"
334335
height={20}
335336
width={40}
337+
disabled
336338
/>
337339
</div>
338340
<div className="notes" onClick={() => setModalOpen(true)}><PiNotepad size="28px" /></div>

src/tests/App.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('App component', () => {
2929
);
3030

3131
expect(screen.getByPlaceholderText('Top level name')).toBeInTheDocument();
32-
expect(screen.getByText('Auto save')).toBeInTheDocument();
32+
expect(screen.getByText('Auto Save')).toBeInTheDocument();
3333
expect(screen.getByText('Auto Mode')).toBeInTheDocument();
3434
});
3535
});

0 commit comments

Comments
 (0)