From 92de8fb396265d057f18aab4de0bc8aff4b90188 Mon Sep 17 00:00:00 2001 From: f0x52 Date: Sat, 19 Aug 2023 14:33:15 +0200 Subject: [feature] Instance rules (#2125) * init instance rules database model, admin api * expose instance rules in public instance api * public /api/v1/instance/rules route * GET ruleById * createRule route * createRule auth check * updateRule * deleteRule * list rules on about page * ruleGet auth * add about page ids for anchors * process and store adding violated rules to reports * admin api models for instance rules * instance rule edit frontend * change rule inputs to textareas * database fixes after rebase (#2124) * remove unused imports * fix db migration column name * fix tests * fix more tests * fix postgres error with wrongly used Ident * add some tests, fiddle with rule model a bit, fix postgres migration * swagger docs --------- Co-authored-by: tsmethurst --- web/source/settings/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/source/settings/index.js') diff --git a/web/source/settings/index.js b/web/source/settings/index.js index 8eb11e0aa..398bca0f6 100644 --- a/web/source/settings/index.js +++ b/web/source/settings/index.js @@ -60,7 +60,10 @@ const { Sidebar, ViewRouter } = createNavigation("/settings", [ Item("Local", { icon: "fa-home", wildcard: true }, require("./admin/emoji/local")), Item("Remote", { icon: "fa-cloud" }, require("./admin/emoji/remote")) ]), - Item("Settings", { icon: "fa-sliders" }, require("./admin/settings")) + Menu("Settings", { icon: "fa-sliders" }, [ + Item("Settings", { icon: "fa-sliders", url: "" }, require("./admin/settings")), + Item("Rules", { icon: "fa-dot-circle-o", wildcard: true }, require("./admin/settings/rules")) + ]) ]) ]); -- cgit v1.2.3