Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Add open data dir button
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed May 8, 2020
1 parent ceba98c commit aefc7a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/base/src/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
<button class="ui inverted basic orange button" v-on:click="control('module/core/trigger/restart')">
Restart
</button>
<button class="ui inverted basic blue button" v-on:click="openDataDir()">
Open Data Directory
</button>
<button class="ui inverted basic blue button" v-on:click="reloadUI()">Reload UI</button>
<button class="ui inverted basic blue button" v-on:click="control('module/updates/trigger/trigger update')">
Download updates
Expand Down Expand Up @@ -331,6 +334,13 @@ export default {
control(value) {
this.controlOp = this.$api.get("control:" + value);
},
openDataDir() {
if (typeof system !== 'undefined') { // eslint-disable-line
system.openDataDir(); // eslint-disable-line
} else {
console.warn('cannot open data dir, running in browser');
}
},
reloadUI() {
this.beforeOnUnload();
// add an extra second, in case waiting is broken on a client
Expand Down

0 comments on commit aefc7a6

Please sign in to comment.