mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-31 11:11:26 +02:00
* Refactor MFileBody using MVVM and move to shared component * Simplyfing rendering properties * Create a first version of view model for the component * Simplifying component properties and make it possible to override module css using data-* attributes * Create a MBodyFactory in element-web and use it to render MFileBodyView from MessageEvent * Use <MediaBody instead of <button to support legacy rendering * Updated styling and comments * Refactoring className from snapshot to component property * Rename MFileBody* to FileBody* * Rename MFileBody* to FileBody* * Refactoring render branches to allow for displaying nothing * Fix styling issues * Fix lint errors * Fix for css selectors in playwright tests * Remove the MFileBody component and change all callers to use MBodyFactory:FileBodyView * Remove unused strings in element-web * Revert to render text in story iframes * Fix for prettier error * Fix playwright test css selectors * Apply legacy styling in element-web * Add legacy styling for mx_MFileBody * Restore file * Change from <div to <button * Calculate span width ad update screenshots * Remove width calculation and update snapshots * Fix for letter-spacing and better content in story * Updated playwright screenshots * Updated snapshots * Fixing Sonar errors/warnings * Removed extra parentheses * Changes after review * Change border-radius to px and updated snapshots * Fix typo in description * And another typo fix * Changes after review
78 lines
2.0 KiB
Plaintext
78 lines
2.0 KiB
Plaintext
/*
|
|
Copyright 2024 New Vector Ltd.
|
|
Copyright 2016 OpenMarket Ltd
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
.mx_FilePanel {
|
|
order: 2;
|
|
flex: 1 1 0;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
|
|
.mx_RoomView_messageListWrapper {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mx_RoomView_MessageList {
|
|
width: 100%;
|
|
gap: var(--cpd-space-6x);
|
|
}
|
|
|
|
/* FIXME: rather than having EventTile's default CSS be for MessagePanel,
|
|
we should make EventTile a base CSS class and customise it specifically
|
|
for usage in {Message,File,Notification}Panel. */
|
|
|
|
/* Overrides for the attachment body tiles */
|
|
.mx_EventTile {
|
|
word-break: break-word;
|
|
padding-top: 0;
|
|
|
|
& + .mx_EventTile {
|
|
border-top: 1px solid var(--cpd-color-gray-400);
|
|
padding-top: var(--cpd-space-6x);
|
|
}
|
|
|
|
.mx_EventTile_line {
|
|
padding-inline-start: 0;
|
|
}
|
|
|
|
.mx_MFileBody [data-type="download"] {
|
|
margin-top: var(--cpd-space-4x);
|
|
}
|
|
|
|
/* anchor link as wrapper */
|
|
.mx_EventTile_senderDetailsLink {
|
|
text-decoration: none;
|
|
margin-bottom: var(--cpd-space-1x);
|
|
display: block;
|
|
|
|
.mx_EventTile_senderDetails {
|
|
display: flex;
|
|
margin-top: -2px;
|
|
gap: var(--cpd-space-2x);
|
|
align-items: center;
|
|
|
|
.mx_DisambiguatedProfile {
|
|
color: $event-timestamp-color; /* for ellipsis. Color of displayName and mxid is inherited */
|
|
}
|
|
|
|
.mx_MessageTimestamp {
|
|
margin-left: auto;
|
|
font: var(--cpd-font-body-xs-regular);
|
|
color: var(--cpd-color-text-secondary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.mx_EventTile_line {
|
|
margin-inline-end: 0;
|
|
padding-inline-start: 0;
|
|
}
|
|
}
|