fix banner and chart color
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ref } from 'vue'
|
||||
import { getConstByKey } from '@/api/const'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
|
||||
function parseJsonArray(raw: unknown): unknown[] {
|
||||
if (raw == null || raw === '') {
|
||||
@@ -30,6 +31,13 @@ let bannersPromise: Promise<void> | null = null
|
||||
let bannersLoaded = false
|
||||
|
||||
async function fetchBanners(force = false) {
|
||||
const settingsStore = useSettingsStore()
|
||||
if (!settingsStore.isSettingTruthy('banner_enabled')) {
|
||||
banners.value = []
|
||||
bannersLoaded = true
|
||||
return
|
||||
}
|
||||
|
||||
if (!force && bannersLoaded) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user