后台关闭切换主题功能

This commit is contained in:
naiba
2024-02-27 21:05:39 +08:00
parent 6fa149519d
commit da6a3463ed
8 changed files with 40 additions and 6 deletions

View File

@@ -70,18 +70,24 @@
<input type="text" name="IPChangeNotificationTag" placeholder="" value="{{.Conf.IPChangeNotificationTag}}">
</div>
<div class="field">
<div class="ui nf-ssl checkbox ip-change">
<div class="ui checkbox ip-change">
<input name="EnableIPChangeNotification" type="checkbox" tabindex="0" class="hidden">
<label>{{tr "Enable"}}</label>
</div>
</div>
</div>
<div class="field">
<div class="ui nf-ssl checkbox plain-ip">
<div class="ui checkbox plain-ip">
<input name="EnablePlainIPInNotification" type="checkbox" tabindex="0" class="hidden">
<label>{{tr "NotificationMessagesDoNotHideIP"}}</label>
</div>
</div>
<div class="field">
<div class="ui checkbox disable-switch-template">
<input name="DisableSwitchTemplateInFrontend" type="checkbox" tabindex="0" class="hidden">
<label>{{tr "DisableSwitchTemplateInFrontend"}}</label>
</div>
</div>
<button class="ui button" type="submit">{{tr "Save"}}</button>
</form>
</div>
@@ -128,5 +134,8 @@
{{if .Conf.EnablePlainIPInNotification}}
$('.checkbox.plain-ip').checkbox('set checked')
{{ end }}
{{if .Conf.DisableSwitchTemplateInFrontend }}
$('.checkbox.disable-switch-template').checkbox('set checked')
{{ end }}
</script>
{{end}}

View File

@@ -7,6 +7,16 @@
{{.Version}}</small>
</div>
</div>
{{ if not .Conf.DisableSwitchTemplateInFrontend }}
<script>
function showSwitchTemplate(list, currentBackendTheme) {
console.log(list, currentBackendTheme);
}
showSwitchTemplate({{ .Themes }}, {{ .Conf.Site.Theme }})
</script>
{{ end }}
<script>
</script>
</body>
</html>
{{end}}