|
13 | 13 | </template> |
14 | 14 | <v-spacer></v-spacer> |
15 | 15 | <v-toolbar-items> |
16 | | - <!-- template serves as an invisible wrapper to conditional render more than one element --> |
17 | 16 | <template v-if="status == 200"> |
18 | | - <v-btn v-on:click="runProgramLegacy()" flat> |
19 | | - <v-icon>play_arrow</v-icon> |
20 | | - Esegui |
21 | | - </v-btn> |
22 | | - <!-- |
23 | | - <v-btn v-if="isDefault != 'True'" @click="overwrite = 1, saveProgram()" flat> |
24 | | - <v-icon>save</v-icon> |
25 | | - Salva |
26 | | - </v-btn> |
27 | | - <v-btn @click="salva = true, newProgramName = programName" flat> |
28 | | - <v-icon>edit</v-icon> |
29 | | - Salva con nome |
30 | | - </v-btn> |
31 | | - <v-btn @click="loadProgramList" flat> |
32 | | - <v-icon>folder_open</v-icon> |
33 | | - Carica |
34 | | - </v-btn> |
35 | | -
|
36 | | - <v-btn v-on:click="getProgramCode()" flat> |
37 | | - <v-icon>code</v-icon> |
38 | | - Mostra codice |
39 | | - </v-btn> |
40 | | - <v-btn v-on:click="exportProgram()" flat> |
41 | | - <v-icon>fa-file-export</v-icon> |
42 | | - Esporta |
43 | | - </v-btn> |
44 | | - <v-btn v-on:click="pickFile()" flat> |
45 | | - <v-icon>fa-file-import</v-icon> |
46 | | - Importa |
47 | | - </v-btn> |
48 | | - </template> |
49 | | - <template v-else> |
50 | | - <v-btn flat> |
51 | | - <v-progress-circular :size="30" :width="2" indeterminate></v-progress-circular> |
52 | | - </v-btn> |
53 | | - --> |
| 17 | + <template v-for="button, i in activity.buttons"> |
| 18 | + <v-btn @click="_self[button.action]()" style="height: 70%" :color="button.colorBtn" :class="button.colorText"> |
| 19 | + {{ button.label }} |
| 20 | + <v-icon right dark>{{ button.icon }}</v-icon> |
| 21 | + </v-btn> |
| 22 | + |
| 23 | + </template> |
54 | 24 | </template> |
55 | 25 | <!-- |
56 | 26 | <v-btn @click="dialog = true" icon v-if="status == 200"> |
|
63 | 33 | </v-toolbar-items> |
64 | 34 | </v-toolbar> |
65 | 35 | <v-content> |
66 | | - |
67 | 36 | <div style="height: 480px; width: 600px;"> |
68 | 37 | <div ref="blocklyTotal" style="height: 100%; width: 100%;" class="blocklyTotal"> |
69 | 38 | <div ref="blocklyArea" style="height: 100%; width: 100%;" class="blocklyArea"> |
|
72 | 41 | </div> |
73 | 42 | </div> |
74 | 43 | </div> |
75 | | - |
76 | 44 | </v-content> |
77 | 45 | <!-- Runtime modal --> |
78 | 46 | <v-dialog v-model="runtimeDialog" width="500"> |
@@ -279,10 +247,10 @@ export default { |
279 | 247 | import('vue-prism-component') |
280 | 248 | }, |
281 | 249 | data: () => ({ |
282 | | - cssProps : { |
283 | | - '--bodyFont': 'Roboto', |
284 | | - '--codeFont': 'Ubuntu Mono', |
285 | | - }, |
| 250 | + cssProps: { |
| 251 | + '--bodyFont': 'Roboto', |
| 252 | + '--codeFont': 'Ubuntu Mono', |
| 253 | + }, |
286 | 254 | activityStyle: null, |
287 | 255 | activity: null, |
288 | 256 | log: null, |
@@ -382,8 +350,7 @@ export default { |
382 | 350 | let textTransform = '' |
383 | 351 | if (this.activity.capsSwitch) { |
384 | 352 | textTransform = 'uppercase' |
385 | | - } |
386 | | - else{ |
| 353 | + } else { |
387 | 354 | textTransform = 'none' |
388 | 355 | } |
389 | 356 |
|
|
0 commit comments