diff --git a/www/layouts/default.vue b/www/layouts/default.vue
index e352787..200d403 100644
--- a/www/layouts/default.vue
+++ b/www/layouts/default.vue
@@ -24,12 +24,29 @@
+
+
+
+
+
@@ -39,8 +56,14 @@ import { mapMutations } from "vuex";
export default Vue.extend({
computed: {
- isLoading() {
+ isLoading(): boolean {
return this.$store.state.loading.loading;
+ },
+ isProduction(): boolean {
+ return this.$config.env == "production";
+ },
+ myBadge(): string {
+ return `${this.$config.myBadge}/green.svg`
}
}
});
@@ -67,6 +90,10 @@ html {
align-items: center;
justify-content: center;
}
+ .my-badge {
+ display: inline;
+ margin-left: 5px;
+ }
}
*,
*::before,
diff --git a/www/nuxt.config.js b/www/nuxt.config.js
index a567a1b..3a08fe3 100644
--- a/www/nuxt.config.js
+++ b/www/nuxt.config.js
@@ -67,6 +67,7 @@ export default {
'/api/': process.env.NODE_ENV === 'production' ? 'https://badges.toozhao.com' : 'http://localhost:8080',
},
publicRuntimeConfig: {
+ env: process.env.NODE_ENV,
baseURL: process.env.BASE_URL || 'http://localhost:3000',
backendURL: process.env.NODE_ENV === 'production' ? 'https://badges.toozhao.com' : 'http://localhost:8080',
myBadge: process.env.NODE_ENV === 'production' ? 'http://localhost:8080/badges/01EGTQ3JBFYS7VZG36SBPM0SA9' : 'https://badges.toozhao.com/badges/01EGTQ64XK7M48A67K9Y62J0QZ'