Add beta pill to space create menu
This commit is contained in:
parent
c0f11fd316
commit
5a921bf38a
3 changed files with 20 additions and 2 deletions
|
@ -29,6 +29,7 @@ $spacePanelWidth: 71px;
|
||||||
width: 480px;
|
width: 480px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: $primary-bg-color;
|
background-color: $primary-bg-color;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
> h2 {
|
> h2 {
|
||||||
|
@ -44,6 +45,13 @@ $spacePanelWidth: 71px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX remove this when spaces leaves Beta
|
||||||
|
.mx_BetaCard_betaPill {
|
||||||
|
position: absolute;
|
||||||
|
top: 24px;
|
||||||
|
right: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_SpaceCreateMenuType {
|
.mx_SpaceCreateMenuType {
|
||||||
@mixin SpacePillButton;
|
@mixin SpacePillButton;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ const SpacePreview = ({ space, onJoinButtonClicked, onRejectButtonClicked }) =>
|
||||||
// XXX remove this when spaces leaves Beta
|
// XXX remove this when spaces leaves Beta
|
||||||
joinButtons = (
|
joinButtons = (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
kind="danger"
|
kind="danger_outline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "leave_room",
|
action: "leave_room",
|
||||||
|
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import React, {useContext, useState} from "react";
|
import React, {useContext, useState} from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import {EventType, RoomType, RoomCreateTypeField} from "matrix-js-sdk/src/@types/event";
|
import {EventType, RoomType, RoomCreateTypeField} from "matrix-js-sdk/src/@types/event";
|
||||||
|
import FocusLock from "react-focus-lock";
|
||||||
|
|
||||||
import {_t} from "../../../languageHandler";
|
import {_t} from "../../../languageHandler";
|
||||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||||
|
@ -25,7 +26,10 @@ import createRoom, {IStateEvent, Preset} from "../../../createRoom";
|
||||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
import SpaceBasicSettings from "./SpaceBasicSettings";
|
import SpaceBasicSettings from "./SpaceBasicSettings";
|
||||||
import AccessibleButton from "../elements/AccessibleButton";
|
import AccessibleButton from "../elements/AccessibleButton";
|
||||||
import FocusLock from "react-focus-lock";
|
import {BetaPill} from "../beta/BetaCard";
|
||||||
|
import defaultDispatcher from "../../../dispatcher/dispatcher";
|
||||||
|
import {Action} from "../../../dispatcher/actions";
|
||||||
|
import {USER_LABS_TAB} from "../dialogs/UserSettingsDialog";
|
||||||
|
|
||||||
const SpaceCreateMenuType = ({ title, description, className, onClick }) => {
|
const SpaceCreateMenuType = ({ title, description, className, onClick }) => {
|
||||||
return (
|
return (
|
||||||
|
@ -164,6 +168,12 @@ const SpaceCreateMenu = ({ onFinished }) => {
|
||||||
managed={false}
|
managed={false}
|
||||||
>
|
>
|
||||||
<FocusLock returnFocus={true}>
|
<FocusLock returnFocus={true}>
|
||||||
|
<BetaPill onClick={() => {
|
||||||
|
defaultDispatcher.dispatch({
|
||||||
|
action: Action.ViewUserSettings,
|
||||||
|
initialTabId: USER_LABS_TAB,
|
||||||
|
});
|
||||||
|
}} />
|
||||||
{ body }
|
{ body }
|
||||||
</FocusLock>
|
</FocusLock>
|
||||||
</ContextMenu>;
|
</ContextMenu>;
|
||||||
|
|
Loading…
Reference in a new issue