Skip to content

Commit

Permalink
Merge pull request #3518 from threefoldtech/development_version_chip_UI
Browse files Browse the repository at this point in the history
Move version chip to footer
  • Loading branch information
ehab-hassan authored Oct 16, 2024
2 parents 0e606c5 + 9a3c1dc commit fccc6af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
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");

0 comments on commit fccc6af

Please sign in to comment.