diff --git a/info/dev/preparing-changelog.md b/info/dev/preparing-changelog.md
index 5d13016cb..a770a9212 100644
--- a/info/dev/preparing-changelog.md
+++ b/info/dev/preparing-changelog.md
@@ -5,3 +5,4 @@
- Force Dev Mode option added into the `.env` file.
- New room viewer script to mobile.
- Mobile css content place fixed.
+- Share button in the room settings added.
diff --git a/src/app/molecules/dialog/Dialog.jsx b/src/app/molecules/dialog/Dialog.jsx
index 95c67bed0..4571aca77 100644
--- a/src/app/molecules/dialog/Dialog.jsx
+++ b/src/app/molecules/dialog/Dialog.jsx
@@ -13,7 +13,7 @@ function Dialog({
onAfterOpen = null,
onAfterClose = null,
onRequestClose = null,
- children,
+ children = null,
bodyClass = '',
}) {
useEffect(() => {
@@ -57,7 +57,7 @@ Dialog.propTypes = {
onAfterOpen: PropTypes.func,
onAfterClose: PropTypes.func,
onRequestClose: PropTypes.func,
- children: PropTypes.node.isRequired,
+ children: PropTypes.node,
};
export default Dialog;
diff --git a/src/app/molecules/message/Embed.jsx b/src/app/molecules/message/Embed.jsx
index b21414b4e..5dafca75f 100644
--- a/src/app/molecules/message/Embed.jsx
+++ b/src/app/molecules/message/Embed.jsx
@@ -23,6 +23,7 @@ function Embed({ embed = {}, roomId = null, threadId = null }) {
// URL Ref
const tinyUrl = useRef(null);
const itemEmbed = useRef(null);
+ const [useVideo, setUseVideo] = useState(false);
const [embedHeight, setEmbedHeight] = useState(null);
const imgType =
@@ -196,26 +197,33 @@ function Embed({ embed = {}, roomId = null, threadId = null }) {
) : null}
{isVideo && typeof imgUrl === 'string' && imgUrl.length > 0 ? (
-
{
- $(e.target).replaceWith(
- jReact(
-
-
-
,
- ),
- );
- }}
- >
+ !useVideo ? (
-
+ className="mt-2 ratio ratio-16x9 embed-video"
+ style={{
+ backgroundImage: `url('${imgUrl !== defaultVideoAvatar ? mx.mxcUrlToHttp(imgUrl, 2000, 2000) : defaultVideoAvatar}')`,
+ }}
+ onClick={() => {
+ setUseVideo(true);
+ }}
+ >
+
+
+ ) : (
+
+
+
+ )
) : null}
diff --git a/src/app/molecules/room-profile/RoomProfile.jsx b/src/app/molecules/room-profile/RoomProfile.jsx
index 16ef8452f..3c986e628 100644
--- a/src/app/molecules/room-profile/RoomProfile.jsx
+++ b/src/app/molecules/room-profile/RoomProfile.jsx
@@ -1,5 +1,7 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
+import tinyClipboard from '@src/util/libs/Clipboard';
+import { getShareUrl } from '@src/util/tools';
import { twemojifyReact } from '../../../util/twemojify';
@@ -293,50 +295,71 @@ function RoomProfile({ roomId, isSpace }) {
);
// Render Panel
- const renderNameAndTopic = () => (
-
-
-
{twemojifyReact(roomName)}
-
- {nameCinny.category.length > 0 && (
-
-
-
-
- {twemojifyReact(nameCinny.category)}
-
- )}
+ const renderNameAndTopic = () => {
+ const isAlias = typeof room.getCanonicalAlias() === 'string';
+ const roomId = room.getCanonicalAlias() || room.roomId;
+ return (
+
+
+
{twemojifyReact(roomName)}
+
+ {nameCinny.category.length > 0 && (
+
+
+
+
+ {twemojifyReact(nameCinny.category)}
+
+ )}
- {nameCinny.index.length > 0 && (
-
-
-
-
- {twemojifyReact(nameCinny.index)}
-
- )}
+ {nameCinny.index.length > 0 && (
+
+
+
+
+ {twemojifyReact(nameCinny.index)}
+
+ )}
-
+
- {(canChangeName || canChangeTopic) && (
-
setIsEditing(true)}
- />
+ {(canChangeName || canChangeTopic) && (
+ setIsEditing(true)}
+ />
+ )}
+
+
+
+ {roomTopic && (
+
+ {twemojifyReact(roomTopic, undefined, true)}
+
)}
-
-
{room.getCanonicalAlias() || room.roomId}
- {roomTopic && (
-
{twemojifyReact(roomTopic, undefined, true)}
- )}
-
- );
+ );
+ };
// Complete
return (