Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Perf exm feed #171

Open
wants to merge 97 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
717f4c1
perf(exm): add sidebar and refactor home page
Apr 11, 2023
509278c
pref(exm): move files into folder
Apr 12, 2023
17435de
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Apr 12, 2023
7f50f6d
move exm to outside
Apr 17, 2023
3ee9ee2
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Apr 18, 2023
31dc72d
remove console.log
Apr 18, 2023
5289e45
add some change
Apr 19, 2023
20d025f
add signin page
Apr 19, 2023
492f007
add sidebar
Apr 19, 2023
961797d
add search
Apr 19, 2023
6d8358e
fix topbar
Apr 19, 2023
1ba0ddf
update feed form
Apr 20, 2023
8086ece
fix form
Apr 20, 2023
2d6b70a
add right sidebar
Apr 20, 2023
e006d73
add contact list
Apr 23, 2023
082ce5f
add exm learn
Apr 24, 2023
7c99278
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Apr 24, 2023
4ed32ac
add chats
ariunzayarin May 23, 2023
a4e841a
fix conflict
Jul 24, 2023
2af4ca8
fix apollo path
Jul 24, 2023
35f9092
fix yarn build errors
Jul 24, 2023
c1129f6
add exm workflow
Jul 24, 2023
a20f73d
update exm workflow
Jul 24, 2023
826a4d3
fix import
Jul 24, 2023
4c24fc7
fix .yaml
Jul 24, 2023
391bc06
fix .yaml
Jul 24, 2023
f96611f
remove all react-router-dom
Jul 24, 2023
9cc648b
add lodash
Jul 24, 2023
a855981
add lodash
Jul 24, 2023
328388d
update yarn.lock
Jul 24, 2023
508ca22
update yarn.lock
Jul 24, 2023
b62b4b5
update package.json
Jul 24, 2023
7dbfd21
update package.json
Jul 24, 2023
938f48e
update package.json
Jul 25, 2023
43ddb8c
Merge branch 'staging' of github.com:erxes/erxes-community into perf-…
Jul 25, 2023
72b4761
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Jul 25, 2023
39c900c
update build
Jul 25, 2023
9dea6dc
update
Jul 25, 2023
ce0e1a5
update package.json
Jul 25, 2023
359aa71
update package.json
Jul 25, 2023
2ad83cc
update
Jul 25, 2023
3f74bac
update docker file
Jul 25, 2023
d9507d1
feed list youtube link preview work
Gerelsukh Aug 8, 2023
e83e19c
fix chat ui
ariunzayarin Aug 8, 2023
6deac83
welcome section add on UI
Gerelsukh Aug 8, 2023
460daa2
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Gerelsukh Aug 8, 2023
a714e19
fix conflict
Gerelsukh Aug 8, 2023
44f0685
youtube link condition add
Gerelsukh Aug 8, 2023
c127e4e
check condition on allUsersQuery
Gerelsukh Aug 8, 2023
e026787
department, branch, unit add on EXM
Gerelsukh Aug 8, 2023
ab30ae7
Merge branch 'perf-exm-feed' of github.com:erxes/erxes-community into…
Gerelsukh Aug 8, 2023
2d59a8e
department branch unit add on event form
Gerelsukh Aug 8, 2023
d097dc8
add voice recorder and fix group chat
ariunzayarin Aug 10, 2023
3b449a6
hide not working parts
ariunzayarin Aug 10, 2023
6607a8c
Merge branch 'perf-exm-feed' of github.com:erxes/erxes-community into…
Gerelsukh Aug 10, 2023
77825eb
minor chat fixes
ariunzayarin Aug 10, 2023
565409c
readFile and uploadFile URL set
Gerelsukh Aug 10, 2023
5851738
Merge branch 'perf-exm-feed' of github.com:erxes/erxes-community into…
Gerelsukh Aug 10, 2023
f957eb5
delete-file URL set
Gerelsukh Aug 10, 2023
8abcee0
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Gerelsukh Aug 11, 2023
aa76254
fix event ui and hide some parts
ariunzayarin Aug 11, 2023
3fb1791
fix
ariunzayarin Aug 11, 2023
604235b
Merge branch 'perf-exm-feed' of github.com:erxes/erxes-community into…
Gerelsukh Aug 13, 2023
5da6096
loadMore button work
Gerelsukh Aug 14, 2023
8b915dd
add chat search
ariunzayarin Aug 14, 2023
da9ae9d
Merge branch 'perf-exm-feed' of github.com:erxes/erxes-community into…
ariunzayarin Aug 14, 2023
87ceb9b
fix modal close
ariunzayarin Aug 14, 2023
65ab369
little fix
ariunzayarin Aug 14, 2023
bea03be
add positions and fix some ui
ariunzayarin Aug 14, 2023
119a48e
little fix
ariunzayarin Aug 14, 2023
67c6b3d
add groupchat search
ariunzayarin Aug 15, 2023
3408846
remove deactive members and add tab to chat list
ariunzayarin Aug 15, 2023
e6ecb8b
fix positions
ariunzayarin Aug 15, 2023
e949a19
add pin to chat
ariunzayarin Aug 15, 2023
17d1c4e
fix chat pin
ariunzayarin Aug 15, 2023
da7e393
fix today's event
ariunzayarin Aug 15, 2023
b62740d
fix ui of post list images
ariunzayarin Aug 15, 2023
6ea727f
fix long images
ariunzayarin Aug 15, 2023
184cd68
add event info
ariunzayarin Aug 15, 2023
a4a4487
add like function
ariunzayarin Aug 16, 2023
dbc2ace
add comment
ariunzayarin Aug 16, 2023
bdb9355
fix event privacy
ariunzayarin Aug 17, 2023
93d6156
little fix
ariunzayarin Aug 17, 2023
5461124
little fix
ariunzayarin Aug 17, 2023
5fa1de0
fix like
ariunzayarin Aug 17, 2023
ddfc633
little fix
ariunzayarin Aug 17, 2023
2c84dc0
little fix
ariunzayarin Aug 17, 2023
5c3530a
change overlaytrigger to dropdown
ariunzayarin Aug 18, 2023
f37c1b2
little fix
ariunzayarin Aug 18, 2023
ada52b6
add chatForward
ariunzayarin Aug 30, 2023
5c76587
update(riskassessment):add filter on plans
Wlkr123 Sep 4, 2023
6838590
fix(riskAssessment):can't edit plan
Wlkr123 Sep 4, 2023
9075aff
Merge branch 'dev' of github.com:erxes/erxes-community into perf-exm-…
Gerelsukh Sep 5, 2023
050e1a2
infinite scroll add on exmfeed
Gerelsukh Sep 7, 2023
4fa1cbf
exmfeed update
Gerelsukh Sep 7, 2023
44ea6fd
welcome list update
Gerelsukh Sep 7, 2023
c2313f5
limit remove from exmfeed list
Gerelsukh Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix long images
  • Loading branch information
