mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
chart tooltip dark theme
This commit is contained in:
parent
2d8408cd03
commit
2eb65616eb
1 changed files with 15 additions and 0 deletions
|
@ -309,6 +309,9 @@ export default {
|
||||||
opacityTo: 0.5,
|
opacityTo: 0.5,
|
||||||
stops: [0, 50, 100]
|
stops: [0, 50, 100]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
theme: 'light'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chartInterval: null
|
chartInterval: null
|
||||||
|
@ -341,6 +344,10 @@ export default {
|
||||||
},
|
},
|
||||||
toggleSpeed() {
|
toggleSpeed() {
|
||||||
qbit.toggleSpeedLimitsMode()
|
qbit.toggleSpeedLimitsMode()
|
||||||
|
},
|
||||||
|
setChartTooltipTheme(theme) {
|
||||||
|
this.chartOptions.tooltip.theme = theme.toLowerCase()
|
||||||
|
this.$refs.chart.updateOptions(this.chartOptions)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -369,6 +376,14 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$vuetify.theme.dark = this.getTheme()
|
this.$vuetify.theme.dark = this.getTheme()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.setChartTooltipTheme(this.theme)
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
theme(newValue) {
|
||||||
|
this.setChartTooltipTheme(newValue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue