Client: Added public form room

This commit is contained in:
Akmal Isomadinov 2024-05-27 17:54:48 +05:00
parent 5c416644db
commit 846f0c87f5
10 changed files with 17 additions and 8 deletions

View File

@ -312,6 +312,7 @@ export default function withFileActions(WrappedFileItem) {
const showPlanetIcon =
(item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom) &&
item.shared;

View File

@ -203,6 +203,7 @@ const Badges = ({
const isPublicRoomType =
item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
const haveLinksRight =

View File

@ -120,6 +120,7 @@ const QuickButtons = (props) => {
const isPublicRoomType =
item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
const haveLinksRight =

View File

@ -68,6 +68,7 @@ const RoomsItemHeader = ({
const canInviteUserInRoomAbility = security?.EditAccess;
const showPlanetIcon =
(selection.roomType === RoomsType.PublicRoom ||
selection.roomType === RoomsType.FormRoom ||
selection.roomType === RoomsType.CustomRoom) &&
hasLinks;

View File

@ -322,7 +322,9 @@ export default inject(
selectedFolderStore.roomType ?? infoPanelSelection?.roomType;
const isPublicRoomType =
roomType === RoomsType.PublicRoom || roomType === RoomsType.CustomRoom;
roomType === RoomsType.PublicRoom ||
roomType === RoomsType.CustomRoom ||
roomType === RoomsType.FormRoom;
const isPublicRoom = roomType === RoomsType.PublicRoom;

View File

@ -543,7 +543,7 @@ const SectionHeaderContent = (props) => {
disabled:
isRecycleBinFolder ||
isPersonalRoom ||
((isPublicRoomType || isCustomRoomType) &&
((isPublicRoomType || isCustomRoomType || isFormRoomType) &&
haveLinksRight &&
!isArchive),
icon: InvitationLinkReactSvgUrl,
@ -607,7 +607,7 @@ const SectionHeaderContent = (props) => {
}
},
disabled:
(!isPublicRoomType && !isCustomRoomType) ||
(!isPublicRoomType && !isCustomRoomType && !isFormRoomType) ||
!haveLinksRight ||
isArchive,
},
@ -1164,9 +1164,7 @@ export default inject(
const isRoom = !!roomType;
const isPublicRoomType = roomType === RoomsType.PublicRoom;
const isCustomRoomType = roomType === RoomsType.CustomRoom;
const isFormRoomType =
roomType === RoomsType.FormRoom ||
(parentRoomType === FolderType.FormRoom && isFolder);
const isFormRoomType = roomType === RoomsType.FormRoom;
const {
onClickEditRoom,
@ -1229,7 +1227,7 @@ export default inject(
: !isPublicRoom &&
!isArchive &&
canCopyPublicLink &&
(isPublicRoomType || isCustomRoomType) &&
(isPublicRoomType || isCustomRoomType || isFormRoomType) &&
primaryLink;
return {

View File

@ -198,7 +198,8 @@ const Sdk = ({
if (
data[0].roomType === RoomsType.PublicRoom ||
(data[0].roomType === RoomsType.CustomRoom && data[0].shared)
(data[0].roomType === RoomsType.CustomRoom && data[0].shared) ||
(data[0].roomType === RoomsType.FormRoom && data[0].shared)
) {
const links = await fetchExternalLinks(data[0].id);

View File

@ -1218,6 +1218,7 @@ class ContextOptionsStore {
let withOpen = item.id !== this.selectedFolderStore.id;
const isPublicRoomType =
item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
if (item.isRoom && withOpen) {

View File

@ -1451,6 +1451,7 @@ class FilesStore {
if (
(data.current.roomType === RoomsType.PublicRoom ||
data.current.roomType === RoomsType.FormRoom ||
data.current.roomType === RoomsType.CustomRoom) &&
!this.publicRoomStore.isPublicRoom
) {
@ -2295,6 +2296,7 @@ class FilesStore {
const isPublicRoomType =
item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
const isCustomRoomType = item.roomType === RoomsType.CustomRoom;

View File

@ -94,6 +94,7 @@ const Item = React.memo(({ index, style, data }: ItemProps) => {
const showPlanetIcon =
(item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom) &&
item.shared;