Skip to content

Commit

Permalink
fix: Apply current color to material icons
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Mar 14, 2024
1 parent d60477e commit faf8738
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
25 changes: 21 additions & 4 deletions src/pages/Context.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export default {
async mounted() {
await this.reload()
this.icon = await this.getContextIcon(this.activeContext.iconName)
},
methods: {
Expand All @@ -132,6 +131,7 @@ export default {
this.loading = false
},
async loadContext() {
this.icon = await this.getContextIcon(this.activeContext.iconName)
this.contextResources = []
await this.$store.dispatch('loadContext', { id: this.activeContextId })
const index = this.contexts.findIndex(c => parseInt(c.id) === parseInt(this.activeContextId))
Expand Down Expand Up @@ -187,11 +187,28 @@ export default {
</script>

<style scoped lang="scss">
.content {
margin: 50px 50px 0;
.context {
&__title {
display: inline-flex;
}
&__description {
margin: calc(3 * var(--default-grid-baseline, 4px));
max-width: 790px;
margin-left: 32px;
}
&:deep(.icon-vue) {
min-width: 32px;
min-height: 32px;
}
}
.resource {
margin: 40px 0;
&:deep(.row.first-row) {
margin-left: 20px;
padding-left: 0px;
}
}
</style>
2 changes: 1 addition & 1 deletion src/shared/components/ncIconPicker/mixins/svgHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
`MaterialIcons/${iconName}.svg`
)

return this.uriToSvg(icon)
return this.uriToSvg(icon).replaceAll(/#fff/g, 'currentColor')
},
},
}

0 comments on commit faf8738

Please sign in to comment.