Keldos commited on
Commit
1c0a00b
1 Parent(s): 4567189

适配gradio新的亮暗色切换

Browse files
Files changed (1) hide show
  1. assets/custom.js +4 -4
assets/custom.js CHANGED
@@ -245,11 +245,11 @@ function showOrHideUserInfo() {
245
 
246
  function toggleDarkMode(isEnabled) {
247
  if (isEnabled) {
248
- gradioContainer.classList.add("dark");
249
- document.body.style.setProperty("background-color", "var(--neutral-950)", "important");
250
  } else {
251
- gradioContainer.classList.remove("dark");
252
- document.body.style.backgroundColor = "";
253
  }
254
  }
255
  function adjustDarkMode() {
 
245
 
246
  function toggleDarkMode(isEnabled) {
247
  if (isEnabled) {
248
+ document.body.classList.add("dark");
249
+ // document.body.style.setProperty("background-color", "var(--neutral-950)", "important");
250
  } else {
251
+ document.body.classList.remove("dark");
252
+ // document.body.style.backgroundColor = "";
253
  }
254
  }
255
  function adjustDarkMode() {