ariunzayarin committed Aug 15, 2023
commit 6ea727f15a9963e598dd4636b4edabc9a5329ce2
57 changes: 53 additions & 4 deletions exm/modules/exmFeed/components/feed/List.tsx
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ import {
NavItem,
NewsFeedLayout,
TextFeed,
AttachmentContainer,
MoreAttachment,
} from "../../styles";

import Dropdown from "react-bootstrap/Dropdown";
@@ -98,6 +100,54 @@ function List({
}
}

const renderImages = () => {
if (item.images.length === 1) {
return (
<AttachmentWithPreview
attachment={item.images[0]}
attachments={item.images}
/>
);
}

if (item.images.length === 2) {
return (
<>
<AttachmentWithPreview
attachment={item.images[0]}
attachments={item.images}
/>
<AttachmentWithPreview
attachment={item.images[1]}
attachments={item.images}
/>
</>
);
}

return (
<>
<AttachmentWithPreview
attachment={item.images[0]}
attachments={item.images}
/>
<div>
<AttachmentWithPreview
attachment={item.images[1]}
attachments={item.images}
/>
<AttachmentWithPreview
attachment={item.images[2]}
attachments={item.images}
/>
{item.images.length > 3 && (
<MoreAttachment>+ {item.images.length - 3} more</MoreAttachment>
)}
</div>
</>
);
};

return (
<div key={item._id}>
<HeaderFeed>
@@ -190,10 +240,9 @@ function List({
);
})}
{item.images.length > 0 && (
<AttachmentWithPreview
attachment={item.images[0]}
attachments={item.images}
/>
<AttachmentContainer attachmentLength={item.images.length}>
{renderImages()}
</AttachmentContainer>
)}
{/* <LikeCommentShare>
<b>{item.likeCount} Like</b>
38 changes: 31 additions & 7 deletions exm/modules/exmFeed/styles.ts
Original file line number Diff line number Diff line change
@@ -85,13 +85,6 @@ export const NewsFeedLayout = styled.div`
border-radius: 10px;
background: ${colors.colorWhite};
border: 1px solid ${colors.borderPrimary};

> img {
width: 100%;
border-top: 1px solid #ddd;
max-height: 400px;
object-fit: cover;
}

&:last-child {
margin-bottom: 0;
@@ -1226,4 +1219,35 @@ export const ChatListSpacing = styled.div`
export const FlexAlignCenter = styled.div`
display: flex;
align-items: center;
`;

export const AttachmentContainer = styledTS<{attachmentLength: number}>(styled.div)`
> div {
display: flex;
margin-top: 5px;
border-top: 1px solid #ddd;

> img {
object-fit: cover;
max-height: 200px;
border-right: 1px solid #ddd;
${props => props.attachmentLength === 3 ? `width: 50%;` : `width: 33%;`}
}
}

> img {
object-fit: cover;
${props => (props.attachmentLength === 1 || props.attachmentLength > 2) ? `
width: 100%;
border-top: 1px solid #ddd;
max-height: 400px;
` : props.attachmentLength === 2 ? `
width: 50%;` : ``}
}
`;

export const MoreAttachment = styled.div`
height: fit-content;
width: fit-content;
margin: auto;
`;