mirror of
https://github.com/SchildiChat/schildichat-desktop.git
synced 2025-03-26 10:07:47 +01:00
Remove caption patch that upstream merged, and squash SC CSS patches
This commit is contained in:
parent
a18b08ff06
commit
f9686103b7
@ -23,6 +23,5 @@ Note that this list may be incomplete or outdated.
|
||||
|
||||
## Conversation screen
|
||||
|
||||
- Render captions
|
||||
- Allow sending freeform reactions
|
||||
- Less restrictive width limit for rendering text reactions
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e326039d1acbc5da0cdd95dc235646202264d3c3 Mon Sep 17 00:00:00 2001
|
||||
From bb7b8491326df4774f073840a96e28770c070250 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sat, 2 Dec 2023 12:57:26 +0100
|
||||
Subject: Add back schildi fetch-package.ts modifications
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 63901825c14da3ec6f59017d2696ad98be91d2e0 Mon Sep 17 00:00:00 2001
|
||||
From ac44e234f8f51ff21da56482c16621ece878e821 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Thu, 9 May 2024 09:21:21 +0200
|
||||
Subject: Add fields for media caption support
|
||||
|
@ -1,104 +0,0 @@
|
||||
From ac0fb82339fc580da9db60c183a39d72e6fba3ea Mon Sep 17 00:00:00 2001
|
||||
From: Tulir Asokan <tulir@maunium.net>
|
||||
Date: Tue, 12 Jul 2022 15:34:57 +0300
|
||||
Subject: Add support for rendering captions in media messages
|
||||
|
||||
---
|
||||
src/components/views/messages/IBodyProps.ts | 2 ++
|
||||
src/components/views/messages/MessageEvent.tsx | 15 +++++++++++++++
|
||||
src/components/views/messages/TextualBody.tsx | 11 +++++++++++
|
||||
src/utils/FileUtils.ts | 4 +++-
|
||||
4 files changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/components/views/messages/IBodyProps.ts b/src/components/views/messages/IBodyProps.ts
|
||||
index e48ba96b56..3caeff225c 100644
|
||||
--- a/src/components/views/messages/IBodyProps.ts
|
||||
+++ b/src/components/views/messages/IBodyProps.ts
|
||||
@@ -51,4 +51,6 @@ export interface IBodyProps {
|
||||
// Set to `true` to disable interactions (e.g. video controls) and to remove controls from the tab order.
|
||||
// This may be useful when displaying a preview of the event.
|
||||
inhibitInteraction?: boolean;
|
||||
+
|
||||
+ OrigBodyType?: React.ComponentType<Partial<IBodyProps>>;
|
||||
}
|
||||
diff --git a/src/components/views/messages/MessageEvent.tsx b/src/components/views/messages/MessageEvent.tsx
|
||||
index 1a5d09e415..bfe908aacc 100644
|
||||
--- a/src/components/views/messages/MessageEvent.tsx
|
||||
+++ b/src/components/views/messages/MessageEvent.tsx
|
||||
@@ -175,6 +175,15 @@ export default class MessageEvent extends React.Component<IProps> implements IMe
|
||||
}
|
||||
}
|
||||
|
||||
+ // @ts-ignore
|
||||
+ const hasCaption = [MsgType.Image, MsgType.File, MsgType.Audio, MsgType.Video].includes(msgtype)
|
||||
+ && content.filename && content.filename !== content.body;
|
||||
+ let OrigBodyType;
|
||||
+ if (hasCaption) {
|
||||
+ OrigBodyType = BodyType
|
||||
+ BodyType = CaptionBody
|
||||
+ }
|
||||
+
|
||||
if (SettingsStore.getValue("feature_mjolnir")) {
|
||||
const key = `mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;
|
||||
const allowRender = localStorage.getItem(key) === "true";
|
||||
@@ -208,7 +217,13 @@ export default class MessageEvent extends React.Component<IProps> implements IMe
|
||||
getRelationsForEvent={this.props.getRelationsForEvent}
|
||||
isSeeingThroughMessageHiddenForModeration={this.props.isSeeingThroughMessageHiddenForModeration}
|
||||
inhibitInteraction={this.props.inhibitInteraction}
|
||||
+ OrigBodyType={OrigBodyType}
|
||||
/>
|
||||
) : null;
|
||||
}
|
||||
}
|
||||
+
|
||||
+const CaptionBody: React.FunctionComponent<IBodyProps & {OrigBodyType: React.ComponentType<Partial<IBodyProps>>}> = ({OrigBodyType, ...props}) => (<div className="mx_EventTile_content">
|
||||
+ <OrigBodyType {...props}/>
|
||||
+ <TextualBody {...{...props, ref: undefined}}/>
|
||||
+</div>)
|
||||
diff --git a/src/components/views/messages/TextualBody.tsx b/src/components/views/messages/TextualBody.tsx
|
||||
index 8b7bfb9a5a..a8890303f8 100644
|
||||
--- a/src/components/views/messages/TextualBody.tsx
|
||||
+++ b/src/components/views/messages/TextualBody.tsx
|
||||
@@ -557,6 +557,9 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
|
||||
const isNotice = content.msgtype === MsgType.Notice;
|
||||
const isEmote = content.msgtype === MsgType.Emote;
|
||||
|
||||
+ // @ts-ignore
|
||||
+ const isCaption = [MsgType.Image, MsgType.File, MsgType.Audio, MsgType.Video].includes(content.msgtype);
|
||||
+
|
||||
const willHaveWrapper =
|
||||
this.props.replacingEventId || this.props.isSeeingThroughMessageHiddenForModeration || isEmote;
|
||||
|
||||
@@ -635,6 +638,14 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+ if (isCaption) {
|
||||
+ return (
|
||||
+ <div className="mx_MTextBody mx_EventTile_caption" onClick={this.onBodyLinkClick}>
|
||||
+ { body }
|
||||
+ { widgets }
|
||||
+ </div>
|
||||
+ );
|
||||
+ }
|
||||
return (
|
||||
<div className="mx_MTextBody mx_EventTile_content" onClick={this.onBodyLinkClick}>
|
||||
{body}
|
||||
diff --git a/src/utils/FileUtils.ts b/src/utils/FileUtils.ts
|
||||
index 194cb31d20..0c0aec2138 100644
|
||||
--- a/src/utils/FileUtils.ts
|
||||
+++ b/src/utils/FileUtils.ts
|
||||
@@ -38,7 +38,9 @@ export function presentableTextForFile(
|
||||
shortened = false,
|
||||
): string {
|
||||
let text = fallbackText;
|
||||
- if (content.body?.length) {
|
||||
+ if (content.filename?.length) {
|
||||
+ text = content.filename
|
||||
+ } else if (content.body?.length) {
|
||||
// The content body should be the name of the file including a
|
||||
// file extension.
|
||||
text = content.body;
|
||||
--
|
||||
2.47.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0f0f80d270be5c88b0b762b51fe570c11b0bea7f Mon Sep 17 00:00:00 2001
|
||||
From 9b7e89b38c49ffdb2811a3241cf077d8ca5ff1c7 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Thu, 14 Dec 2023 10:32:10 +0100
|
||||
Subject: Don't preview reactions
|
@ -1,4 +1,4 @@
|
||||
From bc49b8d30cf7e0da038fac992ee2ff04c9dc91aa Mon Sep 17 00:00:00 2001
|
||||
From 63244240b0a168b7f871aab50373805fc22601ec Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Wed, 17 Nov 2021 12:50:25 +0100
|
||||
Subject: Hide the "mute" notification state the same way as the other states
|
@ -1,4 +1,4 @@
|
||||
From 10b23f715bf5115715dca07676ca467a6433c9c9 Mon Sep 17 00:00:00 2001
|
||||
From 3dd434f6a79a40db10cae4e97081fa4025030f3d Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Fri, 10 May 2024 18:58:32 +0200
|
||||
Subject: Allow muted rooms to render as unread
|
@ -1,4 +1,4 @@
|
||||
From 641cd216c155318e35eabef30761613706e36c87 Mon Sep 17 00:00:00 2001
|
||||
From 29edc707c494b2d3ead55331fc5ba3358c88bd88 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sun, 30 Aug 2020 15:33:01 +0200
|
||||
Subject: Increase default visible tiles
|
@ -1,4 +1,4 @@
|
||||
From 2203554625f7c8d924981b3cd03b1389dc6873d9 Mon Sep 17 00:00:00 2001
|
||||
From cdcce7746aa7ade1bb7785c03c94b49b27fa6f36 Mon Sep 17 00:00:00 2001
|
||||
From: su-ex <codeworks@supercable.onl>
|
||||
Date: Sun, 26 May 2024 10:43:36 +0200
|
||||
Subject: Bring back showSpaceDMBadges setting, force-enabled for now
|
@ -1,4 +1,4 @@
|
||||
From 961ee28392810973057a0c8af410e1067a15547a Mon Sep 17 00:00:00 2001
|
||||
From 1cec65f97867b8c29b596f7ca4a171d01d3cb04c Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Wed, 29 May 2024 19:32:42 +0200
|
||||
Subject: Squashed: Freeform reactions from tadzik/freeform-reactions-upstream
|
@ -1,4 +1,4 @@
|
||||
From 794b8d3b7ccfbea95cba180b13de0ed42e7fc6c2 Mon Sep 17 00:00:00 2001
|
||||
From 82a7324a26d4c3925fd984a6fd06817ecb94397b Mon Sep 17 00:00:00 2001
|
||||
From: su-ex <codeworks@supercable.onl>
|
||||
Date: Sat, 22 Apr 2023 12:15:18 +0200
|
||||
Subject: Allow reactions to take more space
|
@ -1,4 +1,4 @@
|
||||
From b43bf7e8a183f36e30e9b79e3fc2dcd14afc6823 Mon Sep 17 00:00:00 2001
|
||||
From 1986abb52e47004f03db04fb167757e5ed666e07 Mon Sep 17 00:00:00 2001
|
||||
From: su-ex <codeworks@supercable.onl>
|
||||
Date: Thu, 30 May 2024 14:35:16 +0200
|
||||
Subject: On space switch don't automatically show last opened room
|
@ -1,4 +1,4 @@
|
||||
From 3aa2246c56ae3e5b7703003ef785d6e3ad77b844 Mon Sep 17 00:00:00 2001
|
||||
From c2b459a7b0bd38b7b3c5151d002032dec3f25da7 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Tue, 9 Aug 2022 09:32:19 +0200
|
||||
Subject: Exclude spaces from breadcrumbs
|
@ -1,4 +1,4 @@
|
||||
From 288aa3cf8e56a4ca60810eac98fb6f692b154f61 Mon Sep 17 00:00:00 2001
|
||||
From 6233f7e038d6f78025ea2961467a0a22fbeee8a1 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Mon, 19 Aug 2024 20:27:33 +0200
|
||||
Subject: Stop the search bar wobble
|
@ -1,14 +1,23 @@
|
||||
From a4bca41b7371c42499fd8c805482066514a9edc2 Mon Sep 17 00:00:00 2001
|
||||
From e87c6764f4abc734cdd05be97782e1b8e4e9df1c Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sun, 13 Oct 2024 11:23:54 +0200
|
||||
Subject: Import SC compound theme overrides
|
||||
|
||||
---
|
||||
res/css/_common.pcss | 1 +
|
||||
res/css/sc-cpd-overrides.css | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
create mode 120000 res/css/sc-cpd-overrides.css
|
||||
.gitignore | 2 ++
|
||||
res/css/_common.pcss | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 3137cd555b..5345301b97 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -1,3 +1,5 @@
|
||||
+res/css/sc-*.css
|
||||
+
|
||||
/.npmrc
|
||||
/*.log
|
||||
package-lock.json
|
||||
diff --git a/res/css/_common.pcss b/res/css/_common.pcss
|
||||
index 7861af6381..f7a660a339 100644
|
||||
--- a/res/css/_common.pcss
|
||||
@ -21,14 +30,6 @@ index 7861af6381..f7a660a339 100644
|
||||
@import "./_font-sizes.pcss";
|
||||
@import "./_animations.pcss";
|
||||
@import "./_spacing.pcss";
|
||||
diff --git a/res/css/sc-cpd-overrides.css b/res/css/sc-cpd-overrides.css
|
||||
new file mode 120000
|
||||
index 0000000000..532e96fddc
|
||||
--- /dev/null
|
||||
+++ b/res/css/sc-cpd-overrides.css
|
||||
@@ -0,0 +1 @@
|
||||
+../../../res/css/sc-cpd-overrides.css
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.47.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fc577303d8c2d290f1c17e13deaf442822af68a1 Mon Sep 17 00:00:00 2001
|
||||
From 6c4f7dc233b9946bf1dd883516b9d89fb7bede05 Mon Sep 17 00:00:00 2001
|
||||
From: su-ex <codeworks@supercable.onl>
|
||||
Date: Tue, 7 Sep 2021 19:41:52 +0200
|
||||
Subject: No damn avatar background in room list
|
@ -1,4 +1,4 @@
|
||||
From e4a7ea01c2fd9f7d67660402c20bfdc5969f28c4 Mon Sep 17 00:00:00 2001
|
||||
From 31b4da04ee9d8fefa0a26182dcd02d5b597b15ec Mon Sep 17 00:00:00 2001
|
||||
From: su-ex <codeworks@supercable.onl>
|
||||
Date: Tue, 22 Dec 2020 19:16:28 +0100
|
||||
Subject: No red messages in 1:1 chats Close SchildiChat/schildichat-desktop#13
|
@ -1,4 +1,4 @@
|
||||
From a37ca889b832578a9201a5b45b059f58eb781bc5 Mon Sep 17 00:00:00 2001
|
||||
From dd837c682f2aaf1d730a1e3f5b68b1cd03179e12 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sun, 13 Oct 2024 13:26:16 +0200
|
||||
Subject: Always apply corner radius to all edges of the bubble
|
@ -1,4 +1,4 @@
|
||||
From 57942189da5f80069ee4b03dc2fbeb24ce6b4f7b Mon Sep 17 00:00:00 2001
|
||||
From c4567d013ea39a71a37f9356f847b8555a8173e7 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sun, 13 Oct 2024 13:53:07 +0200
|
||||
Subject: Always show timestamps by default
|
@ -1,4 +1,4 @@
|
||||
From 47bcb08e971256fe94a0b07fb553b75400e648ed Mon Sep 17 00:00:00 2001
|
||||
From 09d134d0c975c430a894028b50ea460511fa2489 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Thu, 17 Oct 2024 19:40:51 +0200
|
||||
Subject: Enable custom emote rendering by default
|
@ -1,32 +0,0 @@
|
||||
From 16fe0fe8d0068e4c5da3fa5516c5578d2ffaabc7 Mon Sep 17 00:00:00 2001
|
||||
From: SpiritCroc <dev@spiritcroc.de>
|
||||
Date: Sun, 20 Oct 2024 17:00:19 +0200
|
||||
Subject: Don't symlink css to fix Windows-native build
|
||||
|
||||
---
|
||||
.gitignore | 2 ++
|
||||
res/css/sc-cpd-overrides.css | 1 -
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
delete mode 120000 res/css/sc-cpd-overrides.css
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 3137cd555b..5345301b97 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -1,3 +1,5 @@
|
||||
+res/css/sc-*.css
|
||||
+
|
||||
/.npmrc
|
||||
/*.log
|
||||
package-lock.json
|
||||
diff --git a/res/css/sc-cpd-overrides.css b/res/css/sc-cpd-overrides.css
|
||||
deleted file mode 120000
|
||||
index 532e96fddc..0000000000
|
||||
--- a/res/css/sc-cpd-overrides.css
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-../../../res/css/sc-cpd-overrides.css
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.47.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user