Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move version chip to footer #3518

Merged
merged 11 commits into from
Oct 16, 2024
9 changes: 0 additions & 9 deletions packages/playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@
</v-list>
</div>
</div>

<template v-if="version">
<div class="version">
<v-chip color="secondary">
{{ version }}
</v-chip>
</div>
</template>
</v-navigation-drawer>

<v-main :style="{ paddingTop: navbarConfig ? '140px' : '70px' }">
Expand Down Expand Up @@ -363,7 +355,6 @@ async function setTimeouts() {
}
}
// eslint-disable-next-line no-undef
const version = process.env.VERSION as any;

const routes: AppRoute[] = [
{
Expand Down
18 changes: 15 additions & 3 deletions packages/playground/src/components/main_footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,24 @@
</v-col>
</v-row>
<v-divider class="my-3 w-25 mx-auto" />
<div class="text-center mb-12">{{ new Date().getFullYear() }} — ThreeFoldTech</div>

<div class="mb-12 d-flex justify-center text-subtitle-2">
<p>
&#169; {{ new Date().getFullYear() }} ThreeFoldTech
<span v-if="version !== noAppVersionMessage">
<span class="mx-2">|</span>Version
<span class="footer_header">
{{ version }}
</span></span
>
</p>
</div>
</v-container>
</v-footer>
</template>

<script lang="ts" setup>
import { inject } from "vue";
import { useRouter } from "vue-router";
import { useTheme } from "vuetify";

Expand All @@ -96,10 +108,10 @@ import { AppThemeSelection } from "@/utils/app_theme";
import { manual } from "@/utils/manual";

const theme = useTheme();

const version = process.env.VERSION;
const baseUrl = import.meta.env.BASE_URL;
const $router = useRouter();

const noAppVersionMessage = inject("noAppVersion");
function navigateToHome() {
return $router.push(DashboardRoutes.Other.HomePage);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { defineGlobals } from "./config";
import Monitor from "./Monitor.vue";
import router from "./router";
import { normalizeError } from "./utils/helpers";

const app = createApp(Monitor);

app.config.errorHandler = error => {
Expand Down Expand Up @@ -43,5 +42,6 @@ app.use(createPinia());
app.use(router);
app.use(vuetify);
defineGlobals(app);
app.provide("noAppVersion", "No version to show");

app.mount("#app");
Loading