Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ export const FileViewerComponent = ({
<div className="sendbird-fileviewer__header__left__avatar">
<Avatar height="32px" width="32px" src={profileUrl} />
</div>
<Label className="sendbird-fileviewer__header__left__filename" type={LabelTypography.H_2} color={LabelColors.ONBACKGROUND_1}>
{name}
</Label>
<Label className="sendbird-fileviewer__header__left__sender-name" type={LabelTypography.BODY_1} color={LabelColors.ONBACKGROUND_2}>
{nickname}
</Label>
<div className="sendbird-fileviewer__header__left__text-container">
<Label className="sendbird-fileviewer__header__left__filename" type={LabelTypography.H_2} color={LabelColors.ONBACKGROUND_1}>
{name}
</Label>
<Label className="sendbird-fileviewer__header__left__sender-name" type={LabelTypography.BODY_1} color={LabelColors.ONBACKGROUND_2}>
{nickname}
</Label>
</div>
</div>
<div className="sendbird-fileviewer__header__right">
{isSupportedFileView(type) && (
Expand Down
53 changes: 29 additions & 24 deletions src/modules/GroupChannel/components/FileViewer/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,42 @@
display: flex;
flex-direction: row;
align-items: center;
height: 64px;
padding: 16px 20px;
padding: 0 20px;
overflow: hidden;

.sendbird-fileviewer__header__left__avatar {
margin-right: 8px;
}

.sendbird-fileviewer__header__left__filename {
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
display: flex;
margin-inline-end: 8px;
@include mobile() {
position: absolute;
left: 64px;
top: 10px;
display: block;
max-width: calc(100vw - 240px);
margin-inline-end: 12px;
}
}

.sendbird-fileviewer__header__left__sender-name {
display: inline-block;
margin-left: 8px;
padding-top: 5px;
.sendbird-fileviewer__header__left__text-container {
display: flex;
flex-direction: row;
align-items: flex-end;
@include mobile() {
position: absolute;
left: 56px;
top: 24px;
flex-direction: column;
align-items: unset;
}
.sendbird-fileviewer__header__left__filename {
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
margin-inline-end: 8px;
padding-top: 3px;
@include mobile() {
display: block;
max-width: calc(100vw - 240px);
padding-top: 0;
margin-inline-end: 0;
}
}
.sendbird-fileviewer__header__left__sender-name {
line-height: 1.1;
}
}
}
Expand Down
52 changes: 35 additions & 17 deletions src/ui/FileViewer/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,43 @@ $file-viewer-img-max-width: calc(100% - #{$file-viewer-slide-buttons-side-length
display: flex;
flex-direction: row;
align-items: center;
height: 64px;
padding: 16px 20px;

padding: 0 20px;
overflow: hidden;
.sendbird-fileviewer__header__left__avatar {
margin-right: 8px;
}

.sendbird-fileviewer__header__left__filename {
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
display: flex;
margin-inline-end: 8px;
@include mobile() {
margin-inline-end: 12px;
}
}

.sendbird-fileviewer__header__left__sender-name {
display: inline-block;
margin-left: 8px;
padding-top: 5px;

.sendbird-fileviewer__header__left__text-container {
display: flex;
flex-direction: row;
align-items: flex-end;
@include mobile() {
flex-direction: column;
align-items: unset;
}
.sendbird-fileviewer__header__left__filename {
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
margin-inline-end: 8px;
padding-top: 3px;
@include mobile() {
display: block;
max-width: calc(100vw - 240px);
padding-top: 0;
margin-inline-end: 0;
}
}
.sendbird-fileviewer__header__left__sender-name {
line-height: 1.1;
}
}
}

Expand Down
34 changes: 18 additions & 16 deletions src/ui/FileViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,31 @@ export const FileViewerComponent = (props: FileViewerComponentProps): ReactEleme
<div className="sendbird-fileviewer__header">
<div className="sendbird-fileviewer__header__left">
<div className="sendbird-fileviewer__header__left__avatar">
<Avatar height="32px" width="32px" src={profileUrl} />
<Avatar height="32px" width="32px" src={profileUrl}/>
</div>
<div className="sendbird-fileviewer__header__left__text-container">
<Label
className="sendbird-fileviewer__header__left__filename"
type={LabelTypography.H_2}
color={LabelColors.ONBACKGROUND_1}
>
{name}
</Label>
<Label
className="sendbird-fileviewer__header__left__sender-name"
type={LabelTypography.BODY_1}
color={LabelColors.ONBACKGROUND_2}
>
{nickname}
</Label>
</div>
<Label
className="sendbird-fileviewer__header__left__filename"
type={LabelTypography.H_2}
color={LabelColors.ONBACKGROUND_1}
>
{name}
</Label>
<Label
className="sendbird-fileviewer__header__left__sender-name"
type={LabelTypography.BODY_1}
color={LabelColors.ONBACKGROUND_2}
>
{nickname}
</Label>
</div>
<div
className="sendbird-fileviewer__header__right"
>
{
isSupportedFileView(type) && (
<div className="sendbird-fileviewer__header__right__actions" >
<div className="sendbird-fileviewer__header__right__actions">
<a
className="sendbird-fileviewer__header__right__actions__download"
rel="noopener noreferrer"
Expand Down