加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
qishibo 提交于 2024-05-21 15:30 . lint format
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" type="text/css" id="theme-link">
<title>Another Redis Desktop Manager</title>
</head>
<body>
<!-- this script must be placed here after body -->
<script type="text/javascript">
const ipcRenderer = require('electron').ipcRenderer;
function globalChangeTheme(theme) {
theme && (localStorage.theme = theme);
!theme && (theme = localStorage.theme);
const themeName = (theme == 'dark' ? 'dark' : 'chalk');
const themeHref = 'static/theme/' + themeName + '/index.css';
document.getElementById('theme-link').href = themeHref;
themeName == 'dark' ? document.body.classList.add('dark-mode') :
document.body.classList.remove('dark-mode');
// change native theme
ipcRenderer.invoke('changeTheme', themeName);
}
// theme init start
globalChangeTheme();
</script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化