From b6e481d63eec15191f2717957682c13ee8a68308 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:59:39 +0100 Subject: [feature] Allow user to choose "gallery" style layout for web view of profile (#3917) * [feature] Allow user to choose "gallery" style web layout * find a bug and squish it up and all day long you'll have good luck * just a sec * [performance] reindex public timeline + tinker with query a bit * fiddling * should be good now * last bit of finagling, i'm done now i prommy * panic normally --- web/source/settings/views/user/profile.tsx | 47 +++++++++++++----------------- 1 file changed, 20 insertions(+), 27 deletions(-) (limited to 'web/source/settings/views/user') diff --git a/web/source/settings/views/user/profile.tsx b/web/source/settings/views/user/profile.tsx index 80be3c878..9ea948337 100644 --- a/web/source/settings/views/user/profile.tsx +++ b/web/source/settings/views/user/profile.tsx @@ -61,20 +61,6 @@ interface UserProfileFormProps { } function UserProfileForm({ data: profile }: UserProfileFormProps) { - /* - User profile update form keys - - bool bot - - bool locked - - string display_name - - string note - - file avatar - - file header - - bool enable_rss - - bool hide_collections - - string custom_css (if enabled) - - string theme - */ - const { data: instance } = useInstanceV1Query(); const instanceConfig = React.useMemo(() => { return { @@ -120,7 +106,8 @@ function UserProfileForm({ data: profile }: UserProfileFormProps) { discoverable: useBoolInput("discoverable", { source: profile}), enableRSS: useBoolInput("enable_rss", { source: profile }), hideCollections: useBoolInput("hide_collections", { source: profile }), - webVisibility: useTextInput("web_visibility", { source: profile, valueSelector: (p) => p.source?.web_visibility }), + webVisibility: useTextInput("web_visibility", { source: profile, valueSelector: (p: Account) => p.source?.web_visibility }), + webLayout: useTextInput("web_layout", { source: profile, valueSelector: (p: Account) => p.source?.web_layout }), fields: useFieldArrayInput("fields_attributes", { defaultValue: profile?.source?.fields, length: instanceConfig.maxPinnedFields @@ -185,18 +172,24 @@ function UserProfileForm({ data: profile }: UserProfileFormProps) { /> -
-
- Theme -
- After choosing theme and saving, open your profile and refresh to see changes. -
- {themeOptions}} + /> + +