Skip to content

Commit d54056d

Browse files
committed
Format and translate restore settings popup in italian
1 parent 0fe1859 commit d54056d

File tree

2 files changed

+48
-62
lines changed

2 files changed

+48
-62
lines changed

config/dev.env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = merge(prodEnv, {
99
NODE_ENV: '"development"',
1010
// Backend location. Must point to the exposed Flask instance
1111
// By default, if you run the backend locally, it's available at localhost:5000
12-
CB_ENDPOINT: '"http://coderbot.local"',
12+
CB_ENDPOINT: '"http://localhost:5000"',
1313
// Legacy APIs
1414
APIv1: '""',
1515
// New API, exposed by Connexion

src/components/Settings.vue

Lines changed: 47 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
<v-card>
5151
<div class="cardContent">
5252
<div v-for="(value, key, index) in cb.status">
53-
<div v-if="key != 'log'">
54-
{{ key }}: <code>{{ value }}</code>
55-
</div>
53+
<div v-if="key != 'log'">
54+
{{ key }}: <code>{{ value }}</code>
55+
</div>
5656
</div>
5757
<br>
5858
</div>
@@ -70,46 +70,32 @@
7070
<v-btn @click="restoreConfig" color="warning">
7171
<v-icon>fas fa-redo</v-icon> Ripristina Impostazioni
7272
</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>
73+
<!-- ** Restore button + dialog box** -->
74+
<v-dialog v-model="dialog" width="500">
75+
<v-btn slot="activator" color="error" dark>
76+
<v-icon>fas fa-wrench</v-icon> Ripristina ad impostazioni di fabbrica
77+
</v-btn>
78+
<v-card>
79+
<v-card-title class="headline grey lighten-2" primary-title>
80+
<h3>Ripristina impostazioni</h3>
81+
</v-card-title>
82+
<v-card-text>
83+
Sei sicuro di voler ripristinare alle impostazioni di fabbrica?
84+
<br>
85+
<h4><b>TUTTI I DATI VERRANNO PERSI</b></h4>
86+
</v-card-text>
87+
<v-divider></v-divider>
88+
<v-card-actions>
89+
<v-spacer></v-spacer>
90+
<v-btn color="primary" @click="dialog = false">
91+
Annulla
92+
</v-btn>
93+
<v-btn color="error" @click="restore">
94+
<b>Ripristina</b>
95+
</v-btn>
96+
</v-card-actions>
97+
</v-card>
98+
</v-dialog>
11399
<!--
114100
<v-btn color="warning">Aggiorna</v-btn>
115101
<v-btn color="error">Ripristina ad Impostazioni di fabbrica</v-btn> -->
@@ -119,9 +105,9 @@
119105
<h3 class="text-xs-left"> Reset Logs </h3>
120106
<v-card>
121107
<div class="cardContent">
122-
<div v-for="value in cb.logs.log">
123-
{{ value }}
124-
</div>
108+
<div v-for="value in cb.logs.log">
109+
{{ value }}
110+
</div>
125111
</div>
126112
</v-card>
127113
<br>
@@ -332,20 +318,20 @@ export default {
332318
this.prepopulate()
333319
}.bind(this))
334320
},
335-
restore() {
336-
let axios = this.$axios
337-
let CB = this.CB
338-
axios.post(CB + '/reset')
339-
.then(function(response) {
321+
restore() {
322+
let axios = this.$axios
323+
let CB = this.CB
324+
axios.post(CB + '/reset')
325+
.then(function(response) {
340326
this.snackText = 'Ripristino ad impostazioni di fabbrica \
341327
Reboot in corso...'
342328
this.snackbar = true
343329
this.prepopulate()
344-
setTimeout(() => $(dialog).close(), 5000)
345-
this.dialog = false
330+
setTimeout(() => $(dialog).close(), 5000)
331+
this.dialog = false
346332
}.bind(this))
347-
},
348-
333+
},
334+
349335
shutdown() {
350336
let axios = this.$axios
351337
let CBv1 = this.CBv1
@@ -372,7 +358,7 @@ export default {
372358
axios.get(this.CB + '/status')
373359
.then(function(response) {
374360
this.cb.status = response.data
375-
this.cb.logs.log = response.data.log
361+
this.cb.logs.log = response.data.log
376362
}.bind(this))
377363
axios.get(this.CB + '/info')
378364
.then(function(response) {
@@ -394,7 +380,7 @@ export default {
394380
395381
this.statusData = response.data
396382
this.status = response.status
397-
this.cb.logs.log = response.data.log
383+
this.cb.logs.log = response.data.log
398384
}.bind(this))
399385
.catch(function(error) {
400386
// handle error
@@ -552,7 +538,7 @@ export default {
552538
formdata: null,
553539
files: null,
554540
status: null,
555-
dialog: false,
541+
dialog: false,
556542
lastCommit: process.env.lastCommit,
557543
CB: process.env.CB_ENDPOINT + process.env.APIv2,
558544
CBv1: process.env.CB_ENDPOINT,
@@ -613,9 +599,9 @@ export default {
613599
vueVersion: null,
614600
kernel: null
615601
},
616-
logs: {
617-
log: null
618-
}
602+
logs: {
603+
log: null
604+
}
619605
},
620606
drawer: null,
621607
tab: null,

0 commit comments

Comments
 (0)