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
|
|
@ -1,9 +1,8 @@
|
|||
<template>
|
||||
<div class="maximize_size">
|
||||
<LoginCard v-if="!is_authed" :redirect="auth.redirect" />
|
||||
<LoginCard v-if="!is_authed" />
|
||||
<MainView
|
||||
v-else
|
||||
:auth_redirect="auth.redirect"
|
||||
:preview_mode="is_preview"
|
||||
:dev_mode="is_dev"
|
||||
/>
|
||||
|
|
@ -24,11 +23,6 @@ export default {
|
|||
"LoginCard": LoginCard,
|
||||
"MainView": MainView
|
||||
},
|
||||
data() { return {
|
||||
auth: {
|
||||
redirect: process.env.NODE_ENV === `production` ? `https://oliver.akins.me/top-lists` : `http://localhost:8080`
|
||||
}
|
||||
} },
|
||||
computed: {
|
||||
is_dev() {
|
||||
let params = new URLSearchParams(window.location.search.slice(1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue