mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 13:10:07 +00:00
feat: 管理后台自定义代码
This commit is contained in:
3
resource/l10n/en-US.toml
vendored
3
resource/l10n/en-US.toml
vendored
@@ -331,6 +331,9 @@ other = "Frontend Theme"
|
||||
[CustomCodes]
|
||||
other = "Custom Codes (Style and Script)"
|
||||
|
||||
[CustomCodesDashboard]
|
||||
other = "Custom Codes for Dashboard"
|
||||
|
||||
[AccessPassword]
|
||||
other = "Frontend Access Password"
|
||||
|
||||
|
||||
3
resource/l10n/es-ES.toml
vendored
3
resource/l10n/es-ES.toml
vendored
@@ -331,6 +331,9 @@ other = "Tema de Frontend"
|
||||
[CustomCodes]
|
||||
other = "Códigos Personalizados (Incluye style y script)"
|
||||
|
||||
[CustomCodesDashboard]
|
||||
other = "Custom Codes for Dashboard"
|
||||
|
||||
[AccessPassword]
|
||||
other = "Contraseña de Acceso al Frontend"
|
||||
|
||||
|
||||
3
resource/l10n/zh-CN.toml
vendored
3
resource/l10n/zh-CN.toml
vendored
@@ -331,6 +331,9 @@ other = "前台界面主题"
|
||||
[CustomCodes]
|
||||
other = "自定义代码(包括 style 和 script)"
|
||||
|
||||
[CustomCodesDashboard]
|
||||
other = "Custom Codes for Dashboard"
|
||||
|
||||
[AccessPassword]
|
||||
other = "前台访问密码"
|
||||
|
||||
|
||||
3
resource/l10n/zh-TW.toml
vendored
3
resource/l10n/zh-TW.toml
vendored
@@ -331,6 +331,9 @@ other = "前台界面主題"
|
||||
[CustomCodes]
|
||||
other = "自定義代碼(包括 style 和 script)"
|
||||
|
||||
[CustomCodesDashboard]
|
||||
other = "Custom Codes for Dashboard"
|
||||
|
||||
[AccessPassword]
|
||||
other = "前台訪問密碼"
|
||||
|
||||
|
||||
3
resource/template/common/footer.html
vendored
3
resource/template/common/footer.html
vendored
@@ -14,8 +14,7 @@
|
||||
<script>
|
||||
(function () {
|
||||
updateLang({{.LANG }});
|
||||
document.documentElement.setAttribute('nz-theme', window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
||||
}) ();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
4
resource/template/common/header.html
vendored
4
resource/template/common/header.html
vendored
@@ -13,6 +13,10 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/semantic-ui-alerts.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/main.css?v20240813">
|
||||
<link rel="stylesheet" type="text/css" href="/static/darkmode.css?v20240813">
|
||||
<script>
|
||||
document.documentElement.setAttribute('nz-theme', window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
||||
</script>
|
||||
</head>
|
||||
{{if ts .CustomCodeDashboard}} {{.CustomCodeDashboard|safe}} {{end}}
|
||||
<body>
|
||||
{{end}}
|
||||
10
resource/template/dashboard-default/setting.html
vendored
10
resource/template/dashboard-default/setting.html
vendored
@@ -41,6 +41,10 @@
|
||||
<label>{{tr "CustomCodes"}}</label>
|
||||
<textarea name="CustomCode">{{.Conf.Site.CustomCode}}</textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "CustomCodesDashboard"}}</label>
|
||||
<textarea name="CustomCodeDashboard">{{.Conf.Site.CustomCodeDashboard}}</textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "AccessPassword"}}</label>
|
||||
<input type="text" name="ViewPassword" placeholder="" value="{{.Conf.Site.ViewPassword}}">
|
||||
@@ -128,13 +132,13 @@
|
||||
})
|
||||
$('.checkbox').checkbox()
|
||||
$('#settingForm').find("select[name=Cover]").val({{.Conf.Cover }});
|
||||
{{if .Conf.EnableIPChangeNotification}}
|
||||
{{ if .Conf.EnableIPChangeNotification}}
|
||||
$('.checkbox.ip-change').checkbox('set checked')
|
||||
{{ end }}
|
||||
{{if .Conf.EnablePlainIPInNotification}}
|
||||
{{ if .Conf.EnablePlainIPInNotification}}
|
||||
$('.checkbox.plain-ip').checkbox('set checked')
|
||||
{{ end }}
|
||||
{{if .Conf.DisableSwitchTemplateInFrontend }}
|
||||
{{ if .Conf.DisableSwitchTemplateInFrontend }}
|
||||
$('.checkbox.disable-switch-template').checkbox('set checked')
|
||||
{{ end }}
|
||||
</script>
|
||||
|
||||
1
resource/template/theme-default/footer.html
vendored
1
resource/template/theme-default/footer.html
vendored
@@ -14,7 +14,6 @@
|
||||
// console.log("currentBackendTheme:",currentBackendTheme);
|
||||
}
|
||||
showSwitchTemplate({{ .Themes }}, {{ .Conf.Site.Theme }})
|
||||
document.documentElement.setAttribute('nz-theme', window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
||||
</script>
|
||||
{{ end }}
|
||||
<script>
|
||||
|
||||
8
resource/template/theme-default/header.html
vendored
8
resource/template/theme-default/header.html
vendored
@@ -1,6 +1,7 @@
|
||||
{{define "theme-default/header"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{.Conf.Language}}">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -21,7 +22,10 @@
|
||||
<script src="https://unpkg.com/echarts@5.5.0/dist/echarts.min.js"></script>
|
||||
<script src="/static/semantic-ui-alerts.min.js"></script>
|
||||
<script src="/static/theme-default/js/mixin.js?v20240302"></script>
|
||||
<script>
|
||||
document.documentElement.setAttribute('nz-theme', window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{end}}
|
||||
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user