diff --git a/res/css/views/settings/_JoinRuleSettings.pcss b/res/css/views/settings/_JoinRuleSettings.pcss index 485434f0da5..fcb21fca968 100644 --- a/res/css/views/settings/_JoinRuleSettings.pcss +++ b/res/css/views/settings/_JoinRuleSettings.pcss @@ -53,6 +53,14 @@ Please see LICENSE files in the repository root for full details. display: block; } + &.mx_StyledRadioButton_disabled { + opacity: 0.5; + } + + &.mx_StyledRadioButton_disabled + span { + opacity: 0.5; + } + & + span { display: inline-block; margin-left: 34px; @@ -71,3 +79,7 @@ Please see LICENSE files in the repository root for full details. font: var(--cpd-font-body-md-regular); margin-top: var(--cpd-space-2x); } + +.mx_JoinRuleSettings_recommended { + color: $accent-1000; +} diff --git a/src/components/views/rooms/RoomHeader/CallGuestLinkButton.tsx b/src/components/views/rooms/RoomHeader/CallGuestLinkButton.tsx index 7675f660707..16ef5c22344 100644 --- a/src/components/views/rooms/RoomHeader/CallGuestLinkButton.tsx +++ b/src/components/views/rooms/RoomHeader/CallGuestLinkButton.tsx @@ -14,10 +14,11 @@ import { EventType, JoinRule, type Room } from "matrix-js-sdk/src/matrix"; import Modal from "../../../../Modal"; import { ShareDialog } from "../../dialogs/ShareDialog"; import { _t } from "../../../../languageHandler"; -import SettingsStore from "../../../../settings/SettingsStore"; import { calculateRoomVia } from "../../../../utils/permalinks/Permalinks"; import BaseDialog from "../../dialogs/BaseDialog"; import { useGuestAccessInformation } from "../../../../hooks/room/useGuestAccessInformation"; +import JoinRuleSettings from "../../settings/JoinRuleSettings"; +import SettingsStore from "../../../../settings/SettingsStore"; /** * Display a button to open a dialog to share a link to the call using a element call guest spa url (`element_call:guest_spa_url` in the EW config). @@ -114,33 +115,32 @@ export const JoinRuleDialog: React.FC<{ "", ); // Show the dialog for a bit to give the user feedback - setTimeout(() => onFinished(), 500); + setTimeout(() => onFinished(), 1000); }, [isUpdating, onFinished, room.client, room.roomId], ); return ( -

{_t("update_room_access_modal|description")}

-
- {askToJoinEnabled && canInvite && ( - - )} - -
+

{_t("update_room_access_modal|description", {}, { b: (sub) => {sub} })}

+

+ {_t("update_room_access_modal|revert_access_description", {}, { b: (sub) => {sub} })} +

+ { + await changeJoinRule(newRule).catch(() => { + return false; + }); + return true; + }} + closeSettingsFn={() => {}} + onError={(error: unknown) => logger.error("Could not generate change access level:", error)} + />

{_t("update_room_access_modal|dont_change_description")}