Skip to content

Commit f1cea72

Browse files
committed
Implemented a simple Icon Picker
1 parent 5562a01 commit f1cea72

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

src/components/ActivityEditor.vue

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,18 +186,22 @@
186186
<v-text-field v-model="button.label" label="Etichetta"></v-text-field>
187187
<v-select v-model="button.action" :items="actions" label="Azione" :disabled="button.notErasable">
188188
</v-select>
189+
<v-select :items="textColors" v-model="button.colorText" label="Colore testo"></v-select>
189190
<v-layout row wrap>
190-
<v-flex xs6>
191-
<v-select :items="textColors" v-model="button.colorText" label="Colore testo"></v-select>
192-
</v-flex>
193-
<v-flex xs6>
194-
Colore Pulsante <div style="display:inline-block">
191+
<v-flex xs6 style="text-align: left">
192+
<span style="vertical-align: 55%"> Colore Pulsante </span>
193+
<div style="display:inline-block">
195194
<swatches popover-to="left" v-model="button.colorBtn"></swatches>
196195
</div>
197196
</v-flex>
197+
<v-flex xs6 style="text-align: left">
198+
Icona <v-btn large outline @click="b=i; iconPicker=true;" color="black">
199+
<v-icon large color="black">{{ button.icon }}</v-icon>
200+
</v-btn>
201+
</v-flex>
198202
</v-layout>
199-
<v-text-field v-model="button.icon" label="Icona"></v-text-field>
200203
<v-divider></v-divider>
204+
<br>
201205
<v-btn :color="button.colorBtn" :class="button.colorText">
202206
{{ button.label }}
203207
<v-icon right dark>{{ button.icon }}</v-icon>
@@ -209,6 +213,23 @@
209213
</v-flex>
210214
</v-flex>
211215
</v-container>
216+
<v-dialog v-model="iconPicker" max-width="600px">
217+
<v-card>
218+
<v-card-title class="headline">Seleziona icona</v-card-title>
219+
<v-card-text>
220+
<v-container>
221+
<v-layout row wrap>
222+
<template v-for="icon,i in iconList">
223+
<v-flex xs1>
224+
<v-icon large @click="activity.buttons[b].icon=icon; iconPicker = false">{{ icon }}</v-icon>
225+
</v-flex>
226+
<template v-if="i%10==0"> <br> </template>
227+
</template>
228+
</v-layout>
229+
</v-container>
230+
</v-card-text>
231+
</v-card>
232+
</v-dialog>
212233
</v-tab-item>
213234
<!--
214235
<v-tab-item>
@@ -298,7 +319,10 @@ export default {
298319
saved: false,
299320
CB: process.env.CB_ENDPOINT + process.env.APIv2,
300321
snackbar: false,
322+
iconPicker: false,
323+
iconList: ['3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation', '3d_rotation'],
301324
snackbarText: "",
325+
b: 0,
302326
activity: {
303327
exec: {
304328
camera: true,

0 commit comments

Comments
 (0)