@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3333 to =" /"
3434 >
3535 <template v-slot :prepend >
36- <v-icon style =" opacity : 1 ;" >{{ $options.icons. mdiHome }}</v-icon >
36+ <v-icon style =" opacity : 1 ;" >{{ mdiHome }}</v-icon >
3737 </template >
3838 <v-list-item-title >Dashboard</v-list-item-title >
3939 </v-list-item >
@@ -49,21 +49,43 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
4949 </div >
5050 <div class =" resize-bar" ref =" resizeBar" ></div >
5151 <template v-slot :append >
52- <div class =" px-4 py-2 d-flex justify-center" >
53- <span class =" text--secondary" >
54- <strong v-if =" $options.mode !== 'production'" >{{ $options.mode.toUpperCase() }}</strong > {{ $t('App.name') }} {{ $options.version }}
55- </span >
52+ <div class =" pa-2 d-flex justify-center" >
53+ <v-chip
54+ id =" version-chip"
55+ label
56+ class =" font-weight-bold cursor-default"
57+ :prepend-icon =" mdiInformationOutline"
58+ v-bind =" versionChipProps"
59+ />
60+ <v-tooltip
61+ activator =" #version-chip"
62+ location =" top"
63+ >
64+ <div
65+ class =" d-flex flex-column align-center"
66+ style =" pointer-events : visible ;"
67+ data-cy =" version-tooltip"
68+ >
69+ <span
70+ v-for =" (value, key) in cylcVersionInfo"
71+ :key =" key"
72+ >
73+ {{ key }} {{ value }}
74+ </span >
75+ <span >cylc-ui {{ UIVersion }}</span >
76+ </div >
77+ </v-tooltip >
5678 </div >
5779 </template >
5880 </v-navigation-drawer >
5981</template >
6082
6183<script >
62- import { nextTick , ref } from ' vue'
84+ import { inject , nextTick , ref , computed } from ' vue'
6385import { useDisplay } from ' vuetify'
6486import Header from ' @/components/cylc/Header.vue'
6587import Workflows from ' @/views/Workflows.vue'
66- import { mdiHome , mdiGraphql } from ' @mdi/js'
88+ import { mdiHome , mdiInformationOutline } from ' @mdi/js'
6789import pkg from ' @/../package.json'
6890import { when } from ' @/utils'
6991import { useDrawer } from ' @/utils/toolbar'
@@ -122,18 +144,29 @@ export default {
122144 )
123145 })
124146
147+ const cylcVersionInfo = inject (' versionInfo' )
148+ const versionChipProps = computed (() => import .meta.env.MODE === ' production'
149+ ? {
150+ text: ` Cylc ${ cylcVersionInfo .value ? .[' cylc-flow' ] ?? ' ' }` ,
151+ variant: 'text'
152+ }
153+ : {
154+ text: import.meta.env.MODE.toUpperCase(),
155+ variant: 'flat',
156+ color: 'indigo-darken-4',
157+ }
158+ )
159+
125160 return {
126161 drawer,
127162 drawerWidth,
128163 resizeBar,
164+ UIVersion: pkg.version,
165+ cylcVersionInfo,
166+ mdiInformationOutline,
167+ mdiHome,
168+ versionChipProps,
129169 }
130170 },
131-
132- icons: {
133- mdiHome,
134- mdiGraphql,
135- },
136- mode: import .meta.env.MODE,
137- version: pkg .version ,
138171}
139172</script>
0 commit comments