Skip to content

Commit d174406

Browse files
committed
Conditional show toolbar button, title, and runtime view elements
1 parent c996193 commit d174406

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/components/Activity.vue

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,24 @@
33
<v-app id="inspire">
44
<sidebar mobileDrawAnim=0></sidebar>
55
<v-toolbar color="indigo" dark fixed app>
6+
<template v-if="activity.drawerEnabled">
67
<v-toolbar-side-icon @click.stop="toggleSidebar()"></v-toolbar-side-icon>
8+
</template>
9+
<template v-if="activity.showName">
710
<v-toolbar-title>
811
{{ activity.name }}
912
</v-toolbar-title>
13+
</template>
1014
<v-spacer></v-spacer>
1115
<v-toolbar-items>
1216
<!-- template serves as an invisible wrapper to conditional render more than one element -->
1317
<template v-if="status == 200">
1418

19+
<v-btn v-on:click="runProgramLegacy()" flat>
20+
<v-icon>play_arrow</v-icon>
21+
Esegui
22+
</v-btn>
23+
1524
<!--
1625
<v-btn v-if="isDefault != 'True'" @click="overwrite = 1, saveProgram()" flat>
1726
<v-icon>save</v-icon>
@@ -25,10 +34,7 @@
2534
<v-icon>folder_open</v-icon>
2635
Carica
2736
</v-btn>
28-
<v-btn v-on:click="runProgramLegacy()" flat>
29-
<v-icon>play_arrow</v-icon>
30-
Esegui
31-
</v-btn>
37+
3238
<v-btn v-on:click="getProgramCode()" flat>
3339
<v-icon>code</v-icon>
3440
Mostra codice
@@ -74,11 +80,16 @@
7480
<v-card-title class="headline grey lighten-2" primary-title>
7581
Esecuzione
7682
</v-card-title>
77-
<v-card-text>
78-
<v-img :src="webcamStream" />
83+
<template v-if="activity.exec.camera">
84+
<v-card-text v-if="runtimeDialog">
85+
<v-img v-if="runtimeDialog" :src="webcamStream" />
7986
</v-card-text>
87+
</template>
88+
8089
<v-divider></v-divider>
90+
<template v-if="activity.exec.log">
8191
{{ log }}
92+
</template>
8293
<v-card-actions>
8394
<v-spacer></v-spacer>
8495
<v-btn color="primary" flat @click="runtimeDialog = false; stopProgram()">

0 commit comments

Comments
 (0)