Files
tamabox/templates/user/global-blockwords.html
T
tamakyi e3e59e7c69 chore: baseline snapshot before moderation-strictness feature
Repo .git was damaged (refs/ missing, index truncated, object store near-empty).
Repaired via git init (rebuilt refs), stale index preserved as .git/index.corrupt-20260910.bak,
then full worktree committed as a rollback baseline.
2026-09-10 10:56:27 +08:00

30 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
全局屏蔽词表单部分模板:提问 / 私聊 / 投票 三个功能面板共用同一份词表设置。
渲染时「点」为 dict{ Root: 根数据, Action: 表单提交地址 }:
Root —— profile 页面根数据(LoggedUser / TagLimits / LangCode / CSRFTokenHTML …);
Action —— 表单 action,携带 ?tab= 来源面板参数,保存后回跳原面板。
三处展示同一份数据(users.block_words),任意一处修改保存后全部同步生效;
词表按 conf.Limits.MaxBlockWords / MaxBlockWordLen 上限校验(后端同一份配置)。
-->
{{ $root := .Root }}
<div class="uk-margin">
<form method="post" action="{{ .Action }}">
{{ $root.CSRFTokenHTML }}
<legend class="uk-legend">{{t $root.LangCode "admin.globalBlockWords"}}</legend>
<div class="uk-margin">
<p class="uk-text-meta uk-text-small">{{t $root.LangCode "admin.globalBlockWordsHint"}}</p>
<label class="uk-form-label">{{t $root.LangCode "admin.blockWords" | safe}}</label>
<input name="block_words" class="uk-input" type="text" value="{{$root.LoggedUser.BlockWords}}"
data-tb-tag-input
{{ with $root.TagLimits }}data-tb-max="{{ .MaxBlockWords }}" data-tb-max-len="{{ .MaxBlockWordLen }}"{{ end }}
data-tb-msg-too-many="{{t $root.LangCode "admin.flash.blockWordsTooMany"}}"
data-tb-msg-too-long="{{t $root.LangCode "admin.flash.blockWordTooLong"}}"
data-tb-msg-duplicate="{{t $root.LangCode "admin.tagInputDuplicate"}}"
data-tb-msg-hint="{{t $root.LangCode "admin.tagInputHint"}}">
</div>
<div class="tb-card-save">
<button type="submit" class="uk-button uk-button-primary">{{t $root.LangCode "admin.updateBlockWords"}}</button>
</div>
</form>
</div>