Move auth_redirect and API base URL to global variables via the mixin.
This commit is contained in:
parent
572c8b1674
commit
0d3e0f8f5a
5 changed files with 7 additions and 29 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue