0
0
Fork 0

Move auth_redirect and API base URL to global variables via the mixin.

This commit is contained in:
Tyler-A 2020-08-09 00:15:57 -06:00
parent 572c8b1674
commit 0d3e0f8f5a
5 changed files with 7 additions and 29 deletions

View file

@ -12,6 +12,10 @@ Vue.use(VueEllipseProgress, `percent`);
// global mixings
Vue.mixin({
data() {return {
api_url: `https://api.spotify.com/v1`,
auth_redirect: process.env.NODE_ENV === `production` ? `https://oliver.akins.me/top-lists` : `http://localhost:8080`,
}},
methods: {
css_var(var_name) {
return getComputedStyle(document.documentElement).getPropertyValue(var_name);