diff --git a/common/templates/base.html b/common/templates/base.html index 4b4c6b72d0..e77198c767 100644 --- a/common/templates/base.html +++ b/common/templates/base.html @@ -386,6 +386,9 @@

+ {% if announcement_content_enabled %} + + {% endif %} {% block content %} {% endblock content %} diff --git a/common/templates/config.html b/common/templates/config.html index de9910eb43..1779f5cbc8 100755 --- a/common/templates/config.html +++ b/common/templates/config.html @@ -1016,6 +1016,31 @@

其他配置

+
+ +
+
+ +
+
+
+
+ +
+ + +
+
diff --git a/common/utils/global_info.py b/common/utils/global_info.py index 5dc400a6c8..5c5cd89d39 100644 --- a/common/utils/global_info.py +++ b/common/utils/global_info.py @@ -24,11 +24,16 @@ def global_info(request): else: todo = 0 - watermark_enabled = SysConfig().get("watermark_enabled", False) + sys_config = SysConfig() + watermark_enabled = sys_config.get("watermark_enabled", False) + announcement_content_enabled = sys_config.get("announcement_content_enabled", False) + announcement_content = sys_config.get("announcement_content", "") return { "todo": todo, "archery_version": display_version, "watermark_enabled": watermark_enabled, + "announcement_content_enabled": announcement_content_enabled, + "announcement_content": announcement_content, "twofa_type": twofa_type, }