Disable profile controls if the HS doesn't allow them to be set (#12652)

* Disable profile controls if the HS doesn't allow them to be set

Also updates to the js-sdk interface changes in https://github.com/matrix-org/matrix-js-sdk/pull/4246

* Remove unnecessary await

* Pass disabled prop to accessiblebutton in avatarsetting

* Use getCapabilities

in case there are no cached capabilities

* Fix test

* Go back to just using getCapabilities

Rather than change the other places
This commit is contained in:
David Baker 2024-07-02 11:04:07 +01:00 committed by GitHub
parent 922676a7cc
commit 510fb1ba2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 42 additions and 7 deletions

View file

@ -170,6 +170,7 @@ const AvatarSetting: React.FC<IProps> = ({
aria-labelledby={disabled ? undefined : a11yId}
// Inhibit tab stop as we have explicit upload/remove buttons
tabIndex={-1}
disabled={disabled}
>
<BaseAvatar idName={placeholderId} name={placeholderName} size="90px" />
</AccessibleButton>
@ -184,6 +185,7 @@ const AvatarSetting: React.FC<IProps> = ({
onClick={uploadAvatar}
// Inhibit tab stop as we have explicit upload/remove buttons
tabIndex={-1}
disabled={disabled}
/>
);
}