Add global settings (#40)

This commit is contained in:
Jonas Plum
2022-03-13 13:45:10 +01:00
committed by GitHub
parent 86daadc73d
commit 18a4dc54e7
30 changed files with 1297 additions and 255 deletions

View File

@@ -9,6 +9,9 @@
<v-icon small class="mr-1" :color="statusColor">{{ statusIcon }}</v-icon>
<span :class="statusColor + '--text'">{{ artifact.status | capitalize }}</span>
<v-icon small class="mx-1" :color="kindColor">{{ kindIcon }}</v-icon>
<span :class="kindColor + '--text'">{{ artifact.kind | capitalize }}</span>
<v-spacer></v-spacer>
<v-icon small class="mr-1">mdi-information</v-icon>
<span class="mr-1">{{ artifact.enrichments ? lodash.size(artifact.enrichments) : 0 }}</span>
@@ -47,6 +50,24 @@ export default Vue.extend({
}
})
return color;
},
kindIcon: function () {
let icon = "mdi-help";
this.lodash.forEach(this.$store.state.settings.artifactKinds, (state: Type) => {
if (this.artifact.kind === state.id) {
icon = state.icon;
}
})
return icon;
},
kindColor: function () {
let color = TypeColorEnum.Info as TypeColorEnum;
this.lodash.forEach(this.$store.state.settings.artifactKinds, (state: Type) => {
if (this.artifact.kind === state.id && state.color) {
color = state.color;
}
})
return color;
}
},
methods: {