From f3dae06346f0bfe6aaac7551c70f26289da7a94c Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Fri, 28 Mar 2025 09:16:12 -0600 Subject: [PATCH] web/settings: add button to go to predecessor room (#612) Signed-off-by: Sumner Evans --- web/src/ui/settings/SettingsView.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/ui/settings/SettingsView.tsx b/web/src/ui/settings/SettingsView.tsx index 4e2f977..e67dadc 100644 --- a/web/src/ui/settings/SettingsView.tsx +++ b/web/src/ui/settings/SettingsView.tsx @@ -396,6 +396,11 @@ const SettingsView = ({ room }: SettingsViewProps) => { err => window.alert(`Failed to request OpenID token: ${err}`), ) } + const previousRoomID = roomMeta.creation_content?.predecessor?.room_id + const openPredecessorRoom = () => { + window.mainScreenContext.setActiveRoom(previousRoomID!) + closeModal() + } usePreferences(client.store, room) const globalServer = client.store.serverPreferenceCache const globalLocal = client.store.localPreferenceCache @@ -419,6 +424,10 @@ const SettingsView = ({ room }: SettingsViewProps) => {
+ {previousRoomID && + }