Compare commits

...

20 Commits

Author SHA1 Message Date
e718080611 Cherry-pick search fix from upstream develop 2024-11-25 14:11:50 +01:00
e30832e7f8 Add IRC layout community contribution
Closes https://github.com/SchildiChat/schildichat-desktop/pull/269

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2024-11-23 12:10:01 +01:00
ba3cf70b3b Upstream v1.11.86 2024-11-23 11:26:04 +01:00
491ad5ac75 Upstream v1.11.85 2024-11-13 15:07:08 +01:00
122f9d3033 Upstream v1.11.84 2024-11-10 12:03:00 +01:00
735143f88b [HACK] Get captions to show in bubble layout again
Timestamp position is bad with this, and probably has other bugs now too
2024-10-31 17:35:34 +01:00
86812e67e0 push_current_sc_branches.sh: Exclude compound for now 2024-10-30 19:46:24 +01:00
aa69433842 Upstream v1.11.84-rc.0: Get rid of matrix-react-sdk 2024-10-30 19:43:20 +01:00
9f65d55aad Upstream 1.11.83 2024-10-29 17:12:51 +01:00
82bcf74d8e apply_patches.sh: Re-enable element-web 2024-10-29 17:04:30 +01:00
44ea087c1a Schildify login screen a bit better 2024-10-27 20:11:15 +01:00
720ec98278 Enable chat previews by default 2024-10-27 19:27:04 +01:00
17c8d2e7f4 Properly .gitignore and make clean sc-cpd-overrides.css 2024-10-26 09:33:05 +02:00
840d1f60ea Fork compound-web and make tooltip design less bad 2024-10-25 18:35:10 +02:00
5bda6c96d6 Fix tray icon after upstream merge 2024-10-22 20:10:23 +02:00
ba6fe489e3 Upstream v1.11.82 2024-10-22 19:59:07 +02:00
f9686103b7 Remove caption patch that upstream merged, and squash SC CSS patches 2024-10-22 19:13:11 +02:00
a18b08ff06 Rename web app on release
Don't know why it's being called element right now, but we can rename
it afterwards anyway
2024-10-21 21:22:00 +02:00
d08d00eb09 Get Fedora-based build to work again 2024-10-21 20:20:28 +02:00
6b2b1a6968 Update README 2024-10-20 18:16:01 +02:00
55 changed files with 22811 additions and 543 deletions

6
.gitmodules vendored
View File

@ -1,12 +1,12 @@
[submodule "matrix-js-sdk"]
path = matrix-js-sdk
url = https://github.com/SchildiChat/matrix-js-sdk.git
[submodule "matrix-react-sdk"]
path = matrix-react-sdk
url = https://github.com/SchildiChat/matrix-react-sdk.git
[submodule "element-web"]
path = element-web
url = https://github.com/SchildiChat/element-web.git
[submodule "element-desktop"]
path = element-desktop
url = https://github.com/SchildiChat/element-desktop.git
[submodule "compound-web"]
path = compound-web
url = https://github.com/SchildiChat/compound-web.git

View File

@ -1,6 +1,6 @@
FROM docker.io/fedora:40
RUN dnf install -y openssl openssl-devel cargo llvm libsecret libsecret-devel sqlcipher sqlcipher-devel g++ ruby-devel gcc make rpm-build libffi-devel tcl libxcrypt-compat pkgconf perl
RUN dnf install -y openssl openssl-devel cargo llvm libsecret libsecret-devel sqlcipher sqlcipher-devel g++ ruby-devel gcc make rpm-build libffi-devel tcl libxcrypt-compat pkgconf perl python3-setuptools
# node setup
ARG NODE_VERSION

View File

