mirror of https://github.com/vector-im/riot-web
Use config for host signup branding
parent
d1524b2e9d
commit
3919fcd80e
|
@ -128,7 +128,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_UserMenu_contextMenu {
|
.mx_UserMenu_contextMenu {
|
||||||
width: 247px;
|
width: 258px;
|
||||||
|
|
||||||
// These override the styles already present on the user menu rather than try to
|
// These override the styles already present on the user menu rather than try to
|
||||||
// define a new menu. They are specifically for the stacked menu when a community
|
// define a new menu. They are specifically for the stacked menu when a community
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
} from "../views/context_menus/IconizedContextMenu";
|
} from "../views/context_menus/IconizedContextMenu";
|
||||||
import { _t } from "../../languageHandler";
|
import { _t } from "../../languageHandler";
|
||||||
import { HostSignupStore } from "../../stores/HostSignupStore";
|
import { HostSignupStore } from "../../stores/HostSignupStore";
|
||||||
|
import SdkConfig from "../../SdkConfig";
|
||||||
|
|
||||||
interface IProps {}
|
interface IProps {}
|
||||||
|
|
||||||
|
@ -32,11 +33,21 @@ export default class HostSignupAction extends React.PureComponent<IProps, IState
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): React.ReactNode {
|
public render(): React.ReactNode {
|
||||||
|
const hostSignupConfig = SdkConfig.get().hostSignup;
|
||||||
|
if (!hostSignupConfig?.brand) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IconizedContextMenuOptionList>
|
<IconizedContextMenuOptionList>
|
||||||
<IconizedContextMenuOption
|
<IconizedContextMenuOption
|
||||||
iconClassName="mx_UserMenu_iconHosting"
|
iconClassName="mx_UserMenu_iconHosting"
|
||||||
label={_t("Upgrade to pro")}
|
label={_t(
|
||||||
|
"Upgrade to %(hostSignupBrand)s",
|
||||||
|
{
|
||||||
|
hostSignupBrand: hostSignupConfig.brand,
|
||||||
|
},
|
||||||
|
)}
|
||||||
onClick={this.openDialog}
|
onClick={this.openDialog}
|
||||||
/>
|
/>
|
||||||
</IconizedContextMenuOptionList>
|
</IconizedContextMenuOptionList>
|
||||||
|
|
|
@ -2450,7 +2450,7 @@
|
||||||
"Send a Direct Message": "Send a Direct Message",
|
"Send a Direct Message": "Send a Direct Message",
|
||||||
"Explore Public Rooms": "Explore Public Rooms",
|
"Explore Public Rooms": "Explore Public Rooms",
|
||||||
"Create a Group Chat": "Create a Group Chat",
|
"Create a Group Chat": "Create a Group Chat",
|
||||||
"Upgrade to pro": "Upgrade to pro",
|
"Upgrade to %(hostSignupBrand)s": "Upgrade to %(hostSignupBrand)s",
|
||||||
"Explore rooms": "Explore rooms",
|
"Explore rooms": "Explore rooms",
|
||||||
"Failed to reject invitation": "Failed to reject invitation",
|
"Failed to reject invitation": "Failed to reject invitation",
|
||||||
"Cannot create rooms in this community": "Cannot create rooms in this community",
|
"Cannot create rooms in this community": "Cannot create rooms in this community",
|
||||||
|
|
Loading…
Reference in New Issue