@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33
33
to =" /"
34
34
>
35
35
<template v-slot :prepend >
36
- <v-icon style =" opacity : 1 ;" >{{ $options.icons. mdiHome }}</v-icon >
36
+ <v-icon style =" opacity : 1 ;" >{{ mdiHome }}</v-icon >
37
37
</template >
38
38
<v-list-item-title >Dashboard</v-list-item-title >
39
39
</v-list-item >
@@ -49,21 +49,43 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
49
49
</div >
50
50
<div class =" resize-bar" ref =" resizeBar" ></div >
51
51
<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 >
56
78
</div >
57
79
</template >
58
80
</v-navigation-drawer >
59
81
</template >
60
82
61
83
<script >
62
- import { nextTick , ref } from ' vue'
84
+ import { inject , nextTick , ref , computed } from ' vue'
63
85
import { useDisplay } from ' vuetify'
64
86
import Header from ' @/components/cylc/Header.vue'
65
87
import Workflows from ' @/views/Workflows.vue'
66
- import { mdiHome , mdiGraphql } from ' @mdi/js'
88
+ import { mdiHome , mdiInformationOutline } from ' @mdi/js'
67
89
import pkg from ' @/../package.json'
68
90
import { when } from ' @/utils'
69
91
import { useDrawer } from ' @/utils/toolbar'
@@ -122,18 +144,29 @@ export default {
122
144
)
123
145
})
124
146
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
+
125
160
return {
126
161
drawer,
127
162
drawerWidth,
128
163
resizeBar,
164
+ UIVersion: pkg.version,
165
+ cylcVersionInfo,
166
+ mdiInformationOutline,
167
+ mdiHome,
168
+ versionChipProps,
129
169
}
130
170
},
131
-
132
- icons: {
133
- mdiHome,
134
- mdiGraphql,
135
- },
136
- mode: import .meta.env.MODE,
137
- version: pkg .version ,
138
171
}
139
172
</script>
0 commit comments