修复未启用右键菜单时,浮窗无法切换深色模式的问题 (#382)

修复未启用右键菜单时,浮窗无法切换深色模式的问题
This commit is contained in:
石头 2023-08-06 18:04:38 +08:00 committed by GitHub
parent 69683629d7
commit 8fa12607ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -316,6 +316,11 @@ var navFn = {
categoriesOptionNew.legend.textStyle.color = color
categoriesChart.setOption(categoriesOptionNew)
}
heo.darkModeStatus();
//代码块
if(GLOBAL_CONFIG.prism.enable){
halo.dataCodeTheme();
}
}
}

View File

@ -204,12 +204,6 @@ async function copyImage(imageURL) {
rm.switchDarkMode = function () {
navFn.switchDarkMode();
rm.hideRightMenu();
heo.darkModeStatus();
//代码块
if(GLOBAL_CONFIG.prism.enable){
halo.dataCodeTheme();
}
//halo.darkComment();
}

View File

@ -86,7 +86,7 @@
<div class="button-group">
<div class="console-btn-item">
<!-- 用到了 rightmenu.js 的功能,还需要调整 -->
<a class="darkmode_switchbutton" href="javascript:void(0);" onclick="rm.switchDarkMode()" rel="external nofollow"
<a class="darkmode_switchbutton" href="javascript:void(0);" onclick="navFn.switchDarkMode();" rel="external nofollow"
title="显示模式切换"><i class="iconfont icon-moon" style="font-size:1rem"></i>
</a>
</div>