From 77b170c0a325811a96b9bacbf0543d1669d6db39 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Sep 2019 23:19:53 +0200 Subject: [PATCH] fix logo --- quasar.conf.js | 1 + src/App.vue | 9 +++++++++ src/components/ui/token-statistics.vue | 4 ++-- src/store/ui/actions.js | 26 ++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/quasar.conf.js b/quasar.conf.js index 138a7a0..c1bddd6 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -83,6 +83,7 @@ module.exports = function (ctx) { new CopyWebpackPlugin([ { context: `${__dirname}/src/extensions/branding/images/`,from:'*.*', to:'branding/images', toType: 'dir'}, { context: `${__dirname}/src/extensions/branding/images/icons`,from:'*.*', to:'branding/images/icons', toType: 'dir'}, + { context: `${__dirname}/src/extensions/branding/images/logo`,from:'*.*', to:'branding/images/logo', toType: 'dir'}, { context: `${__dirname}/src/extensions/branding/images/social_share_preview`,from:'*.*', to:'branding/images/social_share_preview', toType: 'dir'} ] ) diff --git a/src/App.vue b/src/App.vue index 03c1f5e..ef453f0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -90,6 +90,15 @@ export default { default: this.$t("meta.noscript") } }; + }, + + watch: { + "$route.query.theme": function(v) { + console.log(v); + if (v) { + this.$store.dispatch("ui/loadTheme", JSON.parse(v)); + } + } } }; diff --git a/src/components/ui/token-statistics.vue b/src/components/ui/token-statistics.vue index c791454..17bdba8 100644 --- a/src/components/ui/token-statistics.vue +++ b/src/components/ui/token-statistics.vue @@ -4,7 +4,7 @@
-
value {{ market_data.current_price.usd.toFixed(4) }} USD
+
value {{ market_data.current_price.usd.toFixed(5) }} USD
+{{ market_data.price_change_percentage_24h }}%
-
+
diff --git a/src/store/ui/actions.js b/src/store/ui/actions.js index e69de29..bac48fc 100644 --- a/src/store/ui/actions.js +++ b/src/store/ui/actions.js @@ -0,0 +1,26 @@ +import { colors } from "quasar"; + +// { +// "is_dark": false, +// "colors": { +// "$primary": "#6677d9", +// "$bg1": "#d7dcf7", +// "$bg2": "#f0f1fa", +// "$text1": "#292829", +// "$text2": "#332f33", +// "$info": "#949ed4", +// "$positive": "#78c48a", +// "$negative": "#d67878", +// "$dark": "#afb6e0" +// } +// } + +export async function loadTheme({ commit }, theme) { + let colorvars = Object.keys(theme.colors); + + commit("setIsDark", theme.isDark); + for (let i = 0; i < colorvars.length; i++) { + let cv = colorvars[i].replace("$", ""); + colors.setBrand(cv, theme.colors[colorvars[i]]); + } +}