diff --git a/Containerfile.debian b/Containerfile.debian index 86614ba..041c64e 100644 --- a/Containerfile.debian +++ b/Containerfile.debian @@ -1,5 +1,5 @@ ARG NODE_VERSION -FROM docker.io/node:${NODE_VERSION}-bookworm +FROM node:${NODE_VERSION} RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \ curl \ @@ -14,15 +14,17 @@ RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \ make \ openssl \ pkg-config \ - python3 \ - rpm \ + python \ tcl \ vim -RUN ln -s /usr/bin/python3 /usr/bin/python ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATH RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal +COPY . /project WORKDIR /project + +# There might be remnants of the host which break the build +RUN make fixup \ No newline at end of file diff --git a/Containerfile.fedora b/Containerfile.fedora index d1074da..a61578c 100644 --- a/Containerfile.fedora +++ b/Containerfile.fedora @@ -1,6 +1,6 @@ -FROM docker.io/fedora:40 +FROM fedora:latest -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 rust cargo llvm libsecret libsecret-devel g++ ruby-devel gcc make rpm-build libffi-devel tcl libxcrypt-compat # node setup ARG NODE_VERSION @@ -12,11 +12,9 @@ RUN npm install -g n RUN npm install -g yarn RUN npm install -g node-gyp RUN gem install --no-user-install --no-document fpm -RUN ln -s /usr/bin/python3 /usr/bin/python - -ENV RUSTUP_HOME=/usr/local/rustup \ - CARGO_HOME=/usr/local/cargo \ - PATH=/usr/local/cargo/bin:$PATH -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal +COPY . /project WORKDIR /project + +# There might be remnants of the host which break the build +RUN make fixup diff --git a/Containerfile.windows b/Containerfile.windows deleted file mode 100644 index 0c0776a..0000000 --- a/Containerfile.windows +++ /dev/null @@ -1,13 +0,0 @@ -ARG CONTAINER_IMAGE_DEBIAN -FROM ${CONTAINER_IMAGE_DEBIAN}:latest - -RUN dpkg --add-architecture i386 && apt-get update && apt-get install --no-install-recommends -y \ - wine \ - wine32 \ - wine64 \ - libwine \ - libwine:i386 \ - fonts-wine \ - zip - -WORKDIR /project \ No newline at end of file diff --git a/FEATURES.md b/FEATURES.md deleted file mode 100644 index 05b8736..0000000 --- a/FEATURES.md +++ /dev/null @@ -1,28 +0,0 @@ -# Features and changes compared to upstream - -Note that this list may be incomplete or outdated. - - -## General UI - -... TODO Schildi theme? - - -## Chat overview ("room list") - -- Unified room list instead of separating DMs and groups (TODO: setting) -- Do not exclude currently selected room when updating room sort order -- Do not force muted rooms to be sorted at the bottom -- Hide reactions from room previews -- Show unread state of muted rooms -- Increase default visible tiles before collapsing each section -- Include DMs in space unread counts -- Show space overview rather then jumping to last opened room when switching space -- Do not add spaces to recently opened rooms list ("breadcrumbs") - - -## Conversation screen - -- Render captions -- Allow sending freeform reactions -- Less restrictive width limit for rendering text reactions diff --git a/Makefile b/Makefile index ab3280b..205cea9 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ .PHONY: all setup regenerate-i18n web desktop-common linux debian rpm pacman local-pkgbuild local-pkgbuild-install windows windows-portable .PHONY: web-release debian-release rpm-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release .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: container-build-debian container-build-fedora +.PHONY: container-web-release container-debian-release container-rpm-release container-appimage-release .PHONY: clean undo_setup fixup .PHONY: fix_yarn_cache @@ -12,11 +12,10 @@ all: web YARN ?= yarnpkg CONTAINER_ENGINE ?= podman -NODE_VERSION ?= 22 +NODE_VERSION ?= 16 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|') @@ -40,7 +39,6 @@ OUT_MACOS_MAS := $(DESKTOP_OUT)/mas-universal/$(PRODUCT_NAME).app CONTAINER_IMAGE_DEBIAN := schildichat-desktop-containerbuild-debian CONTAINER_IMAGE_FEDORA := schildichat-desktop-containerbuild-fedora -CONTAINER_IMAGE_WINDOWS := schildichat-desktop-containerbuild-windows RELEASE_DIR := release CURRENT_RELEASE_DIR := $(RELEASE_DIR)/$(VERSION) @@ -78,7 +76,7 @@ web: setup desktop-common: web $(YARN) --cwd element-desktop run fetch --cfgdir '' - SQLCIPHER_BUNDLED=1 $(YARN) --cwd element-desktop run build:native + SQLCIPHER_STATIC=1 $(YARN) --cwd element-desktop run build:native macos-common: web icns $(YARN) --cwd element-desktop run fetch --cfgdir '' @@ -164,38 +162,22 @@ macos-mas-release: macos-mas cp $(OUT_MACOS_MAS) $(CURRENT_RELEASE_DIR) container-build-debian: - $(CONTAINER_ENGINE) build --security-opt seccomp=unconfined --security-opt label=disable -t $(CONTAINER_IMAGE_DEBIAN) -f Containerfile.debian --build-arg NODE_VERSION=$(NODE_VERSION) . + $(CONTAINER_ENGINE) build -t $(CONTAINER_IMAGE_DEBIAN) -f Containerfile.debian --build-arg NODE_VERSION=$(NODE_VERSION) . container-build-fedora: - $(CONTAINER_ENGINE) build --security-opt seccomp=unconfined --security-opt label=disable -t $(CONTAINER_IMAGE_FEDORA) -f Containerfile.fedora --build-arg NODE_VERSION=$(NODE_VERSION) . - -container-build-windows: container-build-debian - $(CONTAINER_ENGINE) build --security-opt seccomp=unconfined --security-opt label=disable -t $(CONTAINER_IMAGE_WINDOWS) -f Containerfile.windows --build-arg CONTAINER_IMAGE_DEBIAN=$(CONTAINER_IMAGE_DEBIAN) . + $(CONTAINER_ENGINE) build -t $(CONTAINER_IMAGE_FEDORA) -f Containerfile.fedora --build-arg NODE_VERSION=$(NODE_VERSION) . container-web-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 + $(CONTAINER_ENGINE) run --rm -ti -v $(PWD)/release:/project/release --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make web-release 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 + $(CONTAINER_ENGINE) run --rm -ti -v $(PWD)/release:/project/release --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make debian-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 + $(CONTAINER_ENGINE) run --rm -ti -v $(PWD)/release:/project/release --security-opt label=disable $(CONTAINER_IMAGE_FEDORA):latest make rpm-release container-appimage-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 appimage-release - -container-windows-release: container-build-windows - $(CONTAINER_ENGINE) run --rm -ti -v $(PWD):/project --security-opt seccomp=unconfined --security-opt label=disable $(CONTAINER_IMAGE_WINDOWS):latest make windows-release - -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 - -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 + $(CONTAINER_ENGINE) run --rm -ti -v $(PWD)/release:/project/release --security-opt label=disable $(CONTAINER_IMAGE_DEBIAN):latest make appimage-release bom.lock: element-desktop/yarn.lock element-web/yarn.lock matrix-js-sdk/yarn.lock matrix-react-sdk/yarn.lock ./build-bom.sh @@ -209,7 +191,7 @@ clean: $(YARN) --cwd matrix-react-sdk clean $(YARN) --cwd element-web clean $(YARN) --cwd element-desktop clean - rm -f element-desktop/webapp || true + rm -f element-desktop/webapp rm -rf element-web/dist rm -rf local-pkgbuild rm -f bom.lock diff --git a/README.md b/README.md index b34abad..9b1ea85 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,32 @@ # SchildiChat Web/Desktop -SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/element-hq/element-web)/[Desktop](https://github.com/element-hq/element-desktop). +SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/vector-im/element-web)/[Desktop](https://github.com/vector-im/element-desktop). +The most important changes of SchildiChat Web/Desktop compared to Element Web/Desktop are: +- Customizable room list style (compact single line, intermediate and roomy with two line preview) +- Option to show direct and group chats in a combined list +- Improved theming options +- Message bubbles +- … and more! +Desktop downloads with installation instructions are listed on our website: [https://schildi.chat/desktop](https://schildi.chat/desktop) +Hosted web variant: [https://app.schildi.chat/](https://app.schildi.chat/) -## Old build instructions, to be revised in the future +Feel free to [join the discussion on matrix](https://matrix.to/#/#schildichat-web:matrix.org). + + + +
+Public key used to sign the Debian packages + +``` +pub rsa4096 2020-12-08 [SC] + 560BB70DA86A6633A39CEC6023358905FE294D01 +uid Super apt repo key +sub rsa4096 2020-12-08 [E] +``` + +
## Building SchildiChat Web/Desktop @@ -73,7 +95,7 @@ To notarize a build with Apple set `NOTARIZE_APPLE_ID` to your AppleID and set t 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 +git clone -b master --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git cd schildichat-desktop make setup # optional step if using the other make targets ``` @@ -113,13 +135,3 @@ your-deploy-%: CFGDIR := $(YOUR_CFGDIR) your-deploy-web: web rsync --info=progress2 -rup --del element-web/webapp/ you@yourwebserver:/the/folder/served/for/schildi/ ``` - - -# Merge helpers - -## Add upstream repo remotes - -``` -source merge_helpers.sh -forall_repos add_upstream -``` diff --git a/apply_patches.sh b/apply_patches.sh deleted file mode 100755 index 8d581f9..0000000 --- a/apply_patches.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e - -mydir="$(dirname "$(realpath "$0")")" - -print_section() { - local msg="$1" - echo "##############################################################" - echo "# $msg" - echo "##############################################################" -} - -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 element-desktop" -apply_patches element-desktop - -# Automatic adjustments -#print_section "Apply i18n" -#automatic_i18n_adjustment -print_section "Apply automatic package adjustments" -automatic_packagejson_adjustment - -# Automatic theme and icon update -print_section "Apply automatic theme updates" -./theme.sh y -print_section "Generate icons" -./graphics/icon_gen.sh y - -popd > /dev/null diff --git a/deploy/create-github-release.sh b/deploy/create-github-release.sh index 63c327c..b93f7d5 100755 --- a/deploy/create-github-release.sh +++ b/deploy/create-github-release.sh @@ -10,16 +10,12 @@ set -e version="$1" releasepath="$2" -if [ -z "$GITHUB_API_TOKEN" ]; then - github_api_token=`cat ~/githubtoken` -else - github_api_token="$GITHUB_API_TOKEN" -fi +github_api_token=`cat ~/githubtoken` release_notes_file="/tmp/scrn.md" owner=SchildiChat repo=schildichat-desktop -target=lite +target=master # Define variables GH_API="https://api.github.com" @@ -41,7 +37,7 @@ json_string=`jq -n --arg tag "v$version" --arg target "$target" --arg body "$rel name: $tag, body: $body, draft: true, - prerelease: true + prerelease: false }'` # echo "$json_string" res=`echo "$json_string" | curl -sH "$AUTH" $GH_REPO/releases -d @-` diff --git a/element-desktop b/element-desktop index 96aa172..16d3620 160000 --- a/element-desktop +++ b/element-desktop @@ -1 +1 @@ -Subproject commit 96aa1725d46fe9858108eff051711838da2d60fc +Subproject commit 16d3620517cd22e92b52807bc7eb6cc8b4414780 diff --git a/element-web b/element-web index 60754c1..e5afedf 160000 --- a/element-web +++ b/element-web @@ -1 +1 @@ -Subproject commit 60754c17d92a1e8d9790dfb476f703949b60ce47 +Subproject commit e5afedfac20168e491fc9a2b59cd1c8a07c3c35c diff --git a/flake.lock b/flake.lock index d010aa2..271a3d0 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1699380656, - "narHash": "sha256-H9kQH3J2Z15Ady3zVQsN/tXv8qnRr+p1B0eUkR1bKfE=", + "lastModified": 1633901457, + "narHash": "sha256-GNJLwKENqEA4xlzkWI76VLHBAua4LUIlTeeiH4FR7Gc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "03e7a22654c44489a0a70ea0e237de3e512cd8a6", + "rev": "f358794824b4595d77fec93732485d329ed7b0e0", "type": "github" }, "original": { diff --git a/generate_patches.sh b/generate_patches.sh deleted file mode 100755 index 4a2771d..0000000 --- a/generate_patches.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -set -e - -mydir="$(dirname "$(realpath "$0")")" -pushd "$mydir" > /dev/null - -source ./merge_helpers.sh - -persist_patches() { - local repo="$(realpath "$1")" - local patch_dir="$SCHILDI_ROOT/patches/$(basename "$1")" - if [ ! -d "$repo" ]; then - echo "Unknown repo: $repo" - return 1 - fi - - pushd "$repo" - - if [ -d "$patch_dir" ]; then - echo "Clearing old patches..." - rm "$patch_dir"/* - else - echo "Creating new patch dir $patch_dir..." - mkdir "$patch_dir" - fi - echo "Creating new patches" - git format-patch -k upstream/master.. -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 {} \; - find "$patch_dir" -name "*-Automatic-theme-update.patch" -exec rm {} \; - find "$patch_dir" -name "*-Automatic-setup-commit.patch" -exec rm {} \; - find "$patch_dir" -name "*-Update-version-to-*.patch" -exec rm {} \; - popd -} - -persist_patches element-desktop -#persist_patches element-web -persist_patches matrix-react-sdk -persist_patches matrix-js-sdk - -popd > /dev/null diff --git a/graphics/feature_image.svg b/graphics/feature_image.svg deleted file mode 100644 index acb9ffc..0000000 --- a/graphics/feature_image.svg +++ /dev/null @@ -1,815 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - diff --git a/graphics/feature_image_transparent.svg b/graphics/feature_image_transparent.svg deleted file mode 100644 index c241206..0000000 --- a/graphics/feature_image_transparent.svg +++ /dev/null @@ -1,784 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/graphics/ic_launcher_sc.svg b/graphics/ic_launcher_sc.svg deleted file mode 100644 index 6dee8d6..0000000 --- a/graphics/ic_launcher_sc.svg +++ /dev/null @@ -1,2243 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/graphics/icon_gen.sh b/graphics/icon_gen.sh deleted file mode 100755 index d6938d1..0000000 --- a/graphics/icon_gen.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -set -e - -mydir="$(dirname "$(realpath "$0")")" -automatic_commit="$1" - -SCHILDI_ROOT="$mydir/.." -source "$SCHILDI_ROOT/merge_helpers.sh" - -if [[ "$automatic_commit" == [Yy]* ]]; then - forelement_repos check_clean_git -fi - - -export_rect() { - w="$1" - h="$2" - in="$3" - out="$4" - inkscape -w "$w" -h "$h" --export-filename="$out" -C "$in" -} -export_square() { - size="$1" - in="$2" - out="$3" - export_rect "$1" "$size" "$in" "$out" -} - -repo_dir="$SCHILDI_ROOT/element-web" -base_out="$repo_dir/res/vector-icons" - -for i in 1024 120 150 152 180 24 300 44 48 50 76 88; do - export_square "$i" "$mydir/ic_launcher_sc.svg" "$base_out/$i.png" -done - -for i in 114 120 144 152 180 57 60 72 76; do - export_square "$i" "$mydir/store_icon.svg" "$base_out/apple-touch-icon-$i.png" -done - -for i in 150 310 70; do - export_square "$i" "$mydir/store_icon.svg" "$base_out/mstile-$i.png" -done - -# TODO fix measures of input to have correct measures for export here again -export_rect 1024 500 "$mydir/feature_image_transparent.svg" "$base_out/1240x600.png" -export_rect 512 250 "$mydir/feature_image_transparent.svg" "$base_out/620x300.png" -export_rect 256 125 "$mydir/feature_image.svg" "$base_out/mstile-310x150.png" - -magick "$base_out/48.png" "$base_out/favicon.ico" -rm "$base_out/48.png" # this was only created for favicon.ico - -for f in "$base_out"/*.png; do - pngcrush -ow "$f" -done - - -cp "$mydir/ic_launcher_sc.svg" "$repo_dir/res/themes/element/img/logos/element-logo.svg" - - -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" - -for f in "$base_out"/*.png; do - pngcrush -ow "$f" -done - - - - -base_out="$repo_dir/build" - -for i in 16 24 48 64 96 128 256 512 1024; do - export_square "$i" "$mydir/ic_launcher_sc.svg" "$base_out/icons/$i"x"$i.png" -done - -export_square "320" "$mydir/ic_launcher_sc.svg" "$base_out/install-spinner.png" -pngcrush "$base_out/install-spinner.png" -magick "$base_out/install-spinner.png" "$base_out/install-spinner.gif" -rm "$base_out/install-spinner.png" - -magick "$base_out/icons/256x256.png" "$base_out/icon.ico" -magick "$base_out/icons/1024x1024.png" "$base_out/icon.icns" -rm "$base_out/icons/1024x1024.png" - -for f in "$base_out/icons"/*.png; do - pngcrush -ow "$f" -done - - -if [[ "$automatic_commit" == [Yy]* ]]; then - forelement_repos commit_if_dirty "Automatic icon update" -fi diff --git a/graphics/store_icon.svg b/graphics/store_icon.svg deleted file mode 120000 index 30278a9..0000000 --- a/graphics/store_icon.svg +++ /dev/null @@ -1 +0,0 @@ -ic_launcher_sc.svg \ No newline at end of file diff --git a/i18n-overlays/element-web/en_EN.json b/i18n-overlays/element-web/en_EN.json index e707661..0967ef4 100644 --- a/i18n-overlays/element-web/en_EN.json +++ b/i18n-overlays/element-web/en_EN.json @@ -1,3 +1 @@ -{ - "Welcome to SchildiChat": "Welcome to SchildiChat" -} +{} diff --git a/matrix-js-sdk b/matrix-js-sdk index 6390182..255144e 160000 --- a/matrix-js-sdk +++ b/matrix-js-sdk @@ -1 +1 @@ -Subproject commit 63901825c14da3ec6f59017d2696ad98be91d2e0 +Subproject commit 255144ef2c9e141a171101e18091961f1be6db7f diff --git a/matrix-react-sdk b/matrix-react-sdk index 16fe0fe..9994f86 160000 --- a/matrix-react-sdk +++ b/matrix-react-sdk @@ -1 +1 @@ -Subproject commit 16fe0fe8d0068e4c5da3fa5516c5578d2ffaabc7 +Subproject commit 9994f867123a10b78fae014c3fa1ef919d89487e diff --git a/merge_helpers.sh b/merge_helpers.sh index d80ff9e..3808eab 100755 --- a/merge_helpers.sh +++ b/merge_helpers.sh @@ -1,10 +1,8 @@ #!/bin/bash -if [ -z "$SCHILDI_ROOT" ]; then - SCHILDI_ROOT="$(dirname "$(realpath "$0")")" -fi +SCHILDI_ROOT="$(dirname "$(realpath "$0")")" -branch=${BRANCH:-"lite"} +branch=${BRANCH:-"sc"} i18n_helper_path="$SCHILDI_ROOT/i18n-helper/index.js" i18n_path="src/i18n/strings" @@ -14,16 +12,16 @@ yarn=yarnpkg add_upstream() { if git remote | grep -q upstream; then - echo "Remote named upstream already exists, deleting..." - git remote remove upstream + echo "Remote named upstream already exists!" + return 1 fi local sc_remote="$(git remote -v|grep origin|grep fetch|sed 's|.*\t\(.*\) (fetch)|\1|')" - if echo "$sc_remote" | grep -q matrix-js-sdk; then + if echo "$sc_remote" | grep -q matrix; 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; then # vector-im repo - local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|element-hq|')" + local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|vector-im|')" else echo "Don't know upstream repo for $sc_remote" return 1 @@ -34,24 +32,36 @@ add_upstream() { } forall_repos() { - for repo in "matrix-js-sdk" "matrix-react-sdk" "element-web" "element-desktop"; do - pushd "$SCHILDI_ROOT/$repo" > /dev/null - "$@" - popd > /dev/null - done + pushd "$SCHILDI_ROOT/matrix-js-sdk" > /dev/null + "$@" + popd > /dev/null + + pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null + "$@" + popd > /dev/null + + pushd "$SCHILDI_ROOT/element-web" > /dev/null + "$@" + popd > /dev/null + + pushd "$SCHILDI_ROOT/element-desktop" > /dev/null + "$@" + popd > /dev/null } forelement_repos() { - for repo in "element-web" "element-desktop"; do - pushd "$SCHILDI_ROOT/$repo" > /dev/null - "$@" - popd > /dev/null - done + pushd "$SCHILDI_ROOT/element-web" > /dev/null + "$@" + popd > /dev/null + + pushd "$SCHILDI_ROOT/element-desktop" > /dev/null + "$@" + popd > /dev/null } ensure_yes() { read -e -p "$1 [y/N] " choice - + if [[ "$choice" != [Yy]* ]]; then exit 1 fi @@ -207,10 +217,10 @@ revert_packagejson_changes() { apply_packagejson_overlay() { local orig_path="$1" - local overlay_path="../overlay/$(basename "$PWD")/package.json" + local overlay_path="$2" # see: https://stackoverflow.com/a/24904276 - new_content=`jq -s '.[0] * .[1]' "$orig_path" "$overlay_path" | sed 's| | |g'` + new_content=`jq -s '.[0] * .[1]' "$orig_path" "$overlay_path"` echo "$new_content" > "$orig_path" git add "$orig_path" @@ -230,7 +240,7 @@ automatic_packagejson_adjustment() { local versions get_current_versions - forelement_repos apply_packagejson_overlay "package.json" + forelement_repos apply_packagejson_overlay "package.json" "overlay-package.json" forelement_repos write_version "package.json" } @@ -251,51 +261,3 @@ 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)" } - -apply_patches() { - local repo="$(realpath "$1")" - local patch_dir="$SCHILDI_ROOT/patches/$(basename "$1")" - if [ ! -d "$repo" ]; then - echo "Unknown repo: $repo" - return 1 - fi - if [ ! -d "$patch_dir" ]; then - echo "No patches found at $patch_dir" - return 1 - fi - pushd "$repo" - for patch in "$patch_dir"/*; do - echo "Applying $patch to $repo..." - git am "$patch" || on_apply_patch_fail_try_original_commit "$patch" "$repo" - done - popd -} - -on_apply_patch_fail_try_original_commit() { - local patch="$1" - local repo="$2" - local orig_commit="$(head -n 1 "$patch"|sed 's|From ||;s| .*||')" - echo "Applying $patch failed, trying with original commit $orig_commit..." - git am --abort - git cherry-pick "$orig_commit" || on_apply_patch_fail "$patch" "$repo" "$orig_commit" -} - -on_apply_patch_fail() { - local patch="$1" - local repo="$2" - local orig_commit="$3" - echo "----------------------------------" - echo "Applying patch failed, please commit manually!" - echo "Patch: $patch" - echo "Repo: $repo" - echo "Original commit: $(head -n 1 "$patch"|sed 's|From ||;s| .*||')" - echo "----------------------------------" - read -p "Press enter after committing resolved conflicts: " -} - -commit_if_dirty() { - local message="$1" - # see: https://devops.stackexchange.com/a/5443 - git add -A - git diff-index --quiet HEAD || git commit -m "$message" -} diff --git a/merge_upstream.sh b/merge_upstream.sh index 79b3f5b..e772262 100755 --- a/merge_upstream.sh +++ b/merge_upstream.sh @@ -4,56 +4,55 @@ set -e mydir="$(dirname "$(realpath "$0")")" -# Update patches? -if [ "$1" = "-u" ]; then - keep_patches=0 - shift -else - keep_patches=1 -fi - pushd "$mydir" > /dev/null source ./merge_helpers.sh -# Persist current state -if [ "$keep_patches" = 0 ]; then - ./generate_patches.sh -fi +# Check branch +check_branch $branch +forall_repos check_branch $branch -# Abandon all local submodule state -forall_repos git reset --hard -git submodule update -f --recursive +# Ensure clean git state +forall_repos check_clean_git # Fetch upstream forall_repos git fetch upstream +# Automatic reversions +automatic_i18n_reversion +automatic_packagejson_reversion + +# Merge upstream + # Check if specific version to merge passed if [ -z "$1" ]; then get_latest_upstream_tag else latest_upstream_tag="$1" fi - -sc_branch_name="sc_$latest_upstream_tag" - -forelement_repos git checkout "$latest_upstream_tag" -B "$sc_branch_name" +forelement_repos git merge "$latest_upstream_tag" get_current_mxsdk_tags pushd "matrix-js-sdk" > /dev/null -git checkout "$current_mxjssdk_tag" -B "$sc_branch_name" +git merge "$current_mxjssdk_tag" popd > /dev/null pushd "matrix-react-sdk" > /dev/null -git checkout "$current_mxreactsdk_tag" -B "$sc_branch_name" +git merge "$current_mxreactsdk_tag" popd > /dev/null # Refresh environment make clean make setup -forall_repos commit_if_dirty "Automatic setup commit" -./apply_patches.sh +# Automatic adjustments +automatic_i18n_adjustment +automatic_packagejson_adjustment + +# Automatic theme update +pushd "matrix-react-sdk" > /dev/null +./theme.sh y +popd > /dev/null popd > /dev/null diff --git a/overlay/element-desktop/package.json b/overlay/element-desktop/package.json deleted file mode 100644 index f8d8434..0000000 --- a/overlay/element-desktop/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "schildichat-desktop-alpha", - "productName": "SchildiChatAlpha", - "description": "A Matrix Client based on Element with some changes and tweaks", - "author": "SchildiChat", - "repository": { - "url": "https://github.com/SchildiChat/schildichat-desktop" - }, - "homepage": "https://schildi.chat/" -} diff --git a/overlay/element-web/package.json b/overlay/element-web/package.json deleted file mode 100644 index 35e873a..0000000 --- a/overlay/element-web/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "schildichat-web-alpha", - "description": "A Matrix Client based on Element with some changes and tweaks", - "author": "SchildiChat", - "repository": { - "url": "https://github.com/SchildiChat/schildichat-desktop" - } -} diff --git a/patches/element-desktop/0002-Add-back-schildi-fetch-package.ts-modifications.patch b/patches/element-desktop/0002-Add-back-schildi-fetch-package.ts-modifications.patch deleted file mode 100644 index 61764fe..0000000 --- a/patches/element-desktop/0002-Add-back-schildi-fetch-package.ts-modifications.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e326039d1acbc5da0cdd95dc235646202264d3c3 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sat, 2 Dec 2023 12:57:26 +0100 -Subject: Add back schildi fetch-package.ts modifications - ---- - scripts/fetch-package.ts | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/scripts/fetch-package.ts b/scripts/fetch-package.ts -index 54da3f3..354f039 100644 ---- a/scripts/fetch-package.ts -+++ b/scripts/fetch-package.ts -@@ -55,6 +55,7 @@ async function main(): Promise { - let filename: string | undefined; - let url: string | undefined; - let setVersion = false; -+ const sc = true; - - while (process.argv.length > 2) { - switch (process.argv[2]) { -@@ -83,7 +84,9 @@ async function main(): Promise { - process.argv.shift(); - } - -- if (targetVersion === undefined) { -+ if (sc) { -+ // nothing -+ } else if (targetVersion === undefined) { - targetVersion = "v" + riotDesktopPackageJson.version; - } else if (targetVersion !== "develop") { - setVersion = true; // version was specified -@@ -93,7 +96,7 @@ async function main(): Promise { - filename = "develop.tar.gz"; - url = DEVELOP_TGZ_URL; - verify = false; // develop builds aren't signed -- } else if (targetVersion.includes("://")) { -+ } else if (targetVersion?.includes("://")) { - filename = targetVersion.substring(targetVersion.lastIndexOf("/") + 1); - url = targetVersion; - verify = false; // manually verified -@@ -145,12 +148,15 @@ async function main(): Promise { - } - - let haveDeploy = false; -- let expectedDeployDir = path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, "")); -+ let expectedDeployDir = sc ? "../element-web/webapp" : path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, "")); - try { - await fs.opendir(expectedDeployDir); - console.log(expectedDeployDir + "already exists"); - haveDeploy = true; -- } catch (e) {} -+ } catch (e) { -+ console.log("Not a valid webapp dir: " + expectedDeployDir, e); -+ return 1; -+ } - - if (!haveDeploy) { - const outPath = path.join(pkgDir, filename); --- -2.47.0 - diff --git a/patches/matrix-js-sdk/0001-Add-fields-for-media-caption-support.patch b/patches/matrix-js-sdk/0001-Add-fields-for-media-caption-support.patch deleted file mode 100644 index 70aff3f..0000000 --- a/patches/matrix-js-sdk/0001-Add-fields-for-media-caption-support.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 63901825c14da3ec6f59017d2696ad98be91d2e0 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -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 - diff --git a/patches/matrix-react-sdk/0001-Disable-sticky-rooms.patch b/patches/matrix-react-sdk/0001-Disable-sticky-rooms.patch deleted file mode 100644 index f8f0dce..0000000 --- a/patches/matrix-react-sdk/0001-Disable-sticky-rooms.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 913772283fd2b9f682a11a594061a6a1189b7869 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Tue, 18 Jan 2022 13:28:22 +0100 -Subject: Disable sticky rooms - ---- - src/stores/room-list/algorithms/Algorithm.ts | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts -index c3450d70cf..e296676149 100644 ---- a/src/stores/room-list/algorithms/Algorithm.ts -+++ b/src/stores/room-list/algorithms/Algorithm.ts -@@ -159,8 +159,10 @@ export class Algorithm extends EventEmitter { - this.recalculateActiveCallRooms(tagId); - } - -- private updateStickyRoom(val: Room | null): void { -- this.doUpdateStickyRoom(val); -+ private updateStickyRoom(val: Room) { -+ // Schildi: we don't want it sticky -+ this.doUpdateStickyRoom(null); -+ //this.doUpdateStickyRoom(val); - this._lastStickyRoom = null; // clear to indicate we're done changing - } - --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0002-Bring-back-unified-room-list.patch b/patches/matrix-react-sdk/0002-Bring-back-unified-room-list.patch deleted file mode 100644 index 81bd614..0000000 --- a/patches/matrix-react-sdk/0002-Bring-back-unified-room-list.patch +++ /dev/null @@ -1,263 +0,0 @@ -From e2045dd5dcbd82f7b5c4f98d89b258cc304d3e26 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sun, 5 May 2024 10:12:17 +0200 -Subject: Bring back unified room list - -Remaining TODO: -- Hook up setting to UI again (better with own SC-specific screen?) - -Co-authored-by: su-ex ---- - src/components/views/rooms/RoomList.tsx | 39 +++++++++++++++++++- - src/settings/Settings.tsx | 8 ++++ - src/stores/room-list/RoomListStore.ts | 19 +++++++++- - src/stores/room-list/algorithms/Algorithm.ts | 20 ++++++++-- - src/stores/room-list/models.ts | 2 + - 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 ---- a/src/components/views/rooms/RoomList.tsx -+++ b/src/components/views/rooms/RoomList.tsx -@@ -72,11 +72,13 @@ interface IState { - sublists: ITagMap; - currentRoomId?: string; - suggestedRooms: ISuggestedRoom[]; -+ unifiedRoomList: boolean; - } - - export const TAG_ORDER: TagID[] = [ - DefaultTagID.Invite, - DefaultTagID.Favourite, -+ DefaultTagID.Unified, - DefaultTagID.DM, - DefaultTagID.Untagged, - DefaultTagID.Conference, -@@ -89,6 +91,7 @@ export const TAG_ORDER: TagID[] = [ - // but we'd have to make sure that rooms you weren't in were hidden. - ]; - const ALWAYS_VISIBLE_TAGS: TagID[] = [DefaultTagID.DM, DefaultTagID.Untagged]; -+const ALWAYS_VISIBLE_UNIFIED_TAGS: TagID[] = [DefaultTagID.Unified]; - - interface ITagAesthetics { - sectionLabel: TranslationKey; -@@ -366,6 +369,17 @@ const UntaggedAuxButton: React.FC = ({ tabIndex }) => { - return null; - }; - -+const UnifiedAuxButton: React.FC = (iAuxButtonProps: IAuxButtonProps) => { -+ return ( -+ <> -+ {/* eslint-disable-next-line new-cap */} -+ {DmAuxButton(iAuxButtonProps)} -+ {/* eslint-disable-next-line new-cap */} -+ {UntaggedAuxButton(iAuxButtonProps)} -+ -+ ); -+}; -+ - const TAG_AESTHETICS: TagAestheticsMap = { - [DefaultTagID.Invite]: { - sectionLabel: _td("action|invites_list"), -@@ -383,6 +397,12 @@ const TAG_AESTHETICS: TagAestheticsMap = { - defaultHidden: false, - AuxButtonComponent: DmAuxButton, - }, -+ [DefaultTagID.Unified]: { -+ sectionLabel: _td("Normal priority"), -+ isInvite: false, -+ defaultHidden: false, -+ AuxButtonComponent: UnifiedAuxButton, -+ }, - [DefaultTagID.Conference]: { - sectionLabel: _td("voip|metaspace_video_rooms|conference_room_section"), - isInvite: false, -@@ -421,6 +441,7 @@ const TAG_AESTHETICS: TagAestheticsMap = { - - export default class RoomList extends React.PureComponent { - private dispatcherRef?: string; -+ private readonly unifiedRoomListWatcherRef: string; - private treeRef = createRef(); - - public static contextType = MatrixClientContext; -@@ -432,7 +453,14 @@ export default class RoomList extends React.PureComponent { - this.state = { - sublists: {}, - suggestedRooms: SpaceStore.instance.suggestedRooms, -+ unifiedRoomList: SettingsStore.getValue("unifiedRoomList"), - }; -+ -+ this.unifiedRoomListWatcherRef = SettingsStore.watchSetting( -+ "unifiedRoomList", -+ null, -+ this.onUnifiedRoomListChange, -+ ); - } - - public componentDidMount(): void { -@@ -447,9 +475,16 @@ export default class RoomList extends React.PureComponent { - SpaceStore.instance.off(UPDATE_SUGGESTED_ROOMS, this.updateSuggestedRooms); - RoomListStore.instance.off(LISTS_UPDATE_EVENT, this.updateLists); - if (this.dispatcherRef) defaultDispatcher.unregister(this.dispatcherRef); -+ SettingsStore.unwatchSetting(this.unifiedRoomListWatcherRef); - SdkContextClass.instance.roomViewStore.off(UPDATE_EVENT, this.onRoomViewStoreUpdate); - } - -+ private onUnifiedRoomListChange = (): void => { -+ this.setState({ -+ unifiedRoomList: SettingsStore.getValue("unifiedRoomList"), -+ }); -+ }; -+ - private onRoomViewStoreUpdate = (): void => { - this.setState({ - currentRoomId: SdkContextClass.instance.roomViewStore.getRoomId() ?? undefined, -@@ -590,7 +625,9 @@ export default class RoomList extends React.PureComponent { - const aesthetics = TAG_AESTHETICS[orderedTagId]; - if (!aesthetics) throw new Error(`Tag ${orderedTagId} does not have aesthetics`); - -- let alwaysVisible = ALWAYS_VISIBLE_TAGS.includes(orderedTagId); -+ let alwaysVisible = ( -+ this.state.unifiedRoomList ? ALWAYS_VISIBLE_UNIFIED_TAGS : ALWAYS_VISIBLE_TAGS -+ ).includes(orderedTagId); - if ( - (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 ---- a/src/settings/Settings.tsx -+++ b/src/settings/Settings.tsx -@@ -191,6 +191,14 @@ export interface IFeature extends Omit, "isFeature"> { - export type ISetting = IBaseSetting | IFeature; - - export const SETTINGS: { [setting: string]: ISetting } = { -+ // SC settings start -+ "unifiedRoomList": { -+ supportedLevels: LEVELS_ACCOUNT_SETTINGS, -+ displayName: _td("Show people and rooms in a combined list"), -+ default: true, -+ controller: new ReloadOnChangeController(), -+ }, -+ // SC settings end - "feature_video_rooms": { - isFeature: true, - labsGroup: LabGroup.VoiceAndVideo, -diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts -index 53377e0a01..381187b85c 100644 ---- a/src/stores/room-list/RoomListStore.ts -+++ b/src/stores/room-list/RoomListStore.ts -@@ -500,6 +500,9 @@ export class RoomListStoreClass extends AsyncStoreWithClient implements - this.setAndPersistListOrder(tag, listOrder); - } - } -+ -+ // SC: Unified list for DMs and groups -+ this.algorithm.setUnifiedRoomList(SettingsStore.getValue("unifiedRoomList")); - } - - private onAlgorithmListUpdated = (forceUpdate: boolean): void => { -@@ -613,7 +616,21 @@ export class RoomListStoreClass extends AsyncStoreWithClient implements - */ - public getTagsForRoom(room: Room): TagID[] { - const algorithmTags = this.algorithm.getTagsForRoom(room); -- if (!algorithmTags) return [DefaultTagID.Untagged]; -+ if (!algorithmTags) { -+ if (SettingsStore.getValue("unifiedRoomList")) { -+ return [DefaultTagID.Unified]; -+ } else { -+ return [DefaultTagID.Untagged]; -+ } -+ } -+ const dmTagIndex = algorithmTags.indexOf(DefaultTagID.DM); -+ if (dmTagIndex !== -1) { -+ algorithmTags[dmTagIndex] = DefaultTagID.Unified; -+ } -+ const untaggedTagIndex = algorithmTags.indexOf(DefaultTagID.Untagged); -+ if (untaggedTagIndex !== -1) { -+ algorithmTags[untaggedTagIndex] = DefaultTagID.Unified; -+ } - return algorithmTags; - } - -diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts -index e296676149..06147137b3 100644 ---- a/src/stores/room-list/algorithms/Algorithm.ts -+++ b/src/stores/room-list/algorithms/Algorithm.ts -@@ -75,6 +75,7 @@ export class Algorithm extends EventEmitter { - * Set to true to suspend emissions of algorithm updates. - */ - public updatesInhibited = false; -+ private unifiedRoomList: boolean = true; - - public start(): void { - CallStore.instance.on(CallStoreEvent.ConnectedCalls, this.onConnectedCalls); -@@ -106,6 +107,10 @@ export class Algorithm extends EventEmitter { - return this._cachedRooms; - } - -+ public setUnifiedRoomList(unifiedRoomList: boolean): void { -+ this.unifiedRoomList = unifiedRoomList; -+ } -+ - /** - * Awaitable version of the sticky room setter. - * @param val The new room to sticky. -@@ -513,7 +518,10 @@ export class Algorithm extends EventEmitter { - } - - if (!inTag) { -- if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) { -+ if (this.unifiedRoomList) { -+ // SC: Unified room list for DMs and groups -+ newTags[DefaultTagID.Unified].push(room); -+ } else if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) { - newTags[DefaultTagID.DM].push(room); - } else { - newTags[DefaultTagID.Untagged].push(room); -@@ -557,7 +565,13 @@ export class Algorithm extends EventEmitter { - tags.push(...this.getTagsOfJoinedRoom(room)); - } - -- if (!tags.length) tags.push(DefaultTagID.Untagged); -+ if (!tags.length) { -+ if (this.unifiedRoomList) { -+ tags.push(DefaultTagID.Unified); -+ } else { -+ tags.push(DefaultTagID.Untagged); -+ } -+ } - - return tags; - } -@@ -567,7 +581,7 @@ export class Algorithm extends EventEmitter { - - if (tags.length === 0) { - // Check to see if it's a DM if it isn't anything else -- if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) { -+ if (DMRoomMap.shared().getUserIdForRoomId(room.roomId) && !this.unifiedRoomList) { - tags = [DefaultTagID.DM]; - } - } -diff --git a/src/stores/room-list/models.ts b/src/stores/room-list/models.ts -index 50cecda665..8efc2d040d 100644 ---- a/src/stores/room-list/models.ts -+++ b/src/stores/room-list/models.ts -@@ -13,6 +13,7 @@ export enum DefaultTagID { - LowPriority = "m.lowpriority", - Favourite = "m.favourite", - DM = "im.vector.fake.direct", -+ Unified = "chat.schildi.fake.unified", - Conference = "im.vector.fake.conferences", - ServerNotice = "m.server_notice", - Suggested = "im.vector.fake.suggested", -@@ -21,6 +22,7 @@ export enum DefaultTagID { - export const OrderedDefaultTagIDs = [ - DefaultTagID.Invite, - DefaultTagID.Favourite, -+ DefaultTagID.Unified, - DefaultTagID.DM, - DefaultTagID.Conference, - DefaultTagID.Untagged, --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0003-Don-t-sort-muted-rooms-to-bottom-I-still-want-to-see.patch b/patches/matrix-react-sdk/0003-Don-t-sort-muted-rooms-to-bottom-I-still-want-to-see.patch deleted file mode 100644 index 2363d5b..0000000 --- a/patches/matrix-react-sdk/0003-Don-t-sort-muted-rooms-to-bottom-I-still-want-to-see.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1d3847da55e91dfc5e555e69fbadcbc1d033a8d9 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sun, 17 Dec 2023 11:11:58 +0100 -Subject: Don't sort muted rooms to bottom, I still want to see them. - ---- - .../room-list/algorithms/list-ordering/OrderingAlgorithm.ts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts -index 67ee1ca084..67dcaa3855 100644 ---- a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts -+++ b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts -@@ -38,7 +38,7 @@ export abstract class OrderingAlgorithm { - } - - public get isMutedToBottom(): boolean { -- return this.sortingAlgorithm === SortAlgorithm.Recent; -+ return this.sortingAlgorithm === SortAlgorithm.Recent && false; - } - - /** --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0004-Add-support-for-rendering-captions-in-media-messages.patch b/patches/matrix-react-sdk/0004-Add-support-for-rendering-captions-in-media-messages.patch deleted file mode 100644 index f097ae4..0000000 --- a/patches/matrix-react-sdk/0004-Add-support-for-rendering-captions-in-media-messages.patch +++ /dev/null @@ -1,104 +0,0 @@ -From ac0fb82339fc580da9db60c183a39d72e6fba3ea Mon Sep 17 00:00:00 2001 -From: Tulir Asokan -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>; - } -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 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 implements IMe - getRelationsForEvent={this.props.getRelationsForEvent} - isSeeingThroughMessageHiddenForModeration={this.props.isSeeingThroughMessageHiddenForModeration} - inhibitInteraction={this.props.inhibitInteraction} -+ OrigBodyType={OrigBodyType} - /> - ) : null; - } - } -+ -+const CaptionBody: React.FunctionComponent>}> = ({OrigBodyType, ...props}) => (
-+ -+ -+
) -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 { - 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 { - - ); - } -+ if (isCaption) { -+ return ( -+
-+ { body } -+ { widgets } -+
-+ ); -+ } - return ( -
- {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 - diff --git a/patches/matrix-react-sdk/0005-Don-t-preview-reactions.patch b/patches/matrix-react-sdk/0005-Don-t-preview-reactions.patch deleted file mode 100644 index b935d6e..0000000 --- a/patches/matrix-react-sdk/0005-Don-t-preview-reactions.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0f0f80d270be5c88b0b762b51fe570c11b0bea7f Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Thu, 14 Dec 2023 10:32:10 +0100 -Subject: Don't preview reactions - ---- - src/stores/room-list/MessagePreviewStore.ts | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts -index e0e06ec980..7ee27f8402 100644 ---- a/src/stores/room-list/MessagePreviewStore.ts -+++ b/src/stores/room-list/MessagePreviewStore.ts -@@ -57,10 +57,12 @@ const PREVIEWS: Record< - isState: false, - previewer: new StickerEventPreview(), - }, -+ /* - "m.reaction": { - isState: false, - previewer: new ReactionEventPreview(), - }, -+ */ - [M_POLL_START.name]: { - isState: false, - previewer: new PollStartEventPreview(), --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0006-Hide-the-mute-notification-state-the-same-way-as-the.patch b/patches/matrix-react-sdk/0006-Hide-the-mute-notification-state-the-same-way-as-the.patch deleted file mode 100644 index eafb725..0000000 --- a/patches/matrix-react-sdk/0006-Hide-the-mute-notification-state-the-same-way-as-the.patch +++ /dev/null @@ -1,30 +0,0 @@ -From bc49b8d30cf7e0da038fac992ee2ff04c9dc91aa Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Wed, 17 Nov 2021 12:50:25 +0100 -Subject: Hide the "mute" notification state the same way as the other states - -This can get in the way of the "marked as unread" icon otherwise. -Furthermore, I didn't really like it showing there persistently either -way. ---- - src/components/views/rooms/RoomTile.tsx | 4 +++- - 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 ---- a/src/components/views/rooms/RoomTile.tsx -+++ b/src/components/views/rooms/RoomTile.tsx -@@ -304,7 +304,9 @@ export class RoomTile extends React.PureComponent { - - // Only show the icon by default if the room is overridden to muted. - // TODO: [FTUE Notifications] Probably need to detect global mute state -- mx_RoomTile_notificationsButton_show: state === RoomNotifState.Mute, -+ //mx_RoomTile_notificationsButton_show: state === RoomNotifState.Mute, -+ // SchildiChat: never show the icon by default. This gets in the way of the "marked as unread" icon. -+ mx_RoomTile_notificationsButton_show: false, - }); - - return ( --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0007-Allow-muted-rooms-to-render-as-unread.patch b/patches/matrix-react-sdk/0007-Allow-muted-rooms-to-render-as-unread.patch deleted file mode 100644 index dd98773..0000000 --- a/patches/matrix-react-sdk/0007-Allow-muted-rooms-to-render-as-unread.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 10b23f715bf5115715dca07676ca467a6433c9c9 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Fri, 10 May 2024 18:58:32 +0200 -Subject: Allow muted rooms to render as unread - ---- - src/RoomNotifs.ts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/RoomNotifs.ts b/src/RoomNotifs.ts -index cc027c9682..c4c31a51cb 100644 ---- a/src/RoomNotifs.ts -+++ b/src/RoomNotifs.ts -@@ -255,7 +255,7 @@ export function determineUnreadState( - return { symbol: "!", count: 1, level: NotificationLevel.Highlight }; - } - -- if (getRoomNotifsState(room.client, room.roomId) === RoomNotifState.Mute) { -+ if (false && getRoomNotifsState(room.client, room.roomId) === RoomNotifState.Mute) { - return { symbol: null, count: 0, level: NotificationLevel.None }; - } - --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0008-Increase-default-visible-tiles.patch b/patches/matrix-react-sdk/0008-Increase-default-visible-tiles.patch deleted file mode 100644 index e2d8e51..0000000 --- a/patches/matrix-react-sdk/0008-Increase-default-visible-tiles.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 641cd216c155318e35eabef30761613706e36c87 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sun, 30 Aug 2020 15:33:01 +0200 -Subject: Increase default visible tiles - ---- - 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 ff60309e08..275b6d330b 100644 ---- a/src/stores/room-list/ListLayout.ts -+++ b/src/stores/room-list/ListLayout.ts -@@ -74,7 +74,7 @@ export class ListLayout { - - public get defaultVisibleTiles(): number { - // This number is what "feels right", and mostly subject to design's opinion. -- return 8; -+ return 50; - } - - public tilesWithPadding(n: number, paddingPx: number): number { --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0009-Bring-back-showSpaceDMBadges-setting-force-enabled-f.patch b/patches/matrix-react-sdk/0009-Bring-back-showSpaceDMBadges-setting-force-enabled-f.patch deleted file mode 100644 index 7ef1a39..0000000 --- a/patches/matrix-react-sdk/0009-Bring-back-showSpaceDMBadges-setting-force-enabled-f.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 2203554625f7c8d924981b3cd03b1389dc6873d9 Mon Sep 17 00:00:00 2001 -From: su-ex -Date: Sun, 26 May 2024 10:43:36 +0200 -Subject: Bring back showSpaceDMBadges setting, force-enabled for now - -TODO settings UI - -Co-authored-by: SpiritCroc ---- - src/settings/Settings.tsx | 5 +++++ - src/stores/spaces/SpaceStore.ts | 25 +++++++++++++++++++++++++ - 2 files changed, 30 insertions(+) - -diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx -index 7aea53ceea..b668c65dfd 100644 ---- a/src/settings/Settings.tsx -+++ b/src/settings/Settings.tsx -@@ -198,6 +198,11 @@ export const SETTINGS: { [setting: string]: ISetting } = { - default: true, - controller: new ReloadOnChangeController(), - }, -+ "Spaces.showSpaceDMBadges": { -+ displayName: _td("Show notification badges for People in Spaces"), -+ supportedLevels: LEVELS_ACCOUNT_SETTINGS, -+ default: true, -+ }, - // SC settings end - "feature_video_rooms": { - isFeature: true, -diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts -index 90358f3310..60df05478a 100644 ---- a/src/stores/spaces/SpaceStore.ts -+++ b/src/stores/spaces/SpaceStore.ts -@@ -154,9 +154,17 @@ export class SpaceStoreClass extends AsyncStoreWithClient { - /** Whether the feature flag is set for MSC3946 */ - private _msc3946ProcessDynamicPredecessor: boolean = SettingsStore.getValue("feature_dynamic_room_predecessors"); - -+ // SC start -+ private _showSpaceDMBadges = true; -+ // SC end -+ - public constructor() { - super(defaultDispatcher, {}); - -+ // SC start -+ SettingsStore.monitorSetting("Spaces.showSpaceDMBadges", null); -+ // SC end -+ - SettingsStore.monitorSetting("Spaces.allRoomsInHome", null); - SettingsStore.monitorSetting("Spaces.enabledMetaSpaces", null); - SettingsStore.monitorSetting("Spaces.showPeopleInSpace", null); -@@ -192,6 +200,10 @@ export class SpaceStoreClass extends AsyncStoreWithClient { - return this._allRoomsInHome; - } - -+ public get showSpaceDMBadges(): boolean { // SC -+ return this._showSpaceDMBadges; -+ } -+ - public setActiveRoomInSpace(space: SpaceKey): void { - if (!isMetaSpace(space) && !this.matrixClient?.getRoom(space)?.isSpaceRoom()) return; - if (space !== this.activeSpace) this.setActiveSpace(space, false); -@@ -701,6 +713,10 @@ export class SpaceStoreClass extends AsyncStoreWithClient { - - if (room.isSpaceRoom() || !flattenedRoomsForSpace.has(room.roomId)) return false; - -+ if (this.showSpaceDMBadges) { // SC -+ return true; -+ } -+ - if (dmBadgeSpace && DMRoomMap.shared().getUserIdForRoomId(room.roomId)) { - return s === dmBadgeSpace; - } -@@ -1277,6 +1293,15 @@ export class SpaceStoreClass extends AsyncStoreWithClient { - break; - } - -+ case "Spaces.showSpaceDMBadges": { // SC -+ const newValue = SettingsStore.getValue("Spaces.showSpaceDMBadges"); -+ if (this.showSpaceDMBadges !== newValue) { -+ this._showSpaceDMBadges = newValue; -+ this.rebuildSpaceHierarchy(); // rebuild everything -+ } -+ break; -+ } -+ - case "Spaces.enabledMetaSpaces": { - const newValue = SettingsStore.getValue("Spaces.enabledMetaSpaces"); - const enabledMetaSpaces = metaSpaceOrder.filter((k) => newValue[k]); --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0010-Squashed-Freeform-reactions-from-tadzik-freeform-rea.patch b/patches/matrix-react-sdk/0010-Squashed-Freeform-reactions-from-tadzik-freeform-rea.patch deleted file mode 100644 index a281def..0000000 --- a/patches/matrix-react-sdk/0010-Squashed-Freeform-reactions-from-tadzik-freeform-rea.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 961ee28392810973057a0c8af410e1067a15547a Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Wed, 29 May 2024 19:32:42 +0200 -Subject: Squashed: Freeform reactions from tadzik/freeform-reactions-upstream -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -commit 9eea56b0080db3720efa49b457707bcde3be6474 -Merge: 06f81c9662 8570f16e31 -Author: Tadeusz Sośnierz -Date: Tue Jun 20 09:57:19 2023 +0200 - - Merge branch 'develop' into tadzik/freeform-reactions-upstream - -commit 06f81c9662fbe033b4eac859d7e14e0ab24a6e91 -Merge: ad4fef85b1 0d6a550c33 -Author: Michael Telatynski <7t3chguy@gmail.com> -Date: Wed Aug 31 09:06:49 2022 +0100 - - Merge branch 'develop' into tadzik/freeform-reactions - -commit ad4fef85b160087b8017b9ae9cf9aebfd5348f41 -Merge: 689b57c0b9 5aae974e93 -Author: Tadeusz Sośnierz -Date: Sun Aug 28 10:11:48 2022 +0200 - - Merge branch 'develop' into tadzik/freeform-reactions - -commit 689b57c0b91e12907a8dbc3fac3ed10302a11e4a -Author: Tadeusz Sośnierz -Date: Fri May 20 10:35:06 2022 +0200 - - Fix conflict resolution fail in EmojiPicker - -commit 70a8e212b748584949b37bc99b72acffce2fd148 -Merge: 215df55f13 a0cdc93642 -Author: Tadeusz Sośnierz -Date: Fri May 20 10:25:17 2022 +0200 - - Merge branch 'develop' into tadzik/freeform-reactions-upstream - -commit 215df55f13162bdc8eb13da5219763c56f560dd0 -Author: Tadeusz Sośnierz -Date: Tue Aug 17 16:30:06 2021 +0200 - - Disable freeform emoji reactions in the message composer - -commit 6bb8263007e077d22929fcc1fb439d94a4f15c6f -Author: Tadeusz Sośnierz -Date: Tue Aug 17 12:12:28 2021 +0200 - - Add more typing to EmojiPicker - -commit b2a1728318a8a5496345797995c1ec09ae3f88e6 -Author: Tadeusz Sośnierz -Date: Tue Aug 17 11:52:35 2021 +0200 - - Make free-form reaction button translatable - -commit f4adaf00b805baba454fbceb41cc5c081ec886a7 -Author: Tadeusz Sośnierz -Date: Tue Aug 17 11:29:22 2021 +0200 - - Allow sending free-form reactions - - Signed-off-by: Tadeusz Sośnierz ---- - src/components/views/emojipicker/EmojiPicker.tsx | 15 +++++++++++++++ - .../views/emojipicker/ReactionPicker.tsx | 1 + - 2 files changed, 16 insertions(+) - -diff --git a/src/components/views/emojipicker/EmojiPicker.tsx b/src/components/views/emojipicker/EmojiPicker.tsx -index 4806ad4216..7d4a4353e2 100644 ---- a/src/components/views/emojipicker/EmojiPicker.tsx -+++ b/src/components/views/emojipicker/EmojiPicker.tsx -@@ -17,6 +17,7 @@ import Header from "./Header"; - import Search from "./Search"; - import Preview from "./Preview"; - import QuickReactions from "./QuickReactions"; -+import AccessibleButton from '../elements/AccessibleButton'; - import Category, { CategoryKey, ICategory } from "./Category"; - import { filterBoolean } from "../../../utils/arrays"; - import { -@@ -37,6 +38,7 @@ export const EMOJIS_PER_ROW = 8; - const ZERO_WIDTH_JOINER = "\u200D"; - - interface IProps { -+ allowUnlisted?: boolean; - selectedEmojis?: Set; - onChoose(unicode: string): boolean; - onFinished(): void; -@@ -341,6 +343,10 @@ class EmojiPicker extends React.Component { - } - }; - -+ private reactWith = (reaction: string): void => { -+ this.props.onChoose(reaction); -+ }; -+ - private static categoryHeightForEmojiCount(count: number): number { - if (count === 0) { - return 0; -@@ -396,6 +402,15 @@ class EmojiPicker extends React.Component { - return categoryElement; - })} - -+ { -+ (this.props.allowUnlisted && this.state.filter) && -+ this.reactWith(this.state.filter)} -+ > -+ { _t('React with "%(reaction)s"', { reaction: this.state.filter }) } -+ -+ } - {this.state.previewEmoji ? ( - - ) : ( -diff --git a/src/components/views/emojipicker/ReactionPicker.tsx b/src/components/views/emojipicker/ReactionPicker.tsx -index 2c2eb442a0..62bfd2ea0f 100644 ---- a/src/components/views/emojipicker/ReactionPicker.tsx -+++ b/src/components/views/emojipicker/ReactionPicker.tsx -@@ -123,6 +123,7 @@ class ReactionPicker extends React.Component { - public render(): React.ReactNode { - return ( - -Date: Sat, 22 Apr 2023 12:15:18 +0200 -Subject: Allow reactions to take more space - ---- - res/css/views/messages/_ReactionsRowButton.pcss | 2 +- - 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 ---- 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; - 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_content { -- max-width: 100px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0012-On-space-switch-don-t-automatically-show-last-opened.patch b/patches/matrix-react-sdk/0012-On-space-switch-don-t-automatically-show-last-opened.patch deleted file mode 100644 index b224046..0000000 --- a/patches/matrix-react-sdk/0012-On-space-switch-don-t-automatically-show-last-opened.patch +++ /dev/null @@ -1,79 +0,0 @@ -From b43bf7e8a183f36e30e9b79e3fc2dcd14afc6823 Mon Sep 17 00:00:00 2001 -From: su-ex -Date: Thu, 30 May 2024 14:35:16 +0200 -Subject: On space switch don't automatically show last opened room - ---- - src/components/structures/MatrixChat.tsx | 18 +++++++++++++++++- - src/settings/Settings.tsx | 6 ++++++ - src/stores/spaces/SpaceStore.ts | 1 + - 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 ---- a/src/components/structures/MatrixChat.tsx -+++ b/src/components/structures/MatrixChat.tsx -@@ -1448,7 +1448,15 @@ export default class MatrixChat extends React.PureComponent { - if (this.screenAfterLogin && this.screenAfterLogin.screen) { - this.showScreen(this.screenAfterLogin.screen, this.screenAfterLogin.params); - this.screenAfterLogin = undefined; -- } else if (localStorage && localStorage.getItem("mx_last_room_id")) { -+ } else if ( -+ !SettingsStore.getValue("Spaces.returnToPreviouslyOpenedRoom") && -+ localStorage && -+ localStorage.getItem("mx_active_space") && -+ localStorage.getItem("mx_active_space")[0] === "!" -+ ) { -+ // SC: Show the last viewed space -+ this.viewLastSpace(); -+ } else if (SettingsStore.getValue("Spaces.returnToPreviouslyOpenedRoom") && localStorage && localStorage.getItem("mx_last_room_id")) { - // Before defaulting to directory, show the last viewed room - this.viewLastRoom(); - } else { -@@ -1460,6 +1468,14 @@ export default class MatrixChat extends React.PureComponent { - } - } - -+ private viewLastSpace(): void { // SC -+ // SC-ToDo: Make this work for meta spaces -+ dis.dispatch({ -+ action: Action.ViewRoom, -+ room_id: localStorage.getItem("mx_active_space"), -+ }); -+ } -+ - private viewLastRoom(): void { - dis.dispatch({ - action: Action.ViewRoom, -diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx -index b668c65dfd..be4433e1bc 100644 ---- a/src/settings/Settings.tsx -+++ b/src/settings/Settings.tsx -@@ -203,6 +203,12 @@ export const SETTINGS: { [setting: string]: ISetting } = { - supportedLevels: LEVELS_ACCOUNT_SETTINGS, - default: true, - }, -+ "Spaces.returnToPreviouslyOpenedRoom": { -+ displayName: _td("Return to the room previously opened in a space"), -+ description: _td("If disabled, the space overview will be shown when switching to another space."), -+ supportedLevels: LEVELS_ACCOUNT_SETTINGS, -+ default: false, -+ }, - // SC settings end - "feature_video_rooms": { - isFeature: true, -diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts -index 60df05478a..0be7ba190a 100644 ---- a/src/stores/spaces/SpaceStore.ts -+++ b/src/stores/spaces/SpaceStore.ts -@@ -265,6 +265,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { - // else if the last viewed room in this space is joined then view that - // else view space home or home depending on what is being clicked on - if ( -+ SettingsStore.getValue("Spaces.returnToPreviouslyOpenedRoom") && - roomId && - cliSpace?.getMyMembership() !== KnownMembership.Invite && - this.matrixClient.getRoom(roomId)?.getMyMembership() === KnownMembership.Join && --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0013-Exclude-spaces-from-breadcrumbs.patch b/patches/matrix-react-sdk/0013-Exclude-spaces-from-breadcrumbs.patch deleted file mode 100644 index 49b0d89..0000000 --- a/patches/matrix-react-sdk/0013-Exclude-spaces-from-breadcrumbs.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 3aa2246c56ae3e5b7703003ef785d6e3ad77b844 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Tue, 9 Aug 2022 09:32:19 +0200 -Subject: Exclude spaces from breadcrumbs - ---- - src/stores/BreadcrumbsStore.ts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/stores/BreadcrumbsStore.ts b/src/stores/BreadcrumbsStore.ts -index 9859f24015..957b54286c 100644 ---- a/src/stores/BreadcrumbsStore.ts -+++ b/src/stores/BreadcrumbsStore.ts -@@ -137,6 +137,7 @@ export class BreadcrumbsStore extends AsyncStoreWithClient { - } - - private async appendRoom(room: Room): Promise { -+ if (room.isSpaceRoom()) return; - let updated = false; - const rooms = (this.state.rooms || []).slice(); // cheap clone - const msc3946ProcessDynamicPredecessor = SettingsStore.getValue("feature_dynamic_room_predecessors"); --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0014-Stop-the-search-bar-wobble.patch b/patches/matrix-react-sdk/0014-Stop-the-search-bar-wobble.patch deleted file mode 100644 index e4b33fc..0000000 --- a/patches/matrix-react-sdk/0014-Stop-the-search-bar-wobble.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 288aa3cf8e56a4ca60810eac98fb6f692b154f61 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Mon, 19 Aug 2024 20:27:33 +0200 -Subject: Stop the search bar wobble - ---- - res/css/_common.pcss | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/res/css/_common.pcss b/res/css/_common.pcss -index 05a3dac067..7861af6381 100644 ---- a/res/css/_common.pcss -+++ b/res/css/_common.pcss -@@ -181,6 +181,7 @@ input[type="search"].mx_textinput_icon { - padding-left: 36px; - background-repeat: no-repeat; - background-position: 10px center; -+ min-height: 33px; - } - - /* FIXME THEME - Tint by CSS rather than referencing a duplicate asset */ --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0015-Import-SC-compound-theme-overrides.patch b/patches/matrix-react-sdk/0015-Import-SC-compound-theme-overrides.patch deleted file mode 100644 index d823f0d..0000000 --- a/patches/matrix-react-sdk/0015-Import-SC-compound-theme-overrides.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a4bca41b7371c42499fd8c805482066514a9edc2 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -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 - -diff --git a/res/css/_common.pcss b/res/css/_common.pcss -index 7861af6381..f7a660a339 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. - - @import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") layer(compound); - @import url("@vector-im/compound-web/dist/style.css"); -+@import "./sc-cpd-overrides.css"; - @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 - diff --git a/patches/matrix-react-sdk/0016-No-damn-avatar-background-in-room-list.patch b/patches/matrix-react-sdk/0016-No-damn-avatar-background-in-room-list.patch deleted file mode 100644 index 2fa7d3a..0000000 --- a/patches/matrix-react-sdk/0016-No-damn-avatar-background-in-room-list.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fc577303d8c2d290f1c17e13deaf442822af68a1 Mon Sep 17 00:00:00 2001 -From: su-ex -Date: Tue, 7 Sep 2021 19:41:52 +0200 -Subject: No damn avatar background in room list - ---- - src/components/structures/BackdropPanel.tsx | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/components/structures/BackdropPanel.tsx b/src/components/structures/BackdropPanel.tsx -index 80c21235cc..a9c464f4b2 100644 ---- a/src/components/structures/BackdropPanel.tsx -+++ b/src/components/structures/BackdropPanel.tsx -@@ -13,6 +13,9 @@ interface IProps { - } - - export const BackdropPanel: React.FC = ({ backgroundImage, blurMultiplier }) => { -+ // SC: no damn avatar background in room list -+ return null; -+ - if (!backgroundImage) return null; - - const styles: CSSProperties = {}; --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0017-No-red-messages-in-1-1-chats-Close-SchildiChat-schil.patch b/patches/matrix-react-sdk/0017-No-red-messages-in-1-1-chats-Close-SchildiChat-schil.patch deleted file mode 100644 index b81a35b..0000000 --- a/patches/matrix-react-sdk/0017-No-red-messages-in-1-1-chats-Close-SchildiChat-schil.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e4a7ea01c2fd9f7d67660402c20bfdc5969f28c4 Mon Sep 17 00:00:00 2001 -From: su-ex -Date: Tue, 22 Dec 2020 19:16:28 +0100 -Subject: No red messages in 1:1 chats Close SchildiChat/schildichat-desktop#13 - ---- - src/components/views/rooms/EventTile.tsx | 6 ++++++ - 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 ---- a/src/components/views/rooms/EventTile.tsx -+++ b/src/components/views/rooms/EventTile.tsx -@@ -685,6 +685,12 @@ export class UnwrappedEventTile extends React.Component - return false; - } - -+ // don't show highlights in 1:1 rooms -+ const room = cli.getRoom(this.props.mxEvent.getRoomId()); -+ if (room && room.currentState.getJoinedMemberCount() === 2) { -+ return false; -+ } -+ - return !!(actions?.tweaks.highlight || previousActions?.tweaks.highlight); - } - --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0018-Always-apply-corner-radius-to-all-edges-of-the-bubbl.patch b/patches/matrix-react-sdk/0018-Always-apply-corner-radius-to-all-edges-of-the-bubbl.patch deleted file mode 100644 index 76d5935..0000000 --- a/patches/matrix-react-sdk/0018-Always-apply-corner-radius-to-all-edges-of-the-bubbl.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a37ca889b832578a9201a5b45b059f58eb781bc5 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sun, 13 Oct 2024 13:26:16 +0200 -Subject: Always apply corner radius to all edges of the bubble - ---- - res/css/views/rooms/_EventBubbleTile.pcss | 10 ++++++---- - 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 ---- 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. - 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); -+ border-bottom-left-radius: var(--cornerRadius); -+ border-bottom-right-radius: var(--cornerRadius); - - /* 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. - } - - &.mx_EventTile_continuation[data-self="false"] .mx_EventTile_line { -- border-top-left-radius: 0; -+ //border-top-left-radius: 0; - - .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. - .mx_MediaBody, - .mx_MLocationBody_map, - .mx_MBeaconBody { -- border-top-left-radius: 0; -+ //border-top-left-radius: 0; - } - } - &.mx_EventTile_lastInSection[data-self="false"] .mx_EventTile_line { -@@ -396,7 +398,7 @@ Please see LICENSE files in the repository root for full details. - } - - &.mx_EventTile_continuation[data-self="true"] .mx_EventTile_line { -- border-top-right-radius: 0; -+ //border-top-right-radius: 0; - - .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. - .mx_MediaBody, - .mx_MLocationBody_map, - .mx_MBeaconBody { -- border-top-right-radius: 0; -+ //border-top-right-radius: 0; - } - } - &.mx_EventTile_lastInSection[data-self="true"] .mx_EventTile_line { --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0019-Always-show-timestamps-by-default.patch b/patches/matrix-react-sdk/0019-Always-show-timestamps-by-default.patch deleted file mode 100644 index 8abccc6..0000000 --- a/patches/matrix-react-sdk/0019-Always-show-timestamps-by-default.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 57942189da5f80069ee4b03dc2fbeb24ce6b4f7b Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Sun, 13 Oct 2024 13:53:07 +0200 -Subject: Always show timestamps by default - ---- - src/settings/Settings.tsx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx -index be4433e1bc..1052bca0c9 100644 ---- a/src/settings/Settings.tsx -+++ b/src/settings/Settings.tsx -@@ -662,7 +662,7 @@ export const SETTINGS: { [setting: string]: ISetting } = { - "alwaysShowTimestamps": { - supportedLevels: LEVELS_ACCOUNT_SETTINGS, - displayName: _td("settings|always_show_message_timestamps"), -- default: false, -+ default: true, - }, - "userTimezone": { - supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS, --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0021-Enable-custom-emote-rendering-by-default.patch b/patches/matrix-react-sdk/0021-Enable-custom-emote-rendering-by-default.patch deleted file mode 100644 index 2db22df..0000000 --- a/patches/matrix-react-sdk/0021-Enable-custom-emote-rendering-by-default.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 47bcb08e971256fe94a0b07fb553b75400e648ed Mon Sep 17 00:00:00 2001 -From: SpiritCroc -Date: Thu, 17 Oct 2024 19:40:51 +0200 -Subject: Enable custom emote rendering by default - ---- - src/settings/Settings.tsx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx -index 1052bca0c9..f5fcb5d7a5 100644 ---- a/src/settings/Settings.tsx -+++ b/src/settings/Settings.tsx -@@ -514,7 +514,7 @@ export const SETTINGS: { [setting: string]: ISetting } = { - description: _td("labs|render_reaction_images_description"), - supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG_PRIORITISED, - supportedLevelsAreOrdered: true, -- default: false, -+ default: true, - }, - /** - * With the transition to Compound we are moving to a base font size --- -2.47.0 - diff --git a/patches/matrix-react-sdk/0022-Don-t-symlink-css-to-fix-Windows-native-build.patch b/patches/matrix-react-sdk/0022-Don-t-symlink-css-to-fix-Windows-native-build.patch deleted file mode 100644 index 124a69c..0000000 --- a/patches/matrix-react-sdk/0022-Don-t-symlink-css-to-fix-Windows-native-build.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 16fe0fe8d0068e4c5da3fa5516c5578d2ffaabc7 Mon Sep 17 00:00:00 2001 -From: SpiritCroc -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 - diff --git a/publish_release.sh b/publish_release.sh new file mode 100755 index 0000000..cd5874c --- /dev/null +++ b/publish_release.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +mydir="$(dirname "$(realpath "$0")")" + +pushd "$mydir" > /dev/null + +source ./merge_helpers.sh + +# Check branch +check_branch $branch +forall_repos check_branch $branch + +# Ensure clean git state +forall_repos check_clean_git + +git fetch origin +git branch -D master || true +git checkout -b master --track origin/master +git merge --ff-only sc +git push +git checkout sc +forall_repos git fetch origin +forall_repos git branch -D master || true +forall_repos git checkout -b master --track origin/master +forall_repos git merge --ff-only sc +forall_repos git push +forall_repos git checkout sc + +popd > /dev/null diff --git a/push_current_sc_branches.sh b/push_current_sc_branches.sh deleted file mode 100755 index 7a34314..0000000 --- a/push_current_sc_branches.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e - -mydir="$(dirname "$(realpath "$0")")" -pushd "$mydir" > /dev/null - -source ./merge_helpers.sh - -get_branch_of() { - local repo="$1" - pushd "$repo" > /dev/null - local b=`git branch --show-current` - if [[ "$b" = sc_v* ]]; then - echo "$b" - else - >&2 echo "Unexpected branch name for $repo: $b" - exit 1 - fi - popd > /dev/null -} - -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 - 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 -fi - -branch="$b_js" - -echo "Pushing to all repos: $branch" -forall_repos git push --set-upstream origin "$branch" "$@" diff --git a/res/css/sc-cpd-overrides.css b/res/css/sc-cpd-overrides.css deleted file mode 100644 index a9987b0..0000000 --- a/res/css/sc-cpd-overrides.css +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Upstream file for reference: - * - Dark: https://github.com/element-hq/compound-design-tokens/blob/main/assets/web/css/cpd-theme-dark-base.css - * - Light: https://github.com/element-hq/compound-design-tokens/blob/main/assets/web/css/cpd-theme-light-base.css - */ - -.cpd-theme-dark.cpd-theme-dark { - --cpd-color-text-primary: rgba(255, 255, 255, 0.9); - --cpd-color-text-secondary: rgba(255, 255, 255, 0.65); - /* TODO? - --cpd-color-alpha-green-1400: hsla(152, 88%, 94%, 0.96); - --cpd-color-alpha-green-1300: hsla(152, 93%, 88%, 0.91); - --cpd-color-alpha-green-1200: hsla(156, 97%, 76%, 0.83); - --cpd-color-alpha-green-1100: hsla(162, 98%, 57%, 0.74); - --cpd-color-alpha-green-1000: hsla(163, 99%, 55%, 0.65); - --cpd-color-alpha-green-900: hsla(164, 98%, 53%, 0.58); - --cpd-color-alpha-green-800: hsl(168, 100%, 24%, 1); - --cpd-color-alpha-green-700: hsl(165, 100%, 18%, 1); - --cpd-color-alpha-green-600: hsl(162, 100%, 14%, 1); - --cpd-color-alpha-green-500: hsl(160, 100%, 12%, 1); - --cpd-color-alpha-green-400: hsl(155, 100%, 9%, 1); - --cpd-color-alpha-green-300: hsl(151, 100%, 7%, 1); - --cpd-color-alpha-green-200: hsl(147, 100%, 6%, 1); - --cpd-color-alpha-green-100: hsl(144, 100%, 6%, 1); - - --cpd-color-alpha-gray-1400: hsla(214, 78%, 98%, 0.95); - --cpd-color-alpha-gray-1300: hsla(213, 73%, 97%, 0.89); - --cpd-color-alpha-gray-1200: hsla(215, 74%, 96%, 0.79); - --cpd-color-alpha-gray-1100: hsla(215, 92%, 95%, 0.68); - --cpd-color-alpha-gray-1000: hsla(213, 93%, 94%, 0.61); - --cpd-color-alpha-gray-900: hsla(211, 94%, 94%, 0.54); - --cpd-color-alpha-gray-800: hsla(216, 100%, 94%, 0.41); - --cpd-color-alpha-gray-700: hsla(213, 85%, 95%, 0.27); - --cpd-color-alpha-gray-600: hsla(225, 46%, 95%, 0.2); - --cpd-color-alpha-gray-500: hsla(214, 41%, 97%, 0.15); - --cpd-color-alpha-gray-400: hsla(270, 37%, 93%, 0.1); - --cpd-color-alpha-gray-200: hsla(286, 31%, 82%, 0.04); - --cpd-color-alpha-gray-100: hsla(214, 10%, 86%, 0.02); - */ - /* Hover of room list items, search bar bg, space icon bg */ - --cpd-color-alpha-gray-300: rgba(255, 255, 255, 0.06); - - /* TODO more accent variants? */ - --cpd-color-green-1400: #F1F8E9; - --cpd-color-green-1300: #DCEDC8; - --cpd-color-green-1200: #C5E1A5; - --cpd-color-green-1100: #AED581; - --cpd-color-green-1000: #9CCC65; - --cpd-color-green-900: #8BC34A; - --cpd-color-green-800: #8BC34A; - --cpd-color-green-700: #8BC34A; - --cpd-color-green-600: #8BC34A; - --cpd-color-green-500: #8BC34A; - --cpd-color-green-400: #689F38; - --cpd-color-green-300: #33691E; - --cpd-color-green-200: #33691E; - --cpd-color-green-100: #33691E; - - /* TODO - --cpd-color-red-1400: #ffe9e6; - --cpd-color-red-1300: #ffd4cd; - --cpd-color-red-1200: #ffaea4; - --cpd-color-red-1100: #ff877c; - --cpd-color-red-1000: #ff665d; - --cpd-color-red-900: #fd3e3c; - --cpd-color-red-800: #d1212a; - --cpd-color-red-700: #9f0d1e; - --cpd-color-red-600: #830009; - --cpd-color-red-500: #710000; - --cpd-color-red-400: #590000; - --cpd-color-red-300: #470000; - --cpd-color-red-200: #3e0000; - --cpd-color-red-100: #370000; - */ - - --cpd-color-gray-1400: #eeeeee; - --cpd-color-gray-1300: #e0e0e0; - --cpd-color-gray-1200: #b3b3b3; - --cpd-color-gray-1100: #aaaaaa; - --cpd-color-gray-1000: #9e9e9e; - --cpd-color-gray-900: #808080; - --cpd-color-gray-800: #757575; - --cpd-color-gray-700: #424242; - --cpd-color-gray-600: #424242; - --cpd-color-gray-500: #424242; - --cpd-color-gray-400: #303030; - --cpd-color-gray-300: #212121; - --cpd-color-gray-200: #212121; - --cpd-color-gray-100: #171717; - --cpd-color-theme-bg: #171717; -} - -.cpd-theme-light.cpd-theme-light { - /* TODO? - --cpd-color-alpha-gray-1400: hsla(223, 64%, 2%, 0.9); - --cpd-color-alpha-gray-1300: hsla(225, 57%, 3%, 0.84); - --cpd-color-alpha-gray-1200: hsla(213, 73%, 3%, 0.77); - --cpd-color-alpha-gray-1100: hsla(215, 74%, 5%, 0.71); - --cpd-color-alpha-gray-1000: hsla(218, 79%, 6%, 0.66); - --cpd-color-alpha-gray-900: hsla(213, 83%, 7%, 0.61); - --cpd-color-alpha-gray-800: hsla(213, 87%, 9%, 0.5); - --cpd-color-alpha-gray-700: hsla(215, 96%, 10%, 0.35); - --cpd-color-alpha-gray-600: hsla(212, 97%, 12%, 0.26); - --cpd-color-alpha-gray-500: hsla(212, 87%, 15%, 0.2); - --cpd-color-alpha-gray-400: hsla(213, 90%, 20%, 0.12); - --cpd-color-alpha-gray-300: hsla(216, 89%, 18%, 0.06); - --cpd-color-alpha-gray-200: hsla(200, 41%, 36%, 0.04); - --cpd-color-alpha-gray-100: hsla(210, 48%, 41%, 0.02); - - --cpd-color-alpha-green-1400: hsl(149, 100%, 7%, 1); - --cpd-color-alpha-green-1300: hsl(157, 100%, 10%, 1); - --cpd-color-alpha-green-1200: hsl(162, 100%, 14%, 1); - --cpd-color-alpha-green-1100: hsl(165, 100%, 18%, 1); - --cpd-color-alpha-green-1000: hsl(166, 100%, 21%, 1); - --cpd-color-alpha-green-900: hsl(168, 100%, 24%, 1); - --cpd-color-alpha-green-800: hsl(166, 100%, 30%, 1); - --cpd-color-alpha-green-700: hsla(163, 99%, 38%, 0.96); - --cpd-color-alpha-green-600: hsla(156, 99%, 36%, 0.56); - --cpd-color-alpha-green-500: hsla(154, 96%, 37%, 0.41); - --cpd-color-alpha-green-400: hsla(151, 93%, 37%, 0.23); - --cpd-color-alpha-green-300: hsla(150, 100%, 36%, 0.11); - --cpd-color-alpha-green-200: hsla(150, 79%, 41%, 0.06); - --cpd-color-alpha-green-100: hsla(156, 79%, 41%, 0.03); - */ - - /* TODO accent variants? */ - --cpd-color-green-1400: #33691E; - --cpd-color-green-1300: #33691E; - --cpd-color-green-1200: #33691E; - --cpd-color-green-1100: #33691E; - --cpd-color-green-1000: #33691E; - --cpd-color-green-900: #33691E; - --cpd-color-green-800: #33691E; - --cpd-color-green-700: #8BC34A; - --cpd-color-green-600: #8BC34A; - --cpd-color-green-500: #8BC34A; - --cpd-color-green-400: #8BC34A; - --cpd-color-green-300: #C5E1A5; - --cpd-color-green-200: #DCEDC8; - --cpd-color-green-100: #F1F8E9; - - /* TODO - --cpd-color-red-1400: #450000; - --cpd-color-red-1300: #620000; - --cpd-color-red-1200: #850006; - --cpd-color-red-1100: #a4041d; - --cpd-color-red-1000: #bc0f22; - --cpd-color-red-900: #d51928; - --cpd-color-red-800: #ff3d3d; - --cpd-color-red-700: #ff8c81; - --cpd-color-red-600: #ffafa5; - --cpd-color-red-500: #ffc5bc; - --cpd-color-red-400: #ffdfda; - --cpd-color-red-300: #ffefec; - --cpd-color-red-200: #fff7f6; - --cpd-color-red-100: #fffaf9; - */ - - --cpd-color-gray-1400: #212121; - --cpd-color-gray-1300: #212121; - --cpd-color-gray-1200: #424242; - --cpd-color-gray-1100: #424242; - --cpd-color-gray-1000: #616161; - --cpd-color-gray-900: #616161; - --cpd-color-gray-800: #808080; - --cpd-color-gray-700: #b3b3b3; - --cpd-color-gray-600: #b3b3b3; - --cpd-color-gray-500: #cdd3da; - --cpd-color-gray-400: #e0e0e0; - --cpd-color-gray-300: #f5f5f5; - --cpd-color-gray-200: #f5f5f5; - --cpd-color-gray-100: #fafafa; - --cpd-color-theme-bg: #ffffff; -} diff --git a/setup.sh b/setup.sh index 65e945a..98aabe1 100755 --- a/setup.sh +++ b/setup.sh @@ -25,15 +25,9 @@ popd pushd element-desktop $yarn install -# Seshat: compare https://github.com/element-hq/element-desktop/blob/develop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms -$yarn add matrix-seshat -#$yarn add electron-build-env -#$yarn run electron-build-env -- --electron "$electron_version" -- neon build matrix-seshat --release +ln -s ../element-web/webapp ./ || true popd pushd i18n-helper $yarn install popd - -# CSS overrides -cp res/css/* matrix-react-sdk/res/css/ diff --git a/theme.sh b/theme.sh deleted file mode 100755 index 2255068..0000000 --- a/theme.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/bash - -set -e -shopt -s globstar - -mydir="$(dirname "$(realpath "$0")")" -automatic_commit="$1" - -pushd "$mydir/matrix-react-sdk" > /dev/null - -if [[ "$automatic_commit" == [Yy]* ]]; then - # Require clean git state - uncommitted=`git status --porcelain` - if [ ! -z "$uncommitted" ]; then - echo "Uncommitted changes are present, please commit first!" - exit 1 - fi -fi - -M_ACCENT="#8bc34a" -M_ACCENT_DEC="139, 195, 74" -M_ACCENT_DARK="#33691e" -M_ACCENT_LIGHT="#dcedc8" -M_ALERT="#e53935" -M_LINK="#368bd6" - -replace_colors() { - local f="$1" - if [[ "$f" =~ "dark" ]]; then - echo "Replacing colors (dark) for $f..." - BG_ACCENT="$M_ACCENT_DARK" - CODEBLOCK_BORDER_COLOR="#121212" - CODEBLOCK_BACKGROUND_COLOR="#121212" - PILL_COLOR="rgba(255, 255, 255, 0.15)" - PILL_HOVER_COLOR="rgba(255, 255, 255, 0.18)" - PRESENCE_OFFLINE="#e0e0e0" # not applied because not existing specifically for dark - MESSAGE_BUBBLE_BACKGROUND="#424242" - MESSAGE_BUBBLE_BACKGROUND_SELF="#303030" - MESSAGE_BUBBLE_BACKGROUND_SELECTED="#212121" - ROOMLIST_BG_COLOR="#303030" - SPACELIST_BG_COLOR="#424242" - else - echo "Replacing colors (light) for $f..." - BG_ACCENT="$M_ACCENT_LIGHT" - CODEBLOCK_BORDER_COLOR="#00000010" - CODEBLOCK_BACKGROUND_COLOR="#00000010" - PILL_COLOR="rgba(0, 0, 0, 0.13)" - PILL_HOVER_COLOR="rgba(0, 0, 0, 0.1)" - PRESENCE_OFFLINE="#bdbdbd" # for light this should actually be darker - MESSAGE_BUBBLE_BACKGROUND="#eeeeee" - MESSAGE_BUBBLE_BACKGROUND_SELF="#f1f8e9" - MESSAGE_BUBBLE_BACKGROUND_SELECTED="#e0e0e0" - ROOMLIST_BG_COLOR="#eeeeee" - SPACELIST_BG_COLOR="#fafafa" - fi - # Neutral colors - sed -i 's|#15171b|#212121|gi' "$f" - sed -i 's|#15191E|#212121|gi' "$f" - sed -i 's|#2e2f32|#212121|gi' "$f" - sed -i 's|#232f32|#212121|gi' "$f" - sed -i 's|#27303a|#212121|gi' "$f" - sed -i 's|#17191C|#212121|gi' "$f" - sed -i 's|#181b21|#303030|gi' "$f" - sed -i 's|#1A1D23|#303030|gi' "$f" - sed -i 's|#20252B|#303030|gi' "$f" - sed -i 's|#20252c|#303030|gi' "$f" - sed -i 's|#21262c|#383838|gi' "$f" # selection/hover color - sed -i 's|#238cf5|#303030|gi' "$f" - sed -i 's|#25271F|#303030|gi' "$f" - sed -i 's|#272c35|#303030|gi' "$f" - sed -i 's|#2a3039|#303030|gi' "$f" - sed -i 's|#343a46|#424242|gi' "$f" - sed -i 's|#3c4556|#424242|gi' "$f" - sed -i 's|#3d3b39|#424242|gi' "$f" - sed -i 's|#45474a|#424242|gi' "$f" - sed -i 's|#454545|#424242|gi' "$f" - sed -i 's|#2e3649|#424242|gi' "$f" - sed -i 's|#4e5054|#424242|gi' "$f" - sed -i 's|#394049|#424242|gi' "$f" - sed -i 's|#3e444c|#424242|gi' "$f" - sed -i 's|#61708b|#616161|gi' "$f" - sed -i 's|#616b7f|#616161|gi' "$f" - sed -i 's|#5c6470|#616161|gi' "$f" - sed -i 's|#545a66|#616161|gi' "$f" # pill hover bg color - sed -i 's|#737D8C|#757575|gi' "$f" - sed -i 's|#6F7882|#757575|gi' "$f" - sed -i 's|#91A1C0|#757575|gi' "$f" # icon in button color - sed -i 's|#8D99A5|#808080|gi' "$f" - sed -i 's|#8E99A4|#808080|gi' "$f" # maybe use #9e9e9e instead - sed -i 's|#8D97A5|#808080|gi' "$f" - sed -i 's|#a2a2a2|#9e9e9e|gi' "$f" - sed -i 's|#9fa9ba|#aaaaaa|gi' "$f" # maybe use #9e9e9e instead - sed -i 's|#acacac|#aaaaaa|gi' "$f" # maybe use #9e9e9e instead - sed -i 's|#B9BEC6|#b3b3b3|gi' "$f" # maybe use #bdbdbd instead - sed -i 's|#a1b2d1|#b3b3b3|gi' "$f" - sed -i 's|#A9B2BC|#b3b3b3|gi' "$f" - sed -i 's|#C1C6CD|#bdbdbd|gi' "$f" - sed -i 's|#c1c9d6|#bdbdbd|gi' "$f" - sed -i 's|#c8c8cd|#cccccc|gi' "$f" # maybe use #bdbdbd instead - # sed -i 's|#dddddd|#e0e0e0|gi' "$f" # really? - sed -i 's|#e7e7e7|#e0e0e0|gi' "$f" - sed -i 's|#e3e8f0|#e0e0e0|gi' "$f" - sed -i 's|#e9e9e9|#e0e0e0|gi' "$f" - sed -i 's|#e9edf1|#e0e0e0|gi' "$f" - sed -i 's|#e8eef5|#e0e0e0|gi' "$f" - sed -i 's|#deddfd|#e0e0e0|gi' "$f" # $location-live-secondary-color, what to use really? - sed -i 's|#edf3ff|#eeeeee|gi' "$f" - sed -i 's|#f4f6fa|#f5f5f5|gi' "$f" - sed -i 's|#f6f7f8|#f5f5f5|gi' "$f" - sed -i 's|#f2f5f8|#f5f5f5|gi' "$f" - sed -i 's|#f5f8fa|#f5f5f5|gi' "$f" - sed -i 's|#f3f8fd|#fafafa|gi' "$f" - sed -i 's|rgba(33, 38, 34,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(33, 38, 44,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(34, 38, 46,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(38, 39, 43,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(38, 40, 45,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(46, 48, 51,|rgba(48, 48, 48,|gi' "$f" - sed -i 's|rgba(92, 100, 112,|rgba(97, 97, 97,|gi' "$f" - sed -i 's|rgba(141, 151, 165,|rgba(144, 144, 144,|gi' "$f" - sed -i 's|rgba(242, 245, 248,|rgba(248, 248, 248,|gi' "$f" - - sed -i "s|\\(\$event-highlight-bg-color: \\).*;|\\1transparent;|gi" "$f" - sed -i "s|\\(\$preview-widget-bar-color: \\).*;|\\1#bdbdbd;|gi" "$f" - sed -i "s|\\(\$blockquote-bar-color: \\).*;|\\1#bdbdbd;|gi" "$f" - sed -i "s|\\(\$pill-bg-color: \\).*;|\\1$PILL_COLOR;|gi" "$f" - sed -i "s|\\(\$pill-hover-bg-color: \\).*;|\\1$PILL_HOVER_COLOR;|gi" "$f" - - sed -i "s|\\(\$inlinecode-border-color: \\).*;|\\1$CODEBLOCK_BORDER_COLOR;|gi" "$f" - sed -i "s|\\(\$inlinecode-background-color: \\).*;|\\1$CODEBLOCK_BACKGROUND_COLOR;|gi" "$f" - sed -i "s|\\(\$codeblock-background-color: \\).*;|\\1$CODEBLOCK_BACKGROUND_COLOR;|gi" "$f" - - sed -i "s|\\(\$presence-offline: \\).*;|\\1$PRESENCE_OFFLINE;|gi" "$f" - - sed -i "s|\\(\$roomlist-bg-color: \\).*;|\\1$ROOMLIST_BG_COLOR;|gi" "$f" - sed -i "s|\\(\$spacePanel-bg-color: \\).*;|\\1$SPACELIST_BG_COLOR;|gi" "$f" - - # Accent colors - sed -i "s|#368bd6|$M_ACCENT|gi" "$f" - sed -i "s|#ac3ba8|$M_ACCENT|gi" "$f" - sed -i "s|#0DBD8B|$M_ACCENT|gi" "$f" - sed -i "s|#e64f7a|$M_ACCENT|gi" "$f" - sed -i "s|#ff812d|$M_ACCENT|gi" "$f" - sed -i "s|#2dc2c5|$M_ACCENT|gi" "$f" - sed -i "s|#5c56f5|$M_ACCENT|gi" "$f" - sed -i "s|#74d12c|$M_ACCENT|gi" "$f" - sed -i "s|#76CFA6|$M_ACCENT|gi" "$f" - sed -i "s|#03b381|$M_ACCENT|gi" "$f" - sed -i "s|rgba(3, 179, 129,|rgba($M_ACCENT_DEC,|gi" "$f" - sed -i "s|#03b381|$M_ACCENT|gi" "$f" - sed -i "s|#FF5B55|$M_ALERT|gi" "$f" - sed -i "s|\\(\$accent-alt: \\).*;|\\1$M_LINK;|gi" "$f" - #sed -i "s|\\(\$accent-darker: \\).*;|\\1$M_ACCENT_DARK;|gi" "$f" - sed -i "s|\\(\$roomtile-default-badge-bg-color: \\).*;|\\1$M_ACCENT;|gi" "$f" - #sed -i "s|\\(\$input-focused-border-color: \\).*;|\\1\$accent;|gi" "$f" # not existing anymore, need replacement? - sed -i "s|\\(\$reaction-row-button-selected-bg-color: \\).*;|\\1$BG_ACCENT;|gi" "$f" - - # e2e colors - sed -i "s|\\(\$e2e-verified-color: \\).*;|\\1$M_ACCENT;|gi" "$f" - sed -i "s|\\(\$e2e-unknown-color: \\).*;|\\1#ffc107;|gi" "$f" - sed -i "s|\\(\$e2e-unverified-color: \\).*;|\\1#ffc107;|gi" "$f" - sed -i "s|\\(\$e2e-warning-color: \\).*;|\\1$M_ALERT;|gi" "$f" - - # Message bubbles - sed -i "s|\\(\$eventbubble-self-bg: \\).*;|\$eventbubble-self-bg: $MESSAGE_BUBBLE_BACKGROUND_SELF;|gi" "$f" - sed -i "s|\\(\$eventbubble-others-bg: \\).*;|\$eventbubble-others-bg: $MESSAGE_BUBBLE_BACKGROUND;|gi" "$f" - sed -i "s|\\(\$eventbubble-bg-hover: \\).*;|\$eventbubble-bg-hover: $MESSAGE_BUBBLE_BACKGROUND_SELECTED;|gi" "$f" - #sed -i "s|\\(\$eventbubble-reply-color: \\).*;$||gi" "$f" -} - -replace_colors res/themes/light/css/light.pcss -replace_colors res/themes/light/css/_light.pcss -replace_colors res/themes/legacy-light/css/legacy-light.pcss -replace_colors res/themes/legacy-light/css/_legacy-light.pcss -replace_colors res/themes/dark/css/dark.pcss -replace_colors res/themes/dark/css/_dark.pcss -replace_colors res/themes/legacy-dark/css/legacy-dark.pcss -replace_colors res/themes/legacy-dark/css/_legacy-dark.pcss -for f in res/**/*.svg; do - replace_colors "$f" -done - -if [[ "$automatic_commit" == [Yy]* ]]; then - # see: https://devops.stackexchange.com/a/5443 - git add -A - git diff-index --quiet HEAD || git commit -m "Automatic theme update" -fi - -popd > /dev/null