Skip to content

Commit 509c408

Browse files
committed
Working default colors and color loading from file
1 parent ca5eee0 commit 509c408

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

src/App.vue

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,26 @@ export default {
1212
components: {
1313
SideBar,
1414
},
15-
provide() {
16-
return {
17-
colors: colorsData,
18-
};
19-
}
15+
provide() {
16+
if (colorsData) {
17+
return {
18+
colors: colorsData,
19+
};
20+
} else {
21+
return {
22+
colors: {
23+
primary: '#3498db',
24+
secondary: '#2ecc71',
25+
downClick: '#e74c3c',
26+
clicked: 'e',
27+
hover: '#383444',
28+
text: 'white',
29+
background: '#343541',
30+
sidebar: '#000000',
31+
},
32+
};
33+
}
34+
},
2035
};
2136
</script>
2237

src/assets/colors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"hover": "#383444",
77
"text": "white",
88
"background": "#343541",
9-
"sidebar": "#000000"
9+
"sideBar": "black"
1010
}

0 commit comments

Comments
 (0)