From 913a87d23c5aec6c6b16c6fdcbfe00da6bf3876d Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Wed, 28 Oct 2026 19:44:06 +0100 Subject: [PATCH] Add a settings icon beside the rail's user row Co-Authored-By: Claude Opus 5.5 --- .../bots/(partials)/rail-settings-button.tsx | 22 ++++ src/layouts/bots/(partials)/rail-user-row.tsx | 101 +++++++++--------- 2 files changed, 75 insertions(+), 48 deletions(-) create mode 100644 src/layouts/bots/(partials)/rail-settings-button.tsx diff --git a/src/layouts/bots/(partials)/rail-settings-button.tsx b/src/layouts/bots/(partials)/rail-settings-button.tsx new file mode 100644 index 0000000..6154bf7 --- /dev/null +++ b/src/layouts/bots/(partials)/rail-settings-button.tsx @@ -0,0 +1,22 @@ +import Button from "@moduletrace/twui/layout/Button"; +import { Settings } from "lucide-react"; +import { SettingsDefaultPath } from "@/src/dict/settings-pages-dict"; + +/** + * The settings icon beside the user row: a shortcut to the same place as + * the popover's Settings item. Hidden when the rail collapses. + */ +export default function RailSettingsButton() { + return ( + + ); +} diff --git a/src/layouts/bots/(partials)/rail-user-row.tsx b/src/layouts/bots/(partials)/rail-user-row.tsx index e04e44c..59e15c0 100644 --- a/src/layouts/bots/(partials)/rail-user-row.tsx +++ b/src/layouts/bots/(partials)/rail-user-row.tsx @@ -8,10 +8,12 @@ import UserAvatar from "@/src/components/general/user-avatar"; import { AppContext } from "@/src/pages/__root"; import RailUserMenu from "./rail-user-menu"; import Tag from "@moduletrace/twui/elements/Tag"; +import RailSettingsButton from "./rail-settings-button"; /** * The signed-in user, opening the popover above. Its top rule sits at the - * same height as the composer rule, so the two read as one line. + * same height as the composer rule, so the two read as one line. A + * settings icon sits beside it. */ export default function RailUserRow() { const { user, user_types } = useContext(AppContext); @@ -24,53 +26,56 @@ export default function RailUserRow() { return ( - - - - - {name} - - - {user_types?.map((ut, indx) => { - return ( - - {ut.user_type} - - ); - })} - - - - - } - > - - + + + + + + {name} + + + {user_types?.map((ut, indx) => { + return ( + + {ut.user_type} + + ); + })} + + + + + } + > + + + + ); }