Skip to content

Commit 68dc659

Browse files
authored
add experimental tag for experimental versions (#923)
* add experimental tag for experimental versions * apply formatting changes --------- Co-authored-by: Logende <[email protected]>
1 parent 56b87c5 commit 68dc659

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/github-pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
env:
1919
USE_META_CONFIGURATOR_BASE_PATH: true # Set to true for GitHub Pages deployment
2020
VITE_FRONTEND_HOSTNAME: https://metaconfigurator.github.io/meta-configurator
21+
EXPERIMENTAL: true
2122
run: |
2223
cd meta_configurator
2324
npm ci

meta_configurator/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/// <reference types="vite/client" />
22

33
declare const __APP_VERSION__: string;
4+
declare const __APP_EXPERIMENTAL__: boolean;

meta_configurator/src/components/toolbar/dialogs/AboutDialog.vue

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
Dialog that shows information about the application and the licenses of the used icons.
33
Emits an update:visible event when the dialog is closed.
44
-->
5-
<script setup lang="ts">
5+
<script setup lang="ts" xmlns="http://www.w3.org/1999/html">
66
import Dialog from 'primevue/dialog';
7+
import Tag from 'primevue/tag';
78
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
89
910
defineProps<{visible: boolean}>();
@@ -13,6 +14,7 @@ defineEmits<{
1314
}>();
1415
1516
const appVersion = __APP_VERSION__;
17+
const isExperimental = __APP_EXPERIMENTAL__;
1618
</script>
1719

1820
<template>
@@ -26,7 +28,6 @@ const appVersion = __APP_VERSION__;
2628
</p>
2729
<p>It is currently in alpha stage, so expect bugs and missing features.</p>
2830
<p>MetaConfigurator is open source and licensed under the MIT license.</p>
29-
<p class="text-sm text-gray-500">Version {{ appVersion }}</p>
3031
<p>
3132
Check our
3233
<a
@@ -39,6 +40,11 @@ const appVersion = __APP_VERSION__;
3940
for more information
4041
</p>
4142
<hr class="my-2" />
43+
<p class="text-sm text-gray-500">
44+
Version {{ appVersion }}
45+
<Tag v-if="isExperimental" severity="warn" value="Experimental" class="ml-2 tag" />
46+
</p>
47+
<hr class="my-2" />
4248
<p>Felix Neubauer, Paul Bredl, Minye Xu, Keyuriben Patel, Jürgen Pleiss, Benjamin Uekermann</p>
4349
<p>Institute for Visualization and Interactive Systems, University of Stuttgart</p>
4450
<p>Universitätsstrasse 38D, 70569 Stuttgart, Germany</p>
@@ -67,4 +73,8 @@ const appVersion = __APP_VERSION__;
6773
</Dialog>
6874
</template>
6975

70-
<style scoped></style>
76+
<style scoped>
77+
.tag {
78+
background-color: var(--p-primary-color);
79+
}
80+
</style>

meta_configurator/vite.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ const pkg = require('./package.json');
1111

1212
// Use process.env.USE_BASE_PATH to determine if base path should be included
1313
const useMetaConfiguratorBasePath = process.env.USE_META_CONFIGURATOR_BASE_PATH === 'true';
14+
const isExperimental = process.env.EXPERIMENTAL !== 'false';
1415

1516
// https://vitejs.dev/config/
1617
export default defineConfig({
1718
base: useMetaConfiguratorBasePath ? '/meta-configurator/' : '/',
1819
define: {
1920
__APP_VERSION__: JSON.stringify(pkg.version),
21+
__APP_EXPERIMENTAL__: JSON.stringify(isExperimental),
2022
},
2123
plugins: [vue(), vueJsx(),
2224

0 commit comments

Comments
 (0)