aliyun sensor server
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
审核严格度表单部分模板:提问 / 私聊 / 投票 三个功能面板共用同一份设置
|
||||
(与 user/global-blockwords 相同的渲染约定:dict{ Root: 根数据, Action: 提交地址 })。
|
||||
|
||||
这里刻意把「底线拦截」与每个档位的拦截范围全部平铺展示,而不是藏在折叠提示里:
|
||||
要求是让用户在按下保存之前就清楚知道哪些内容会被拦、哪些会被放行。
|
||||
档位的判定规则以 internal/security/censor/policy.go 为唯一事实来源,
|
||||
本模板只负责展示,不重复实现判定。
|
||||
-->
|
||||
{{ $root := .Root }}
|
||||
<div class="uk-margin">
|
||||
<form method="post" action="{{ .Action }}">
|
||||
{{ $root.CSRFTokenHTML }}
|
||||
<legend class="uk-legend">{{t $root.LangCode "admin.moderationStrictness"}}</legend>
|
||||
|
||||
<p class="uk-text-meta uk-text-small">{{t $root.LangCode "admin.moderationStrictnessHint"}}</p>
|
||||
<p class="uk-text-meta uk-text-small">{{t $root.LangCode "admin.moderationStrictnessBaseline"}}</p>
|
||||
|
||||
<table class="uk-table uk-table-small uk-table-divider">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{t $root.LangCode "admin.moderationStrictnessColumnLevel"}}</th>
|
||||
<th>{{t $root.LangCode "admin.moderationStrictnessColumnScope"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessOption.lax"}}</td>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessScope.lax"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessOption.standard"}}</td>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessScope.standard"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessOption.strict"}}</td>
|
||||
<td>{{t $root.LangCode "admin.moderationStrictnessScope.strict"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label">{{t $root.LangCode "admin.moderationStrictness"}}</label>
|
||||
{{/* 回显「最终生效」档位而非原始字段值:字段为空(跟随站点默认)时若直接比较,
|
||||
三个 option 都不匹配,浏览器会默认选中第一项(宽松),与实际生效的严格档不符。
|
||||
解析走 internal/template 的 moderationStrictness 函数(同一份事实来源)。 */}}
|
||||
{{ $current := moderationStrictness $root.LoggedUser.ModerationStrictness }}
|
||||
<select name="strictness" class="uk-select uk-width-medium">
|
||||
<option value="lax"{{ if eq $current "lax" }} selected{{ end }}>
|
||||
{{t $root.LangCode "admin.moderationStrictnessOption.lax"}}
|
||||
</option>
|
||||
<option value="standard"{{ if eq $current "standard" }} selected{{ end }}>
|
||||
{{t $root.LangCode "admin.moderationStrictnessOption.standard"}}
|
||||
</option>
|
||||
<option value="strict"{{ if eq $current "strict" }} selected{{ end }}>
|
||||
{{t $root.LangCode "admin.moderationStrictnessOption.strict"}}
|
||||
</option>
|
||||
</select>
|
||||
<span class="uk-text-muted uk-text-small">{{t $root.LangCode "admin.moderationStrictnessUnsetHint"}}</span>
|
||||
</div>
|
||||
|
||||
<div class="tb-card-save">
|
||||
<button type="submit" class="uk-button uk-button-primary">{{t $root.LangCode "admin.updateModerationStrictness"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -834,6 +834,9 @@
|
||||
<!-- 全局屏蔽词:三个功能面板共用同一份(见 user/global-blockwords 部分模板) -->
|
||||
{{ template "user/global-blockwords" (dict "Root" $ "Action" "/user/blockwords/update?tab=question") }}
|
||||
|
||||
<!-- 审核严格度:三个功能面板共用同一份(见 user/moderation-strictness 部分模板) -->
|
||||
{{ template "user/moderation-strictness" (dict "Root" $ "Action" "/user/moderation-strictness/update?tab=question") }}
|
||||
|
||||
<hr>
|
||||
<div class="uk-margin">
|
||||
<form method="post" action="/user/profile/update-ask-password">
|
||||
@@ -882,6 +885,8 @@
|
||||
<hr>
|
||||
<!-- 全局屏蔽词:提问/私聊/投票三面板共用同一份(见 user/global-blockwords 部分模板) -->
|
||||
{{ template "user/global-blockwords" (dict "Root" $ "Action" "/user/blockwords/update?tab=chat") }}
|
||||
<!-- 审核严格度:同样三面板共用一份(见 user/moderation-strictness 部分模板) -->
|
||||
{{ template "user/moderation-strictness" (dict "Root" $ "Action" "/user/moderation-strictness/update?tab=chat") }}
|
||||
</div><!-- /私聊功能管理面板 -->
|
||||
|
||||
<!-- ===================== 投票功能管理面板 ===================== -->
|
||||
@@ -891,6 +896,9 @@
|
||||
<hr>
|
||||
<!-- 全局屏蔽词:三个功能面板共用同一份(见 user/global-blockwords 部分模板) -->
|
||||
{{ template "user/global-blockwords" (dict "Root" $ "Action" "/user/blockwords/update?tab=vote") }}
|
||||
|
||||
<!-- 审核严格度:三个功能面板共用同一份(见 user/moderation-strictness 部分模板) -->
|
||||
{{ template "user/moderation-strictness" (dict "Root" $ "Action" "/user/moderation-strictness/update?tab=vote") }}
|
||||
</div><!-- /投票功能管理面板 -->
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user