@ -5,7 +5,8 @@ Note that this list may be incomplete or outdated.
## General UI
... TODO Schildi theme?
- Schildi theme
- Some changed settings defaults
## Chat overview ("room list")
@ -23,6 +24,12 @@ 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
## Non-core community contributions
Following features and changes are community-maintained, i.e. do not embody core SchildiChat features and may be dropped in future releases in case they cause a notable maintenance burden.
- [Improved IRC layout](https://github.com/SchildiChat/schildichat-desktop/pull/269)

View File

@ -3,6 +3,7 @@
.PHONY: macos-common macos macos-mas macos-release macos-mas-release icns
.PHONY: container-build-debian container-build-fedora container-build-windows
.PHONY: container-web-release container-debian-release container-rpm-release container-appimage-release container-windows-release container-release container-local-pkgbuild
.PHONY: linux-container-release container-debian-based-release
.PHONY: clean undo_setup fixup
.PHONY: fix_yarn_cache
@ -15,14 +16,14 @@ CONTAINER_ENGINE ?= podman
NODE_VERSION ?= 22
VERSION := $(shell grep version element-desktop/package.json | sed 's|.*: \"\(.*\)\",|\1|')
#WEB_APP_NAME := $(shell grep '"name"' element-web/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
WEB_APP_NAME := element
WEB_APP_NAME := $(shell grep '"name"' element-web/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
DESKTOP_APP_NAME := $(shell grep '"name"' element-desktop/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
PRODUCT_NAME := $(shell grep '"productName"' element-desktop/package.json | sed 's|.*: \"\(.*\)\",|\1|')
WEB_OUT := element-web/dist
WEB_OUT_DIST_VERSION := $(VERSION)
OUT_WEB := $(WEB_OUT)/$(WEB_APP_NAME)-$(WEB_OUT_DIST_VERSION).tar.gz
#OUT_WEB := $(WEB_OUT)/$(WEB_APP_NAME)-$(WEB_OUT_DIST_VERSION).tar.gz
OUT_WEB := $(WEB_OUT)/element-$(WEB_OUT_DIST_VERSION).tar.gz
DESKTOP_OUT := element-desktop/dist
OUT_DEB64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)_$(VERSION)_amd64.deb
@ -124,7 +125,7 @@ local-pkgbuild-install: local-pkgbuild
web-release: web
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)
cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)/${WEB_APP_NAME}-$(WEB_OUT_DIST_VERSION).tar.gz
debian-release: debian
mkdir -p $(CURRENT_RELEASE_DIR)
@ -178,6 +179,10 @@ container-web-release: container-build-debian
container-debian-release: container-build-debian
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make debian-release
# For all releases which are fine being built from Debian
container-debian-based-release: container-build-debian
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make web-release debian-release appimage-release
container-rpm-release: container-build-fedora
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_FEDORA):latest make rpm-release
@ -191,13 +196,13 @@ container-release: container-build-windows #container-build-fedora
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_WINDOWS):latest make web-release debian-release appimage-release rpm-release windows-setup-release windows-portable-release
#$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_FEDORA):latest make rpm-release
linux-container-release: container-build-debian
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make web-release debian-release appimage-release rpm-release
# For all Linux releases we build
linux-container-release: container-debian-based-release container-rpm-release
container-local-pkgbuild: container-build-debian
$(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make local-pkgbuild
bom.lock: element-desktop/yarn.lock element-web/yarn.lock matrix-js-sdk/yarn.lock matrix-react-sdk/yarn.lock
bom.lock: element-desktop/yarn.lock element-web/yarn.lock matrix-js-sdk/yarn.lock
./build-bom.sh
bom: bom.lock
@ -206,16 +211,16 @@ fix_yarn_cache:
clean:
$(YARN) --cwd matrix-js-sdk clean
$(YARN) --cwd matrix-react-sdk clean
$(YARN) --cwd element-web clean
$(YARN) --cwd element-desktop clean
rm -f element-desktop/webapp || true
rm -rf element-web/dist
rm -rf local-pkgbuild
rm -f bom.lock
rm -f element-web/res/css/sc-cpd-overrides.css
undo_setup:
rm -rf element-desktop/node_modules element-web/node_modules matrix-react-sdk/node_modules matrix-js-sdk/node_modules i18n-helper/node_modules element-desktop/.hak
rm -rf element-desktop/node_modules element-web/node_modules matrix-js-sdk/node_modules i18n-helper/node_modules element-desktop/.hak
fixup: undo_setup fix_yarn_cache
make setup

View File

@ -3,21 +3,96 @@
SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/element-hq/element-web)/[Desktop](https://github.com/element-hq/element-desktop).
## Initial build setup
```
git clone -b lite --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
cd schildichat-desktop
make setup # optional step if using the other make targets
```
## Building on Linux
Easiest to build on Linux is using `podman`, i.e. use one of the following make targets:
```
make container-appimage-release
make container-debian-release
make container-rpm-release
make container-web-release
```
## Windows building dependencies
To build on Windows, use [Element's](https://web-docs.element.dev/Element%20Desktop/windows-requirements.html) guide as starting point.
Some additional notes I found useful:
### Before build
To prepare your build environment for VSC tools (use 2022 rather than 2019 mentioned upstream:
```
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
```
Additionally, make sure some programs are in your `PATH`:
```
export PATH="/C/Strawberry/perl/bin:$PATH:/C/Program Files/NASM:/C/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/"
```
- Strawberry perl needs to go before possibly already installed `/usr/bin/perl`
- NASM needs to be available
- `nmake` bundled with VSC wasn't available without adding that additionally (make sure the version is correct for what you installed)
### Additional packages not mentioned upstream
```
npm install yarn
npm install gyp
npm install electron-builder
npm install @electron/fuses
pip install setuptools
```
To update outdated npm packages:
```
npm outdated
npm update <name>
```
### Troubleshooting
- `yarn link` fails with permission denied: [kill any running nodejs task](https://stackoverflow.com/questions/64603970/an-unexpected-error-occurred-eperm-operation-not-permitted-in-yarn)
- `electron-builder` fails to extract `winCodeSign`:
- Download [source code](https://github.com/electron-userland/electron-builder-binaries/releases/tag/winCodeSign-2.6.0) manually
- Extract `electron-builder-binaries-winCodeSign-2.6.0.zip\electron-builder-binaries-winCodeSign-2.6.0\winCodeSign` to your `AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0
- [Source](https://github.com/electron-userland/electron-builder/issues/8149#issuecomment-2328460139)
## Release builds
See [here](RELEASE.md).
## Old build instructions, to be revised in the future
## Building SchildiChat Web/Desktop
This particular repo is a wrapper project for element-desktop, element-web, matrix-react-sdk and matrix-js-sdk. It's the recommended starting point to build SchildiChat for Web **and** Desktop.
This particular repo is a wrapper project for element-desktop, element-web, and matrix-js-sdk. It's the recommended starting point to build SchildiChat for Web **and** Desktop.
The `master` branch contains the latest release.
Development happens in the `sc` branch, which might be **broken at any time**!
<pre><code><b>schildichat-desktop</b> <i>&lt;-- this repo</i> (recommended starting point to build SchildiChat for Web <b>and</b> Desktop)
|-- <a href="https://github.com/SchildiChat/element-desktop">element-desktop</a> (electron wrapper)
|-- <a href="https://github.com/SchildiChat/element-web">element-web</a> ("skin" for matrix-react-sdk)
|-- <a href="https://github.com/SchildiChat/matrix-react-sdk">matrix-react-sdk</a> (most of the development happens here)
|-- <a href="https://github.com/SchildiChat/element-web">element-web</a> (most of the development happens here)
`-- <a href="https://github.com/SchildiChat/matrix-js-sdk">matrix-js-sdk</a> (Matrix client js sdk)
</code></pre>
@ -67,17 +142,6 @@ or set `CSC_NAME` to your certificate name or id.
To notarize a build with Apple set `NOTARIZE_APPLE_ID` to your AppleID and set the keychain item
`NOTARIZE_CREDS` to an App specific AppleID password.
### Initial setup
As already noted above, **`master` contains the latest release** and **`sc` is the development branch**!
```
git clone -b lite --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
cd schildichat-desktop
make setup # optional step if using the other make targets
```
### Create release builds
```

26
RELEASE.md Normal file
View File

@ -0,0 +1,26 @@
# Releasing SchildiChat deskop
## Build Linux releases
On a Linux machine with podman:
```
make container-release-linux
```
## Build Windows releases
On a Windows machine in git bash (**not** WSL), run:
```
make windows-setup-release
```
## Upload the release
Copy the Windows-generated `.exe` from the `release` directory into the release directory on your Linux machine.
Then (after ensuring you have a GitHub API token setup for the script to pick up):
```
./deploy/create-github-release.sh
```

View File

@ -16,12 +16,10 @@ pushd "$mydir" > /dev/null
source ./merge_helpers.sh
# Apply our patches
print_section "Apply patches to matrix-js-sdk"
apply_patches matrix-js-sdk
print_section "Apply patches to matrix-react-sdk"
apply_patches matrix-react-sdk
#print_section "Apply patches to element-web"
#apply_patches element-web
#print_section "Apply patches to matrix-js-sdk"
#apply_patches matrix-js-sdk
print_section "Apply patches to element-web"
apply_patches element-web
print_section "Apply patches to element-desktop"
apply_patches element-desktop

View File

@ -5,8 +5,6 @@ cat element-web/yarn.lock >> bom.lock
echo "" >> bom.lock
cat matrix-js-sdk/yarn.lock >> bom.lock
echo "" >> bom.lock
cat matrix-react-sdk/yarn.lock >> bom.lock
echo "" >> bom.lock
# matrix-seshat
cat << EOF >> bom.lock

1
compound-web Submodule

Submodule compound-web added at 141771eb30

View File

@ -10,6 +10,11 @@ set -e
version="$1"
releasepath="$2"
if [ -z "$version" ] || [ -z "$releasepath" ]; then
echo "Usage: $0 <version> <releasepath>"
exit 1
fi
if [ -z "$GITHUB_API_TOKEN" ]; then
github_api_token=`cat ~/githubtoken`
else

View File

@ -24,8 +24,10 @@ persist_patches() {
echo "Creating new patch dir $patch_dir..."
mkdir "$patch_dir"
fi
echo "Creating new patches"
git format-patch -k upstream/master.. -o "$patch_dir"
# Assume we forked from a tag starting with 'v' (our own tags start with sc_)
local fork_point=`git describe --tags --match 'v*'| sed 's|-[^-]*-[^-]*$||'`
echo "Creating new patches from $fork_point"
git format-patch -k "$fork_point".. -o "$patch_dir"
echo "Clearing automated commits from patches"
find "$patch_dir" -name "*-Automatic-package.json-adjustment.patch" -exec rm {} \;
find "$patch_dir" -name "*-Automatic-icon-update.patch" -exec rm {} \;
@ -36,8 +38,7 @@ persist_patches() {
}
persist_patches element-desktop
#persist_patches element-web
persist_patches matrix-react-sdk
persist_patches matrix-js-sdk
persist_patches element-web
#persist_patches matrix-js-sdk
popd > /dev/null

View File

@ -62,9 +62,12 @@ repo_dir="$SCHILDI_ROOT/element-desktop"
base_out="$repo_dir/res/img"
export_square 256 "$mydir/ic_launcher_sc.svg" "$base_out/element.png"
magick "$base_out/element.png" "$base_out/element.ico"
# TODO monochrome icon? Unless https://github.com/element-hq/element-desktop/pull/1934 is what we'll end with
export_square 256 "$mydir/ic_launcher_sc.svg" "$base_out/monochrome.png"
magick "$base_out/element.png" "$base_out/monochrome.ico"
for f in "$base_out"/*.png; do
pngcrush -ow "$f"
done

Submodule matrix-react-sdk deleted from 16fe0fe8d0

View File

@ -17,11 +17,11 @@ add_upstream() {
echo "Remote named upstream already exists, deleting..."
git remote remove upstream
fi
local sc_remote="$(git remote -v|grep origin|grep fetch|sed 's|.*\t\(.*\) (fetch)|\1|')"
local sc_remote="$(git remote -v|grep origin|grep fetch|sed 's|.*\t\(.*\) (fetch)|\1|;s|git@github.com:|https://github.com/|')"
if echo "$sc_remote" | grep -q matrix-js-sdk; then
# matrix.org repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|matrix-org|')"
elif echo "$sc_remote" | grep -q "element\\|matrix-react-sdk"; then
elif echo "$sc_remote" | grep -q "element\\|compound-web"; then
# vector-im repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|element-hq|')"
else
@ -34,7 +34,7 @@ add_upstream() {
}
forall_repos() {
for repo in "matrix-js-sdk" "matrix-react-sdk" "element-web" "element-desktop"; do
for repo in "matrix-js-sdk" "element-web" "element-desktop" "compound-web"; do
pushd "$SCHILDI_ROOT/$repo" > /dev/null
"$@"
popd > /dev/null
@ -49,6 +49,14 @@ forelement_repos() {
done
}
for_main_repos() {
for repo in "matrix-js-sdk" "element-web" "element-desktop"; do
pushd "$SCHILDI_ROOT/$repo" > /dev/null
"$@"
popd > /dev/null
done
}
ensure_yes() {
read -e -p "$1 [y/N] " choice
@ -99,13 +107,8 @@ automatic_i18n_reversion() {
get_current_upstream_tag
local current_mxjssdk_tag
local current_mxreactsdk_tag
get_current_mxsdk_tags
pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
revert_i18n_changes "$i18n_path" "$current_mxreactsdk_tag" "$skip_commit"
popd > /dev/null
pushd "$SCHILDI_ROOT/element-web" > /dev/null
revert_i18n_changes "$i18n_path" "$current_upstream_tag" "$skip_commit"
popd > /dev/null
@ -116,13 +119,6 @@ automatic_i18n_reversion() {
}
automatic_i18n_adjustment() {
# matrix-react-sdk
pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
$yarn i18n
node "$i18n_helper_path" "$SCHILDI_ROOT/matrix-react-sdk/$i18n_path" "$i18n_overlay_path/matrix-react-sdk"
apply_i18n_changes "$i18n_path"
popd > /dev/null
# element-web
pushd "$SCHILDI_ROOT/element-web" > /dev/null
$yarn i18n
@ -248,7 +244,6 @@ get_current_upstream_tag() {
}
get_current_mxsdk_tags() {
current_mxreactsdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-react-sdk"]' -r)"
current_mxjssdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-js-sdk"]' -r)"
}

View File

@ -45,10 +45,6 @@ pushd "matrix-js-sdk" > /dev/null
git checkout "$current_mxjssdk_tag" -B "$sc_branch_name"
popd > /dev/null
pushd "matrix-react-sdk" > /dev/null
git checkout "$current_mxreactsdk_tag" -B "$sc_branch_name"
popd > /dev/null
# Refresh environment
make clean
make setup
@ -56,4 +52,7 @@ forall_repos commit_if_dirty "Automatic setup commit"
./apply_patches.sh
compound_web_version=`cat element-web/package.json|grep compound-web|sed 's|.*: \"\(.*\)",|\1|;s|\^||'`
echo "TODO: merge compound web at $compound_web_version"
popd > /dev/null

View File

@ -1,18 +0,0 @@
final: prev: {
cleanSchildichatDesktopSource = src: with final.lib; cleanSourceWith {
filter = name: type: cleanSourceFilter name type
&& !(hasInfix "/node_modules/" name)
&& !(hasInfix "/nix/" name && hasSuffix ".nix" name)
;
inherit src;
};
schildichat-web = final.callPackage ./schildichat-web.nix {
};
schildichat-desktop = final.callPackage ./schildichat-desktop.nix {
inherit (final.darwin.apple_sdk.frameworks) Security AppKit CoreServices;
};
schildichat-desktop-wayland = final.callPackage ./schildichat-desktop.nix {
inherit (final.darwin.apple_sdk.frameworks) Security AppKit CoreServices;
useWayland = true;
};
}

View File

@ -1,109 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, makeDesktopItem
, mkYarnPackage
, electron
, element-desktop # for native modules
, schildichat-web
, callPackage
, Security
, AppKit
, CoreServices
, useWayland ? false
, cleanSchildichatDesktopSource
, schildichat-desktop-src ? ../.
}:
let
packageJSON = schildichat-desktop-src + "/element-desktop/package.json";
yarnLock = schildichat-desktop-src + "/element-desktop/yarn.lock";
package = builtins.fromJSON (builtins.readFile packageJSON);
pname = "schildichat-desktop";
version = package.version;
executableName = pname;
electron_exec = if stdenv.isDarwin then "${electron}/Applications/Electron.app/Contents/MacOS/Electron" else "${electron}/bin/electron";
in mkYarnPackage rec {
inherit pname version packageJSON;
src = cleanSchildichatDesktopSource (schildichat-desktop-src + "/element-desktop");
nativeBuildInputs = [ makeWrapper ];
inherit (element-desktop) seshat keytar;
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
pushd deps/schildichat-desktop/
npx tsc
yarn run i18n
node ./scripts/copy-res.js
popd
rm -rf node_modules/matrix-seshat node_modules/keytar
ln -s $keytar node_modules/keytar
ln -s $seshat node_modules/matrix-seshat
runHook postBuild
'';
installPhase = ''
runHook preInstall
# resources
mkdir -p "$out/share/element"
ln -s '${schildichat-web}' "$out/share/element/webapp"
cp -r './deps/schildichat-desktop' "$out/share/element/electron"
cp -r './deps/schildichat-desktop/res/img' "$out/share/element"
rm "$out/share/element/electron/node_modules"
cp -r './node_modules' "$out/share/element/electron"
cp $out/share/element/electron/lib/i18n/strings/en_EN.json $out/share/element/electron/lib/i18n/strings/en-us.json
ln -s $out/share/element/electron/lib/i18n/strings/en{-us,}.json
# icons
for icon in $out/share/element/electron/build/icons/*.png; do
mkdir -p "$out/share/icons/hicolor/$(basename $icon .png)/apps"
ln -s "$icon" "$out/share/icons/hicolor/$(basename $icon .png)/apps/element.png"
done
# desktop item
mkdir -p "$out/share"
ln -s "${desktopItem}/share/applications" "$out/share/applications"
# executable wrapper
makeWrapper '${electron_exec}' "$out/bin/${executableName}" \
--add-flags "$out/share/element/electron${lib.optionalString useWayland " --enable-features=UseOzonePlatform --ozone-platform=wayland"}"
runHook postInstall
'';
# Do not attempt generating a tarball for element-web again.
# note: `doDist = false;` does not work.
distPhase = ''
true
'';
# The desktop item properties should be kept in sync with data from upstream:
# https://github.com/vector-im/element-desktop/blob/develop/package.json
desktopItem = makeDesktopItem {
name = "schildichat-desktop";
exec = "${executableName} %u";
icon = "schildichat";
desktopName = "SchildiChat";
genericName = "Matrix Client";
categories = "Network;InstantMessaging;Chat;";
extraEntries = ''
StartupWMClass=schildichat
MimeType=x-scheme-handler/element;
'';
};
}

View File

@ -1,75 +0,0 @@
{ stdenv
, mkYarnModules
, nodejs
, cleanSchildichatDesktopSource
, schildichat-desktop-src ? ../.
, ...
}:
let
packageJSON = schildichat-desktop-src + "/element-web/package.json";
yarnLock = schildichat-desktop-src + "/element-web/yarn.lock";
package = builtins.fromJSON (builtins.readFile packageJSON);
pname = "schildichat-web";
version = package.version;
modules = mkYarnModules {
name = "${pname}-modules-${version}";
inherit pname version packageJSON yarnLock;
};
in stdenv.mkDerivation {
inherit pname version;
src = cleanSchildichatDesktopSource schildichat-desktop-src;
buildInputs = [ nodejs ];
postPatch = ''
patchShebangs .
'';
configurePhase = ''
runHook preConfigure
cp configs/sc/config.json element-web/
cp -r ${modules}/node_modules node_modules
chmod u+rwX -R node_modules
rm -rf node_modules/matrix-react-sdk
ln -s $PWD/matrix-react-sdk node_modules/
ln -s $PWD/node_modules matrix-react-sdk/
ln -s $PWD/node_modules element-web/
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
pushd matrix-react-sdk
node_modules/.bin/reskindex -h ../element-web/src/header
popd
pushd element-web
node scripts/copy-res.js
node_modules/.bin/reskindex -h ../element-web/src/header
node_modules/.bin/webpack --progress --mode production
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r element-web/webapp $out
runHook postInstall
'';
passthru = {
inherit modules;
};
}

View File

@ -1,4 +1,4 @@
From e326039d1acbc5da0cdd95dc235646202264d3c3 Mon Sep 17 00:00:00 2001
From 1be2423147ba91f51bf2cc0437b3652c5a4e0c00 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
@ -8,10 +8,10 @@ Subject: Add back schildi fetch-package.ts modifications
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/scripts/fetch-package.ts b/scripts/fetch-package.ts
index 54da3f3..354f039 100644
index 7282945..4be7ab0 100644
--- a/scripts/fetch-package.ts
+++ b/scripts/fetch-package.ts
@@ -55,6 +55,7 @@ async function main(): Promise<number | undefined> {
@@ -54,6 +54,7 @@ async function main(): Promise<number | undefined> {
let filename: string | undefined;
let url: string | undefined;
let setVersion = false;
@ -19,7 +19,7 @@ index 54da3f3..354f039 100644
while (process.argv.length > 2) {
switch (process.argv[2]) {
@@ -83,7 +84,9 @@ async function main(): Promise<number | undefined> {
@@ -82,7 +83,9 @@ async function main(): Promise<number | undefined> {
process.argv.shift();
}
@ -30,7 +30,7 @@ index 54da3f3..354f039 100644
targetVersion = "v" + riotDesktopPackageJson.version;
} else if (targetVersion !== "develop") {
setVersion = true; // version was specified
@@ -93,7 +96,7 @@ async function main(): Promise<number | undefined> {
@@ -92,7 +95,7 @@ async function main(): Promise<number | undefined> {
filename = "develop.tar.gz";
url = DEVELOP_TGZ_URL;
verify = false; // develop builds aren't signed
@ -39,7 +39,7 @@ index 54da3f3..354f039 100644
filename = targetVersion.substring(targetVersion.lastIndexOf("/") + 1);
url = targetVersion;
verify = false; // manually verified
@@ -145,12 +148,15 @@ async function main(): Promise<number | undefined> {
@@ -146,12 +149,15 @@ async function main(): Promise<number | undefined> {
}
let haveDeploy = false;
@ -49,7 +49,7 @@ index 54da3f3..354f039 100644
await fs.opendir(expectedDeployDir);
console.log(expectedDeployDir + "already exists");
haveDeploy = true;
- } catch (e) {}
- } catch {}
+ } catch (e) {
+ console.log("Not a valid webapp dir: " + expectedDeployDir, e);
+ return 1;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
From 60fa47ee055ed85728583c12ab4619a7576d260e Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 27 Oct 2024 19:38:47 +0100
Subject: Don't welcome to Element
---
res/welcome.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/res/welcome.html b/res/welcome.html
index ef2d43bd8f..5b71670f4f 100644
--- a/res/welcome.html
+++ b/res/welcome.html
@@ -169,7 +169,7 @@ we don't have an account and should hide them. No account == no guest account ei
<a href="https://element.io" target="_blank" rel="noopener">
<img src="$logoUrl" alt="" class="mx_Logo" />
</a>
- <h1 class="mx_Header_title">_t("welcome_to_element")</h1>
+ <h1 class="mx_Header_title">_t("Welcome to SchildiChat")</h1>
<!-- XXX: Our translations system isn't smart enough to recognize variables in the HTML, so we manually do it -->
<h4 class="mx_Header_subtitle">_t("powered_by_matrix_with_logo")</h4>
<div class="mx_ButtonGroup">
--
2.47.0

View File

@ -0,0 +1,25 @@
From faaf99c6ce2111faeeaa3100cd076a51b711d95b Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 27 Oct 2024 19:55:30 +0100
Subject: Stronger login background to ensure contrast of our icon with our bg
---
src/components/views/auth/AuthPage.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/views/auth/AuthPage.tsx b/src/components/views/auth/AuthPage.tsx
index 032744413f..71bf8ae6d6 100644
--- a/src/components/views/auth/AuthPage.tsx
+++ b/src/components/views/auth/AuthPage.tsx
@@ -58,7 +58,7 @@ export default class AuthPage extends React.PureComponent<React.PropsWithChildre
const modalContentStyle: React.CSSProperties = {
display: "flex",
zIndex: 1,
- background: "rgba(255, 255, 255, 0.59)",
+ background: "linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7))",
borderRadius: "8px",
};
--
2.47.0

View File

@ -0,0 +1,30 @@
From f469bd05375c6b4c1b419cf07b4a832511a79a4e Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 27 Oct 2024 20:07:30 +0100
Subject: Schildify login footer
---
src/components/views/auth/AuthFooter.tsx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/views/auth/AuthFooter.tsx b/src/components/views/auth/AuthFooter.tsx
index 8d27a04c83..b9ff8e8416 100644
--- a/src/components/views/auth/AuthFooter.tsx
+++ b/src/components/views/auth/AuthFooter.tsx
@@ -15,9 +15,13 @@ import { _t } from "../../../languageHandler";
const AuthFooter = (): ReactElement => {
const brandingConfig = SdkConfig.getObject("branding");
const links = brandingConfig?.get("auth_footer_links") ?? [
+ /*
{ text: "Blog", url: "https://element.io/blog" },
{ text: "Twitter", url: "https://twitter.com/element_hq" },
{ text: "GitHub", url: "https://github.com/element-hq/element-web" },
+ */
+ { text: "About", url: "https://schildi.chat" },
+ { text: "GitHub", url: "https://github.com/schildichat/schildichat-desktop" },
];
const authFooterLinks: JSX.Element[] = [];
--
2.47.0

View File

@ -1,4 +1,4 @@
From 913772283fd2b9f682a11a594061a6a1189b7869 Mon Sep 17 00:00:00 2001
From 909d0c76ad56426699d9b8dfaebf818f21c09dd4 Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Tue, 18 Jan 2022 13:28:22 +0100
Subject: Disable sticky rooms

View File

@ -1,4 +1,4 @@
From e2045dd5dcbd82f7b5c4f98d89b258cc304d3e26 Mon Sep 17 00:00:00 2001
From 9cf40d600e00770aa7a56cebf5ab3413166e29e6 Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 5 May 2024 10:12:17 +0200
Subject: Bring back unified room list
@ -16,7 +16,7 @@ Co-authored-by: su-ex <codeworks@supercable.onl>
5 files changed, 83 insertions(+), 5 deletions(-)
diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx
index e27b2ca03f..311a54d9d8 100644
index 853bebc4fe..5af0c642bc 100644
--- a/src/components/views/rooms/RoomList.tsx
+++ b/src/components/views/rooms/RoomList.tsx
@@ -72,11 +72,13 @@ interface IState {
@ -98,7 +98,7 @@ index e27b2ca03f..311a54d9d8 100644
@@ -447,9 +475,16 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
SpaceStore.instance.off(UPDATE_SUGGESTED_ROOMS, this.updateSuggestedRooms);
RoomListStore.instance.off(LISTS_UPDATE_EVENT, this.updateLists);
if (this.dispatcherRef) defaultDispatcher.unregister(this.dispatcherRef);
defaultDispatcher.unregister(this.dispatcherRef);
+ SettingsStore.unwatchSetting(this.unifiedRoomListWatcherRef);
SdkContextClass.instance.roomViewStore.off(UPDATE_EVENT, this.onRoomViewStoreUpdate);
}
@ -124,10 +124,10 @@ index e27b2ca03f..311a54d9d8 100644
(this.props.activeSpace === MetaSpace.Favourites && orderedTagId !== DefaultTagID.Favourite) ||
(this.props.activeSpace === MetaSpace.People && orderedTagId !== DefaultTagID.DM) ||
diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx
index 76bb109cac..7aea53ceea 100644
index 1c27f03e88..ae4b0ea644 100644
--- a/src/settings/Settings.tsx
+++ b/src/settings/Settings.tsx
@@ -191,6 +191,14 @@ export interface IFeature extends Omit<IBaseSetting<boolean>, "isFeature"> {
@@ -192,6 +192,14 @@ export interface IFeature extends Omit<IBaseSetting<boolean>, "isFeature"> {
export type ISetting = IBaseSetting | IFeature;
export const SETTINGS: { [setting: string]: ISetting } = {

View File

@ -1,4 +1,4 @@
From 1d3847da55e91dfc5e555e69fbadcbc1d033a8d9 Mon Sep 17 00:00:00 2001
From 9fb400a94a190f910b731e3c5ea2c3ccdd91adce Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 17 Dec 2023 11:11:58 +0100
Subject: Don't sort muted rooms to bottom, I still want to see them.

View File

@ -1,4 +1,4 @@
From 0f0f80d270be5c88b0b762b51fe570c11b0bea7f Mon Sep 17 00:00:00 2001
From 96de5eb0667f130de17544eb104647f823b617b0 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

View File

@ -1,4 +1,4 @@
From bc49b8d30cf7e0da038fac992ee2ff04c9dc91aa Mon Sep 17 00:00:00 2001
From cc3db444dc3788e6eaca8db3bd77feccc0e2133d 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
@ -11,10 +11,10 @@ way.
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx
index 93fb42f447..09df8eaac9 100644
index 8351c176ff..a12fb141b9 100644
--- a/src/components/views/rooms/RoomTile.tsx
+++ b/src/components/views/rooms/RoomTile.tsx
@@ -304,7 +304,9 @@ export class RoomTile extends React.PureComponent<ClassProps, State> {
@@ -305,7 +305,9 @@ export class RoomTile extends React.PureComponent<ClassProps, State> {
// Only show the icon by default if the room is overridden to muted.
// TODO: [FTUE Notifications] Probably need to detect global mute state

View File

@ -1,4 +1,4 @@
From 10b23f715bf5115715dca07676ca467a6433c9c9 Mon Sep 17 00:00:00 2001
From 5b5635a2c649226fccdd47013c576a8e1789af4e 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
@ -8,7 +8,7 @@ Subject: Allow muted rooms to render as unread
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/RoomNotifs.ts b/src/RoomNotifs.ts
index cc027c9682..c4c31a51cb 100644
index 7c281d0d2d..f06be85437 100644
--- a/src/RoomNotifs.ts
+++ b/src/RoomNotifs.ts
@@ -255,7 +255,7 @@ export function determineUnreadState(

View File

@ -1,4 +1,4 @@
From 641cd216c155318e35eabef30761613706e36c87 Mon Sep 17 00:00:00 2001
From 532251811dbd3c3ff6ae43050acd6fb5140e20a0 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

View File

@ -1,4 +1,4 @@
From 2203554625f7c8d924981b3cd03b1389dc6873d9 Mon Sep 17 00:00:00 2001
From 920a48f9ec942635cd6a877f366e6c38abad9b11 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
@ -12,10 +12,10 @@ Co-authored-by: SpiritCroc <dev@spiritcroc.de>
2 files changed, 30 insertions(+)
diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx
index 7aea53ceea..b668c65dfd 100644
index ae4b0ea644..12d9965cf1 100644
--- a/src/settings/Settings.tsx
+++ b/src/settings/Settings.tsx
@@ -198,6 +198,11 @@ export const SETTINGS: { [setting: string]: ISetting } = {
@@ -199,6 +199,11 @@ export const SETTINGS: { [setting: string]: ISetting } = {
default: true,
controller: new ReloadOnChangeController(),
},

View File

@ -1,4 +1,4 @@
From 961ee28392810973057a0c8af410e1067a15547a Mon Sep 17 00:00:00 2001
From 8f81368ec09b41f996955b8a8fabcc594c194194 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
@ -118,10 +118,10 @@ index 4806ad4216..7d4a4353e2 100644
<Preview emoji={this.state.previewEmoji} />
) : (
diff --git a/src/components/views/emojipicker/ReactionPicker.tsx b/src/components/views/emojipicker/ReactionPicker.tsx
index 2c2eb442a0..62bfd2ea0f 100644
index b62df99e25..8291a38dc9 100644
--- a/src/components/views/emojipicker/ReactionPicker.tsx
+++ b/src/components/views/emojipicker/ReactionPicker.tsx
@@ -123,6 +123,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
@@ -126,6 +126,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
public render(): React.ReactNode {
return (
<EmojiPicker

View File

@ -1,4 +1,4 @@
From 794b8d3b7ccfbea95cba180b13de0ed42e7fc6c2 Mon Sep 17 00:00:00 2001
From 4980c7e816e83a3dce4106c8485461044591da26 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
@ -8,18 +8,18 @@ Subject: Allow reactions to take more space
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/res/css/views/messages/_ReactionsRowButton.pcss b/res/css/views/messages/_ReactionsRowButton.pcss
index f2e3885de4..2a8bb9224e 100644
index dd9d7ddb47..9ebe95021e 100644
--- a/res/css/views/messages/_ReactionsRowButton.pcss
+++ b/res/css/views/messages/_ReactionsRowButton.pcss
@@ -14,6 +14,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $secondary-hairline-color;
background-color: var(--cpd-color-gray-200);
user-select: none;
align-items: center;
+ max-width: calc(100% - 40px);;
&:hover {
border-color: $quinary-content;
@@ -29,7 +30,6 @@ Please see LICENSE files in the repository root for full details.
&.mx_ReactionsRowButton_selected {
background-color: $accent-300;
@@ -25,7 +26,6 @@ Please see LICENSE files in the repository root for full details.
}
.mx_ReactionsRowButton_content {

View File

@ -1,4 +1,4 @@
From b43bf7e8a183f36e30e9b79e3fc2dcd14afc6823 Mon Sep 17 00:00:00 2001
From b29702cd66f838ebe6af90fbf0b223caab3725b1 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
@ -10,10 +10,10 @@ Subject: On space switch don't automatically show last opened room
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx
index 1726c8462d..150f29d0b8 100644
index 80a648b5d5..f917d0bf7f 100644
--- a/src/components/structures/MatrixChat.tsx
+++ b/src/components/structures/MatrixChat.tsx
@@ -1448,7 +1448,15 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
@@ -1456,7 +1456,15 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
if (this.screenAfterLogin && this.screenAfterLogin.screen) {
this.showScreen(this.screenAfterLogin.screen, this.screenAfterLogin.params);
this.screenAfterLogin = undefined;
@ -30,7 +30,7 @@ index 1726c8462d..150f29d0b8 100644
// Before defaulting to directory, show the last viewed room
this.viewLastRoom();
} else {
@@ -1460,6 +1468,14 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
@@ -1468,6 +1476,14 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
}
@ -46,10 +46,10 @@ index 1726c8462d..150f29d0b8 100644
dis.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx
index b668c65dfd..be4433e1bc 100644
index 12d9965cf1..3e9fb95799 100644
--- a/src/settings/Settings.tsx
+++ b/src/settings/Settings.tsx
@@ -203,6 +203,12 @@ export const SETTINGS: { [setting: string]: ISetting } = {
@@ -204,6 +204,12 @@ export const SETTINGS: { [setting: string]: ISetting } = {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: true,
},

View File

@ -1,4 +1,4 @@
From 3aa2246c56ae3e5b7703003ef785d6e3ad77b844 Mon Sep 17 00:00:00 2001
From 7d9fafb12e3bf1768e32b39ecf00b973309e6c1b 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

View File

@ -1,4 +1,4 @@
From 288aa3cf8e56a4ca60810eac98fb6f692b154f61 Mon Sep 17 00:00:00 2001
From 9a1518e041fa2d5364885725b259378952a2b445 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
@ -8,7 +8,7 @@ Subject: Stop the search bar wobble
1 file changed, 1 insertion(+)
diff --git a/res/css/_common.pcss b/res/css/_common.pcss
index 05a3dac067..7861af6381 100644
index 15ba02b6b8..f9bcd695ca 100644
--- a/res/css/_common.pcss
+++ b/res/css/_common.pcss
@@ -181,6 +181,7 @@ input[type="search"].mx_textinput_icon {

View File

@ -1,16 +1,14 @@
From a4bca41b7371c42499fd8c805482066514a9edc2 Mon Sep 17 00:00:00 2001
From e5b9cc85889d539da3d4acff20cf8b3199ae94e3 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
res/css/_common.pcss | 1 +
1 file changed, 1 insertion(+)
diff --git a/res/css/_common.pcss b/res/css/_common.pcss
index 7861af6381..f7a660a339 100644
index f9bcd695ca..ad7c298820 100644
--- a/res/css/_common.pcss
+++ b/res/css/_common.pcss
@@ -11,6 +11,7 @@ Please see LICENSE files in the repository root for full details.
@ -21,14 +19,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

View File

@ -1,4 +1,4 @@
From fc577303d8c2d290f1c17e13deaf442822af68a1 Mon Sep 17 00:00:00 2001
From 124ee073c6de89d111823c94922d7d2eeb596a0b 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
@ -8,7 +8,7 @@ Subject: No damn avatar background in room list
1 file changed, 3 insertions(+)
diff --git a/src/components/structures/BackdropPanel.tsx b/src/components/structures/BackdropPanel.tsx
index 80c21235cc..a9c464f4b2 100644
index 32c75a936e..f420bdbc7b 100644
--- a/src/components/structures/BackdropPanel.tsx
+++ b/src/components/structures/BackdropPanel.tsx
@@ -13,6 +13,9 @@ interface IProps {

View File

@ -1,4 +1,4 @@
From e4a7ea01c2fd9f7d67660402c20bfdc5969f28c4 Mon Sep 17 00:00:00 2001
From ca4fa33dda5812b259c4391171358a50beb812fd 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
@ -8,7 +8,7 @@ Subject: No red messages in 1:1 chats Close SchildiChat/schildichat-desktop#13
1 file changed, 6 insertions(+)
diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx
index 746cceabd8..3e5879f7ad 100644
index 22da73bef7..455a57e33d 100644
--- a/src/components/views/rooms/EventTile.tsx
+++ b/src/components/views/rooms/EventTile.tsx
@@ -685,6 +685,12 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>

View File

@ -1,4 +1,4 @@
From a37ca889b832578a9201a5b45b059f58eb781bc5 Mon Sep 17 00:00:00 2001
From 45fea7a503d58e70e876bf5c94e5731fbed85551 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
@ -8,10 +8,10 @@ Subject: Always apply corner radius to all edges of the bubble
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/res/css/views/rooms/_EventBubbleTile.pcss b/res/css/views/rooms/_EventBubbleTile.pcss
index ec443c44de..8e0f3cf1b6 100644
index 3a42cde9bb..a5f5480010 100644
--- a/res/css/views/rooms/_EventBubbleTile.pcss
+++ b/res/css/views/rooms/_EventBubbleTile.pcss
@@ -277,6 +277,8 @@ Please see LICENSE files in the repository root for full details.
@@ -283,6 +283,8 @@ Please see LICENSE files in the repository root for full details.
margin-inline: var(--EventTile_bubble_line-margin-inline-start) var(--EventTile_bubble_line-margin-inline-end);
border-top-left-radius: var(--cornerRadius);
border-top-right-radius: var(--cornerRadius);
@ -20,7 +20,7 @@ index ec443c44de..8e0f3cf1b6 100644
/* the selector here is quite weird because timestamps can appear linked & unlinked and in different places */
/* in the DOM depending on the specific rendering context */
@@ -371,7 +373,7 @@ Please see LICENSE files in the repository root for full details.
@@ -377,7 +379,7 @@ Please see LICENSE files in the repository root for full details.
}
&.mx_EventTile_continuation[data-self="false"] .mx_EventTile_line {
@ -29,7 +29,7 @@ index ec443c44de..8e0f3cf1b6 100644
.mx_MImageBody .mx_MImageBody_thumbnail_container,
.mx_MVideoBody .mx_MVideoBody_container,
@@ -379,7 +381,7 @@ Please see LICENSE files in the repository root for full details.
@@ -385,7 +387,7 @@ Please see LICENSE files in the repository root for full details.
.mx_MediaBody,
.mx_MLocationBody_map,
.mx_MBeaconBody {
@ -38,7 +38,7 @@ index ec443c44de..8e0f3cf1b6 100644
}
}
&.mx_EventTile_lastInSection[data-self="false"] .mx_EventTile_line {
@@ -396,7 +398,7 @@ Please see LICENSE files in the repository root for full details.
@@ -402,7 +404,7 @@ Please see LICENSE files in the repository root for full details.
}
&.mx_EventTile_continuation[data-self="true"] .mx_EventTile_line {
@ -47,7 +47,7 @@ index ec443c44de..8e0f3cf1b6 100644
.mx_MImageBody .mx_MImageBody_thumbnail_container,
.mx_MVideoBody .mx_MVideoBody_container,
@@ -404,7 +406,7 @@ Please see LICENSE files in the repository root for full details.
@@ -410,7 +412,7 @@ Please see LICENSE files in the repository root for full details.
.mx_MediaBody,
.mx_MLocationBody_map,
.mx_MBeaconBody {

View File

@ -1,4 +1,4 @@
From 57942189da5f80069ee4b03dc2fbeb24ce6b4f7b Mon Sep 17 00:00:00 2001
From 61195cdcca6e390e179b776726bab89cc56e6fca 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
@ -8,10 +8,10 @@ Subject: Always show timestamps by default
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx
index be4433e1bc..1052bca0c9 100644
index 3e9fb95799..b76ec5feb2 100644
--- a/src/settings/Settings.tsx
+++ b/src/settings/Settings.tsx
@@ -662,7 +662,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
@@ -644,7 +644,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
"alwaysShowTimestamps": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("settings|always_show_message_timestamps"),

View File

@ -1,4 +1,4 @@
From 47bcb08e971256fe94a0b07fb553b75400e648ed Mon Sep 17 00:00:00 2001
From 457d402a9f2d854efceb14cd6bd573db6c09175d 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
@ -8,10 +8,10 @@ Subject: Enable custom emote rendering by default
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx
index 1052bca0c9..f5fcb5d7a5 100644
index b76ec5feb2..51404c88d4 100644
--- a/src/settings/Settings.tsx
+++ b/src/settings/Settings.tsx
@@ -514,7 +514,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
@@ -508,7 +508,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
description: _td("labs|render_reaction_images_description"),
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG_PRIORITISED,
supportedLevelsAreOrdered: true,

View File

@ -0,0 +1,25 @@
From 9f640ce10fd0903be3c33e76ba1842112e659d5f Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Sun, 27 Oct 2024 19:24:26 +0100
Subject: Enable chat previews by default
---
src/stores/room-list/ListLayout.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/stores/room-list/ListLayout.ts b/src/stores/room-list/ListLayout.ts
index 275b6d330b..3a188451e7 100644
--- a/src/stores/room-list/ListLayout.ts
+++ b/src/stores/room-list/ListLayout.ts
@@ -18,7 +18,7 @@ interface ISerializedListLayout {
export class ListLayout {
private _n = 0;
- private _previews = false;
+ private _previews = true;
private _collapsed = false;
public constructor(public readonly tagId: TagID) {
--
2.47.0

View File

@ -0,0 +1,26 @@
From 7fb604f189e547daf72cd93ce53f8a76c733c321 Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Thu, 31 Oct 2024 17:33:32 +0100
Subject: Fix captions in bubble layout
Image height of 100% combined with overflow-y: hidden was causing
caption to be invisible in bubble layout.
---
res/css/views/rooms/_EventBubbleTile.pcss | 1 -
1 file changed, 1 deletion(-)
diff --git a/res/css/views/rooms/_EventBubbleTile.pcss b/res/css/views/rooms/_EventBubbleTile.pcss
index a5f5480010..fbb1ad2e1b 100644
--- a/res/css/views/rooms/_EventBubbleTile.pcss
+++ b/res/css/views/rooms/_EventBubbleTile.pcss
@@ -336,7 +336,6 @@ Please see LICENSE files in the repository root for full details.
.mx_MImageBody {
width: 100%;
- height: 100%;
.mx_MImageBody_thumbnail.mx_MImageBody_thumbnail--blurhash {
position: unset;
--
2.47.0

View File

@ -0,0 +1,297 @@
From 18578fe4ac6838b2d70a4efb029a75ab24087dab Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <luixxiul@users.noreply.github.com>
Date: Thu, 31 Oct 2024 13:44:20 -0400
Subject: Improve IRC layout for SchildiChat
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---
.../elements/_GenericEventListSummary.pcss | 15 ++
res/css/views/rooms/_EventTile.pcss | 146 ++++++++++++++++--
res/css/views/rooms/_IRCLayout.pcss | 2 +
3 files changed, 153 insertions(+), 10 deletions(-)
diff --git a/res/css/views/elements/_GenericEventListSummary.pcss b/res/css/views/elements/_GenericEventListSummary.pcss
index c13f819439..4f42040606 100644
--- a/res/css/views/elements/_GenericEventListSummary.pcss
+++ b/res/css/views/elements/_GenericEventListSummary.pcss
@@ -1,5 +1,6 @@
/*
Copyright 2024 New Vector Ltd.
+Copyright 2024 Suguru Hirahara
Copyright 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
@@ -36,6 +37,20 @@ Please see LICENSE files in the repository root for full details.
}
}
+ &[data-layout="irc"] {
+ .mx_GenericEventListSummary_avatars {
+ vertical-align: text-bottom; /* Align with mx_GenericEventListSummary_summary */
+
+ > * {
+ line-height: inherit; /* Same size as avatar height */
+ }
+ }
+
+ .mx_GenericEventListSummary_summary {
+ line-height: var(--irc-line-height); /* Override the declaration by mx_TextualEvent */
+ }
+ }
+
&[data-layout="group"] {
margin-top: $spacing-8;
}
diff --git a/res/css/views/rooms/_EventTile.pcss b/res/css/views/rooms/_EventTile.pcss
index 311e059166..501a9210cf 100644
--- a/res/css/views/rooms/_EventTile.pcss
+++ b/res/css/views/rooms/_EventTile.pcss
@@ -1,5 +1,6 @@
/*
Copyright 2024 New Vector Ltd.
+Copyright 2024 Suguru Hirahara
Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
Copyright 2015, 2016 OpenMarket Ltd
@@ -279,6 +280,10 @@ $left-gutter: 64px;
align-items: flex-start;
padding-top: 0;
+ * {
+ line-height: var(--line-height); /* Unify the line-height value for IRC layout. The value is applied by default to everything under data-layout="irc", enabling declarations with more specificity to override the value as this is not enforced with "!important" */
+ }
+
> a {
text-decoration: none; /* timestamps are links which shouldn't be underlined */
min-width: var(--MessageTimestamp-width); /* ensure space for EventTile without timestamp */
@@ -286,6 +291,7 @@ $left-gutter: 64px;
> * {
margin-right: var(--right-padding);
+ padding-block: var(--EventTile_irc_line-padding-block); /* Unify block padding value of anything directly under mx_EventTile */
}
.mx_EventTile_avatar,
@@ -321,17 +327,46 @@ $left-gutter: 64px;
width: var(--name-width);
margin-inline-end: 0; /* override mx_EventTile > * */
+ /* Align elements to the end side */
+ display: block;
+ text-align: end;
+
+ --sc-border-radius-8px: 8px; /* TODO: customize the variable per out taste */
+ border-start-start-radius: var(--sc-border-radius-8px, 3px);
+ border-end-start-radius: var(--sc-border-radius-8px, 3px);
+
+ /* Set $accent as default color, in order to make ellipsis rendered with the accent color (green, by default) */
+ color: $accent;
+
+ &:hover {
+ background-color: $event-selected-color;
+
+ /* This removes top left and bottom left corders from mx_EventTile_line, if just mx_DisambiguatedProfile is hovered. This enables the highlight line to be rendered straight without being dent by those corners. Please note that they do appear if just mx_EventTile_line is hovered. */
+ & ~ .mx_EventTile_line {
+ border-start-start-radius: 0;
+ border-end-start-radius: 0;
+ }
+ }
+
> .mx_DisambiguatedProfile_displayName {
width: 100%;
text-align: end;
overflow: hidden;
text-overflow: ellipsis;
+ padding-inline-end: var(--right-padding); /* Add padding between displayName and mx_EventTile_line */
}
> .mx_DisambiguatedProfile_mxid {
- visibility: collapse;
+ /* On the upstream, appearance of mxid on disambiguatedProfile is managed by
+ "visibility" property. Since it renders mxid hiding it and pushes
+ displayName to the left side, we need to use display property instead. */
+ display: none;
+
margin-left: 0; /* Override the inherited margin. */
padding: 0 5px;
+ padding-inline-start: 0; /* Remove the value specified on upstream since var(--right-padding) is specified for mx_DisambiguatedProfile_displayName above */
+
+ color: $primary-content; /* Override the color specified above to make the mxid rendered as $primary-content (black, by default) */
}
&:hover {
@@ -343,17 +378,66 @@ $left-gutter: 64px;
display: inline;
background-color: $event-selected-color;
border-radius: 8px 0 0 8px;
- padding-right: $spacing-8;
+ padding-inline-end: var(--right-padding);
}
> .mx_DisambiguatedProfile_mxid {
- visibility: visible;
+ display: inline-block; /* Make var(--irc-line-height) work */
+
opacity: 1;
background-color: $event-selected-color;
}
}
}
+ /* Need to use important to override the js provided height and width values. */
+ .mx_BaseAvatar,
+ .mx_BaseAvatar > * {
+ height: $font-14px !important;
+ width: $font-14px !important;
+ flex-shrink: 0; /* Prevents the avatar from shrinking (when mx_DisambiguatedProfile_displayName is long) */
+ }
+
+ /* Fill the pill with the avatar */
+ /* TODO: Adjust the size for IRC layout */
+ .mx_Pill {
+ .mx_BaseAvatar,
+ .mx_BaseAvatar > * {
+ height: $font-16px !important; /* override the value specified above */
+ width: $font-16px !important; /* override the value specified above */
+ }
+ }
+
+ .mx_EventTile_bigEmoji {
+ line-height: initial; /* Reset global line-height value inside IRC EventTile */
+
+ .mx_Emoji {
+ line-height: unset;
+ }
+ }
+
+ .mx_EventTile_content {
+ .markdown-body {
+ > * {
+ margin-bottom: 4px; /* Unify block end margin for elements like blockquote */
+ }
+
+ > p {
+ margin-bottom: 1rem; /* Re-add block end margin to unify the margin for paragraphs with or without annotation */
+ }
+
+ code:not(pre *) {
+ padding-block: 0; /* Remove block padding to avoid line height overflow */
+ }
+
+ .mx_EventTile_pre_container {
+ pre {
+ margin-bottom: 0; /* Remove default block end margin */
+ }
+ }
+ }
+ }
+
.mx_EventTile_e2eIcon {
padding: 0;
flex-grow: 0;
@@ -365,9 +449,8 @@ $left-gutter: 64px;
.mx_TextualEvent,
.mx_ViewSourceEvent,
.mx_MTextBody {
- /* add a 1px padding top and bottom because our larger
- emoji font otherwise gets cropped by anti-zalgo */
- padding: var(--EventTile_irc_line-padding-block) 0;
+ /* Cancel the padding specified by the upstream as it is taken care of by padding var(--EventTile_irc_line-padding-block) */
+ padding: unset;
}
.mx_EventTile_e2eIcon,
@@ -405,8 +488,36 @@ $left-gutter: 64px;
}
}
- .mx_ReplyChain {
- margin: 0;
+ .mx_ReplyChain_wrapper {
+ .mx_ReplyChain {
+ margin: 0;
+
+ .mx_ReplyTile {
+ padding-block: unset; /* Unset the inherited value */
+ }
+
+ .mx_DisambiguatedProfile {
+ line-height: var(--irc-line-height);
+
+ /* Stop mxid from moving avatar up on ReplyChain by resetting display
+ value "none" specified above */
+ /* Mind the difference of avatar placement between on upstream's
+ mx_EventTile and mx_ReplyTile_sender */
+ > .mx_DisambiguatedProfile_mxid {
+ display: unset;
+ }
+
+ &:hover {
+ overflow: hidden; /* Override "overflow: visible" specified by the upstream */
+ }
+ }
+ }
+
+ /* Align avatar inside ReplyChain (ReplyTile) */
+ /* "In reply to" line */
+ div:first-of-type blockquote.mx_ReplyChain {
+ padding-bottom: 2px; /* Add padding between "In reply to" line and the replied content */
+ }
}
.mx_MessageTimestamp {
@@ -459,8 +570,14 @@ $left-gutter: 64px;
&.mx_EventTile_emote {
.mx_EventTile_avatar {
- /* add --right-padding value of MessageTimestamp only */
- margin-left: calc(var(--name-width) + var(--icon-width) + 1 * var(--right-padding));
+ /* Required for the avatar to reserve spacing between timestamp and the avatar */
+ margin-left: var(--name-width); /* Align emote with other EventTile */
+ }
+
+ &.mx_EventTile_info {
+ .mx_EventTile_avatar {
+ margin-left: unset; /* Required for hidden events for emote */
+ }
}
}
@@ -642,6 +759,15 @@ $left-gutter: 64px;
var(--name-width) + var(--icon-width) + var(--MessageTimestamp-width) + 2 * var(--right-padding)
);
}
+
+ .mx_EventTile_line .mx_RedactedBody {
+ line-height: var(--line-height); /* Unify the line-height value for IRC layout by overwriting the line-height value specified on upstream _EventTile.pcss */
+
+ &::before {
+ height: var(--line-height); /* Set the line height value to the trash icon */
+ top: 0px; /* Remove the value specified by the upstream as this is no longer needed */
+ }
+ }
}
&[data-layout="group"] {
diff --git a/res/css/views/rooms/_IRCLayout.pcss b/res/css/views/rooms/_IRCLayout.pcss
index ecf1c25716..de85238ca6 100644
--- a/res/css/views/rooms/_IRCLayout.pcss
+++ b/res/css/views/rooms/_IRCLayout.pcss
@@ -1,5 +1,6 @@
/*
Copyright 2024 New Vector Ltd.
+Copyright 2024 Suguru Hirahara
Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
@@ -15,6 +16,7 @@ Please see LICENSE files in the repository root for full details.
--icon-width: 14px;
--line-height: var(--irc-line-height);
--right-padding: 5px;
+ --cpd-font-line-height-regular: var(--irc-line-height); /* Unify the line-height value for IRC layout */
line-height: var(--line-height) !important;
--
2.47.0

View File

@ -1,56 +0,0 @@
From 63901825c14da3ec6f59017d2696ad98be91d2e0 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
---
src/@types/media.ts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/@types/media.ts b/src/@types/media.ts
index 1128b40d3..d85526642 100644
--- a/src/@types/media.ts
+++ b/src/@types/media.ts
@@ -189,6 +189,9 @@ export interface FileContent extends BaseContent {
* One of: [m.file].
*/
msgtype: MsgType.File;
+
+ format?: string;
+ formatted_body?: string;
}
/**
@@ -205,6 +208,9 @@ export interface ImageContent extends BaseContent {
* One of: [m.image].
*/
msgtype: MsgType.Image;
+
+ format?: string;
+ formatted_body?: string;
}
/**
@@ -221,6 +227,9 @@ export interface AudioContent extends BaseContent {
* One of: [m.audio].
*/
msgtype: MsgType.Audio;
+
+ format?: string;
+ formatted_body?: string;
}
/**
@@ -237,6 +246,9 @@ export interface VideoContent extends BaseContent {
* One of: [m.video].
*/
msgtype: MsgType.Video;
+
+ format?: string;
+ formatted_body?: string;
}
/**
--
2.47.0

View File

@ -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

View File

@ -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

View File

@ -21,14 +21,12 @@ get_branch_of() {
}
b_js=`get_branch_of matrix-js-sdk`
b_react=`get_branch_of matrix-react-sdk`
b_web=`get_branch_of element-web`
b_desktop=`get_branch_of element-desktop`
if [ "$b_js" != "$b_react" ] || [ "$b_react" != "$b_web" ] || [ "$b_web" != "$b_desktop" ]; then
if [ "$b_js" != "$b_web" ] || [ "$b_web" != "$b_desktop" ]; then
echo "Detected branch name mismatch!"
echo "js-sdk: $b_js"
echo "react-sdk: $b_react"
echo "element-web: $b_web"
echo "element-desktop: $b_desktop"
exit 1
@ -37,4 +35,4 @@ fi
branch="$b_js"
echo "Pushing to all repos: $branch"
forall_repos git push --set-upstream origin "$branch" "$@"
for_main_repos git push --set-upstream origin "$branch" "$@"

View File

@ -88,6 +88,7 @@
--cpd-color-gray-200: #212121;
--cpd-color-gray-100: #171717;
--cpd-color-theme-bg: #171717;
--cpd-color-tooltip-bg: #424242;
}
.cpd-theme-light.cpd-theme-light {
@ -171,4 +172,5 @@
--cpd-color-gray-200: #f5f5f5;
--cpd-color-gray-100: #fafafa;
--cpd-color-theme-bg: #ffffff;
--cpd-color-tooltip-bg: #f5f5f5;
}

View File

@ -10,8 +10,7 @@ $yarn link
$yarn install
popd
pushd matrix-react-sdk
$yarn link matrix-js-sdk
pushd compound-web
$yarn unlink &>/dev/null || true
$yarn link
$yarn install
@ -19,7 +18,7 @@ popd
pushd element-web
$yarn link matrix-js-sdk
$yarn link matrix-react-sdk
$yarn link @vector-im/compound-web
$yarn install
popd
@ -36,4 +35,14 @@ $yarn install
popd
# CSS overrides
cp res/css/* matrix-react-sdk/res/css/
cp res/css/* element-web/res/css/
# Ensure appropriate .gitignore to avoid unnecessary dirty repos
# when re-running setup. merge_upstream.sh will include this into the
# "Automatic setup commit".
if grep -q res/css/sc- element-web/.gitignore; then
echo "Skip updating .gitignore, already looks ok"
else
echo "Updating .gitignore"
echo -e "\nres/css/sc-*.css" >> element-web/.gitignore
fi

View File

@ -6,7 +6,7 @@ shopt -s globstar
mydir="$(dirname "$(realpath "$0")")"
automatic_commit="$1"
pushd "$mydir/matrix-react-sdk" > /dev/null
pushd "$mydir/element-web" > /dev/null
if [[ "$automatic_commit" == [Yy]* ]]; then
# Require clean git state