Skip to content

Commit 9e5d04e

Browse files
committed
Added restet button + dialog box
1 parent f28eb27 commit 9e5d04e

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
export default {
99
data() {
1010
return {
11-
drawer: null,
11+
drawer: null
1212
}
1313
},
1414
name: 'App',

src/components/Settings.vue

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,53 @@
7070
<v-btn @click="restoreConfig" color="warning">
7171
<v-icon>fas fa-redo</v-icon> Ripristina Impostazioni
7272
</v-btn>
73-
<v-btn @click="restore" color="error">
74-
<v-icon>fas fa-power-off</v-icon> Ripristina ad impostazioni di fabbrica
75-
</v-btn>
73+
<!-- ** Restore button + dialog box** -->
74+
<v-dialog
75+
v-model="dialog"
76+
width="500" >
77+
<v-btn
78+
slot="activator"
79+
color="error"dark >
80+
<v-icon>fas fa-wrench</v-icon> Ripristina ad impostazioni di fabbrica
81+
</v-btn>
82+
83+
<v-card>
84+
<v-card-title
85+
class="headline grey lighten-2"
86+
primary-title >
87+
<h3>CoderBot - Restore</h3>
88+
</v-card-title>
89+
90+
<v-card-text>
91+
Are you sure you want to restore the CoderBot?
92+
<br>
93+
<h3><b>Every saved file will be lost</b></h3>
94+
</v-card-text>
95+
96+
<v-divider></v-divider>
97+
98+
<v-card-actions>
99+
<v-spacer></v-spacer>
100+
<v-btn
101+
color="primary"
102+
@click="dialog = false" >
103+
Cancel
104+
</v-btn>
105+
<v-btn
106+
color="error"
107+
@click="restore" >
108+
<b>Restore</b>
109+
</v-btn>
110+
</v-card-actions>
111+
</v-card>
112+
</v-dialog>
76113
<!--
77114
<v-btn color="warning">Aggiorna</v-btn>
78115
<v-btn color="error">Ripristina ad Impostazioni di fabbrica</v-btn> -->
79116
</div>
80117
</v-card>
81118
<br>
82-
<h3 class="text-xs-left"> LOGS </h3>
119+
<h3 class="text-xs-left"> Reset Logs </h3>
83120
<v-card>
84121
<div class="cardContent">
85122
<div v-for="value in cb.logs.log">
@@ -513,6 +550,7 @@ export default {
513550
formdata: null,
514551
files: null,
515552
status: null,
553+
dialog: false,
516554
lastCommit: process.env.lastCommit,
517555
CB: process.env.CB_ENDPOINT + process.env.APIv2,
518556
CBv1: process.env.CB_ENDPOINT,

0 commit comments

Comments
 (0)