Skip to content

Commit

Permalink
add button to open settings dialog
Browse files Browse the repository at this point in the history
-
Ticket: AUT-2324

Co-authored-by: Tamas Toth <[email protected]>
  • Loading branch information
hawser86 and tt1991 committed Oct 20, 2023
1 parent 274e18f commit cb1689f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/renderer/components/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ <h1 class="e-layout__title">GAP Secret Editor</h1>
</div>
</e-theme-switcher>

<div class="e-clickable e-padding-left-m">
<e-tooltip content="Settings">
<e-icon icon="cog" @click="openSettingsDialog()"></e-icon>
</e-tooltip>
</div>
<div class="e-clickable e-padding-left-m">
<e-tooltip content="Give us feedback">
<e-icon icon="e-bullhorn" @click="openFeedbackDialog()"></e-icon>
Expand Down Expand Up @@ -153,6 +158,6 @@ <h1 class="e-layout__title">GAP Secret Editor</h1>

<feedback-dialog ref="feedbackDialog" />

<settings-dialog />
<settings-dialog ref="settingsDialog" />
</div>
</div>
3 changes: 3 additions & 0 deletions src/renderer/components/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export default {
openFeedbackDialog() {
this.$refs.feedbackDialog.open();
},
openSettingsDialog() {
this.$refs.settingsDialog.open();
},
updateIsDarkModeActiveState(theme) {
this.setIsDarkModeActive(theme === 'eveningHorizon');
},
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/settings-dialog/settings-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ export default {
save() {
setSync(SETTING_FILE_NAME, { gcloudPath: this.gcloudPath });
ipcRenderer.send('restart');
},
open() {
this.dialogOpened = true;
}
},
mounted() {
ipcRenderer.on('show-settings', (event, path) => {
setDataPath(path);
this.gcloudPath = loadSettings().gcloudPath || '';
this.dialogOpened = true;
this.open();
});
}
};
Expand Down

0 comments on commit cb1689f

Please sign in to comment.