Skip to content

Commit 01b6fe8

Browse files
committed
changed tile color from picker to accent dropdown
1 parent f3c32c0 commit 01b6fe8

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

build.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"home": {
33
"tileData": [{
4-
"name": "No",
5-
"text": "No",
4+
"name": "ignore",
5+
"text": "ignore",
66
"accent": "peach",
7-
"image": "https://img.icons8.com/officexs/64/000000/cancel-2.png",
7+
"image": "./assets/motivate.gif",
88
"id": 0,
99
"messages": {
1010
"de": {

vueapp/images/200.gif

718 KB
Loading

vueapp/src/components/TilePad/EditTileDialog.vue

+13-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,18 @@
4444
<p class="text-left">
4545
{{ $t('editMode.tile.accentColor') }}
4646
</p>
47+
<!--
4748
<v-color-picker
4849
v-model="color"
4950
hide-inputs
5051
/>
52+
-->
53+
<v-select
54+
:items="tileColors"
55+
v-model="currentTileBeingEdited.accent"
56+
filled
57+
label="Accent"
58+
></v-select>
5159
</v-col>
5260

5361
</v-row>
@@ -81,9 +89,14 @@
8189
import { mapActions, mapGetters } from 'vuex';
8290
8391
export default {
92+
...mapGetters('tilePad', [
93+
'currentTileBeingEdited',
94+
]),
8495
name: 'EditTileDialog',
8596
data () {
8697
return {
98+
tileColors: ['blush', 'peach', 'pear', 'mint', 'violet', 'white'],
99+
currentColor: 'peach',
87100
valid:false,
88101
color: '',
89102
newTileObject: {},
@@ -130,10 +143,6 @@ export default {
130143
}
131144
return;
132145
}else{
133-
this.saveEditsToTileBeingEdited({
134-
key: 'accent',
135-
value: this.color
136-
});
137146
this.saveTileEdit();
138147
this.toggleEditDialogVisibility();
139148
}

vueapp/src/components/TilePad/Tile.vue

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- Add a new tile button, appears in edit mode -->
12
<template>
23
<v-btn
34
raised
@@ -75,13 +76,15 @@
7576
<script>
7677
import { mapGetters, mapActions, mapState } from 'vuex';
7778

79+
/* Tile creation */
7880
export default {
7981
name: 'Tile',
8082
props: {
8183
tileData: {
8284
type: Object,
8385
default() {
8486
return {
87+
/* All attributes from json file for each tile object */
8588
name: '',
8689
text: '',
8790
accent: '',
@@ -116,10 +119,11 @@ export default {
116119
displayTapCount: 'settings/displayTapCount',
117120
tileTapsCount: 'tilePad/tileTapsCount',
118121
}),
122+
123+
/* Make card color, if hex value return that. */
124+
//Might delete this feature and replace with just listed accents for simplicity.
119125
cardColor: function () {
120126
switch (this.localeTileData.accent) {
121-
case 'red':
122-
return '#FF9AA2';
123127
case 'blush':
124128
return '#FFB7B2';
125129
case 'peach':
@@ -130,8 +134,10 @@ export default {
130134
return '#B5EAD7';
131135
case 'violet':
132136
return '#C7CEEA';
137+
case 'white':
138+
return '#FFFFFF';
133139
default:
134-
return this.localeTileData.accent;
140+
return '#FFFFFF';
135141
}
136142
},
137143
localeTileData() {

0 commit comments

Comments
 (0)