From 736cd37caf93d89772f5b718e92d72013d0d9fc4 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:01:36 +0200 Subject: [frontend] Add `discoverable` flag to settings panel (#2235) --- web/source/settings/style.css | 23 ++++++++---- web/source/settings/user/profile.js | 70 +++++++++++++++++++++++++++--------- web/source/settings/user/settings.js | 4 +-- 3 files changed, 73 insertions(+), 24 deletions(-) (limited to 'web/source/settings') diff --git a/web/source/settings/style.css b/web/source/settings/style.css index 84878728d..505e3bbfc 100644 --- a/web/source/settings/style.css +++ b/web/source/settings/style.css @@ -343,9 +343,25 @@ section.with-sidebar > div, section.with-sidebar > form { margin-bottom: 0.5rem; } - .moreinfolink { + .docslink { font-size: 0.9em; } + + .form-section-docs { + margin-top: 1rem; + margin-bottom: 0.5rem; + + border-left: 0.2rem solid $border-accent; + padding-left: 0.4rem; + + display: flex; + flex-direction: column; + gap: 0.2rem; + + h3 { + margin: 0; + } + } .labelinput .border { border-radius: 0.2rem; @@ -429,11 +445,6 @@ section.with-sidebar > div, section.with-sidebar > form { justify-content: center; gap: 1rem; - h3 { - margin: 0; - margin-bottom: 0.3rem; - } - span { font-style: italic; } diff --git a/web/source/settings/user/profile.js b/web/source/settings/user/profile.js index 9bae41f63..dd600cafc 100644 --- a/web/source/settings/user/profile.js +++ b/web/source/settings/user/profile.js @@ -82,6 +82,7 @@ function UserProfileForm({ data: profile }) { customCSS: useTextInput("custom_css", { source: profile }), bot: useBoolInput("bot", { source: profile }), locked: useBoolInput("locked", { source: profile }), + discoverable: useBoolInput("discoverable", { source: profile}), enableRSS: useBoolInput("enable_rss", { source: profile }), fields: useFieldArrayInput("fields_attributes", { defaultValue: profile?.source?.fields, @@ -109,24 +110,36 @@ function UserProfileForm({ data: profile }) { />