From 270558129f2f84402ee72f093d820a5cb2b639d0 Mon Sep 17 00:00:00 2001 From: qwqcode Date: Wed, 28 Aug 2024 12:40:47 +0800 Subject: [PATCH] fix(ui/dark_mode): apply dark mode config option before mounting ui (#890) --- ui/artalk/src/context.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/artalk/src/context.ts b/ui/artalk/src/context.ts index 419ce928..a1fb4bd2 100644 --- a/ui/artalk/src/context.ts +++ b/ui/artalk/src/context.ts @@ -45,6 +45,7 @@ class Context implements ContextApi { this.$root = conf.el as HTMLElement this.$root.classList.add('artalk') this.$root.innerHTML = '' + conf.darkMode && this.$root.classList.add('atk-dark-mode') this.data = new DataManager(this.events)