Fix title name in workflow sidebar when clicking on path
This commit is contained in:
parent
172a78d299
commit
233aa9e5af
@ -235,10 +235,12 @@
|
|||||||
class="d-flex align-items-center w-100 h5 mb-0 p-2"
|
class="d-flex align-items-center w-100 h5 mb-0 p-2"
|
||||||
>
|
>
|
||||||
<b-img
|
<b-img
|
||||||
|
v-if="getSidebarItemIcon"
|
||||||
:src="getSidebarItemIcon"
|
:src="getSidebarItemIcon"
|
||||||
|
class="mr-2"
|
||||||
/>
|
/>
|
||||||
<h4
|
<h4
|
||||||
class="text-primary font-weight-bold ml-2 mb-0"
|
class="text-primary font-weight-bold mb-0"
|
||||||
>
|
>
|
||||||
<b>{{ getSidebarItemType }}</b>
|
<b>{{ getSidebarItemType }}</b>
|
||||||
</h4>
|
</h4>
|
||||||
@ -631,8 +633,14 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
getSidebarItemType () {
|
getSidebarItemType () {
|
||||||
const { item } = this.sidebar
|
const { item = {} } = this.sidebar || {}
|
||||||
return this.$t(`steps:${item.node.style}.short`) || item.node.style
|
const { style, edge } = item.node || {}
|
||||||
|
|
||||||
|
if (edge) {
|
||||||
|
return this.$t('steps:path.short')
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.$t(`steps:${style}.short`) || style
|
||||||
},
|
},
|
||||||
|
|
||||||
getSidebarItemIcon () {
|
getSidebarItemIcon () {
|
||||||
@ -641,6 +649,7 @@ export default {
|
|||||||
if (item && item.config) {
|
if (item && item.config) {
|
||||||
return this.getIcon(getStyleFromKind(item.config).icon, this.currentTheme)
|
return this.getIcon(getStyleFromKind(item.config).icon, this.currentTheme)
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined
|
return undefined
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2560,6 +2569,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getIcon (icon, mode = 'light') {
|
getIcon (icon, mode = 'light') {
|
||||||
|
if (!icon) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
return `${mxClient.imageBasePath}/${mode === 'dark' ? 'dark/' : ''}${icon}.svg`
|
return `${mxClient.imageBasePath}/${mode === 'dark' ? 'dark/' : ''}${icon}.svg`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -112,4 +112,7 @@ tooltip:
|
|||||||
content:
|
content:
|
||||||
label: Content
|
label: Content
|
||||||
short: Content
|
short: Content
|
||||||
tooltip: Content block used for text annotations
|
tooltip: Content block used for text annotations
|
||||||
|
path:
|
||||||
|
label: Path
|
||||||
|
short: Path
|
||||||
Loading…
x
Reference in New Issue
Block a user