diff --git a/res/css/structures/_SpaceRoomView.scss b/res/css/structures/_SpaceRoomView.scss index bfb796af3c..d3b437d6d5 100644 --- a/res/css/structures/_SpaceRoomView.scss +++ b/res/css/structures/_SpaceRoomView.scss @@ -81,6 +81,7 @@ $SpaceRoomViewInnerWidth: 428px; color: $secondary-fg-color; margin-top: 12px; margin-bottom: 24px; + max-width: $SpaceRoomViewInnerWidth; } .mx_SpaceRoomView_buttons { @@ -374,6 +375,23 @@ $SpaceRoomViewInnerWidth: 428px; } .mx_SpaceRoomView_inviteTeammates { + // XXX remove this when spaces leaves Beta + .mx_SpaceRoomView_inviteTeammates_betaDisclaimer { + padding: 58px 16px 16px; + position: relative; + border-radius: 8px; + background-color: $header-panel-bg-color; + max-width: $SpaceRoomViewInnerWidth; + margin: 20px 0 30px; + box-sizing: border-box; + + .mx_BetaCard_betaPill { + position: absolute; + left: 16px; + top: 16px; + } + } + .mx_SpaceRoomView_inviteTeammates_buttons { color: $secondary-fg-color; margin-top: 28px; diff --git a/res/css/views/beta/_BetaCard.scss b/res/css/views/beta/_BetaCard.scss index 8369e5ee19..34b84515ce 100644 --- a/res/css/views/beta/_BetaCard.scss +++ b/res/css/views/beta/_BetaCard.scss @@ -29,6 +29,10 @@ limitations under the License. line-height: $font-22px; color: $primary-fg-color; margin: 4px 0 14px; + + .mx_BetaCard_betaPill { + margin-left: 12px; + } } .mx_BetaCard_caption { @@ -62,7 +66,6 @@ limitations under the License. background-color: $accent-color-alt; padding: 4px 10px; border-radius: 8px; - margin-left: 12px; text-transform: uppercase; font-size: 12px; line-height: 15px; diff --git a/res/img/betas/spaces.png b/res/img/betas/spaces.png index b487e477af..87394e0a5b 100644 Binary files a/res/img/betas/spaces.png and b/res/img/betas/spaces.png differ diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 3d73a1b953..f179c537ba 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -438,11 +438,13 @@ const SpaceSetupPublicShare = ({ space, onFinished }) => { ; }; -const SpaceSetupPrivateScope = ({ space, onFinished }) => { +const SpaceSetupPrivateScope = ({ space, justCreatedOpts, onFinished }) => { return

{ _t("Who are you working with?") }

- { _t("Make sure the right people have access to %(name)s", { name: space.name }) } + { _t("Make sure the right people have access to %(name)s", { + name: justCreatedOpts?.createOpts?.name || space.name, + }) }
{ { _t("Make sure the right people have access. You can invite more later.") }
+
+ + { _t("This is an experimental feature. For now, " + + "new users receiving an invite will have to open the invite on to actually join.", {}, { + b: sub => { sub }, + link: () => + app.element.io + , + }) } +
+ { error &&
{ error }
} { fields } @@ -703,6 +716,7 @@ export default class SpaceRoomView extends React.PureComponent { case Phase.PrivateScope: return { this.setState({ phase: invite ? Phase.PrivateInvite : Phase.PrivateCreateRooms }); }} diff --git a/src/components/views/beta/BetaCard.tsx b/src/components/views/beta/BetaCard.tsx index a7f1ca14df..33b1fef9e6 100644 --- a/src/components/views/beta/BetaCard.tsx +++ b/src/components/views/beta/BetaCard.tsx @@ -56,7 +56,7 @@ const BetaCard = ({ title: titleOverride, featureId }: IProps) => { { value ? _t("Leave the beta") : _t("Join the beta") } { disclaimer &&
- { typeof disclaimer === "string" ? _t(disclaimer) : disclaimer() } + { disclaimer(value) }
} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ab2614af95..6c10e9ecd4 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -786,7 +786,10 @@ "Change notification settings": "Change notification settings", "Spaces": "Spaces", "Spaces are a new way to group people and rooms for fun, work, yourself or anything in between.": "Spaces are a new way to group people and rooms for fun, work, yourself or anything in between.", - "%(brand)s will reload with Spaces enabled, and communities and custom tags disabled. You can leave the beta at anytime. Certain features will require a compatible homeserver. Beta only available for Web, Desktop, and Android.": "%(brand)s will reload with Spaces enabled, and communities and custom tags disabled. You can leave the beta at anytime. Certain features will require a compatible homeserver. Beta only available for Web, Desktop, and Android.", + "%(brand)s will reload with Spaces disabled. Communities and custom tags will be visible again.": "%(brand)s will reload with Spaces disabled. Communities and custom tags will be visible again.", + "Beta available for web, desktop and Android. Thank you for trying the beta.": "Beta available for web, desktop and Android. Thank you for trying the beta.", + "%(brand)s will reload with Spaces enabled, communities and custom tags hidden.": "%(brand)s will reload with Spaces enabled, communities and custom tags hidden.", + "Beta available for web, desktop and Android. Some features may be unavailable on your homeserver.": "Beta available for web, desktop and Android. Some features may be unavailable on your homeserver.", "Show options to enable 'Do not disturb' mode": "Show options to enable 'Do not disturb' mode", "Send and receive voice messages (in development)": "Send and receive voice messages (in development)", "Render LaTeX maths in messages": "Render LaTeX maths in messages", @@ -2683,6 +2686,7 @@ "Inviting...": "Inviting...", "Invite your teammates": "Invite your teammates", "Make sure the right people have access. You can invite more later.": "Make sure the right people have access. You can invite more later.", + "This is an experimental feature. For now, new users receiving an invite will have to open the invite on to actually join.": "This is an experimental feature. For now, new users receiving an invite will have to open the invite on to actually join.", "Invite by username": "Invite by username", "What are some things you want to discuss in %(spaceName)s?": "What are some things you want to discuss in %(spaceName)s?", "Let's create a room for each of them.": "Let's create a room for each of them.", diff --git a/src/settings/Settings.ts b/src/settings/Settings.tsx similarity index 96% rename from src/settings/Settings.ts rename to src/settings/Settings.tsx index 99f0ebecbb..907fc33a73 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import { MatrixClient } from 'matrix-js-sdk/src/client'; -import type { ReactNode } from "react"; +import React, { ReactNode } from "react"; import { _t, _td } from '../languageHandler'; import { @@ -123,7 +123,7 @@ export interface ISetting { betaInfo?: { title: string; // _td caption: string; // _td - disclaimer?: (() => ReactNode) | string; // _td + disclaimer?: (enabled: boolean) => ReactNode; image: string; // require(...) }; } @@ -138,11 +138,25 @@ export const SETTINGS: {[setting: string]: ISetting} = { title: _td("Spaces"), caption: _td("Spaces are a new way to group people and rooms for fun, " + "work, yourself or anything in between."), - disclaimer: () => _t("%(brand)s will reload with Spaces enabled, " + - "and communities and custom tags disabled. " + - "You can leave the beta at anytime. " + - "Certain features will require a compatible homeserver. " + - "Beta only available for Web, Desktop, and Android.", { brand: SdkConfig.get().brand }), + disclaimer: (enabled) => { + if (enabled) { + return <> +

{ _t("%(brand)s will reload with Spaces disabled. " + + "Communities and custom tags will be visible again.", { + brand: SdkConfig.get().brand, + }) }

+

{ _t("Beta available for web, desktop and Android. Thank you for trying the beta.") }

+ ; + } + + return <> +

{ _t("%(brand)s will reload with Spaces enabled, communities and custom tags hidden.", { + brand: SdkConfig.get().brand, + }) }

+

{ _t("Beta available for web, desktop and Android. " + + "Some features may be unavailable on your homeserver.") }

+ ; + }, image: require("../../res/img/betas/spaces.png"), }, },