Merge branch 'master' into master

This commit is contained in:
Zhymabek Roman 2023-01-02 21:59:29 +06:00 committed by GitHub
commit 59410a99ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
297 changed files with 21498 additions and 2764 deletions

32
.ci/macos/build.sh Executable file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env sh
set -u
# unused
#TAG=$(git tag -l --points-at HEAD)
# Add Qt binaries to path
PATH="$(brew --prefix qt5):${PATH}"
export PATH
CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
export CMAKE_PREFIX_PATH
cmake -GNinja -S. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=.deps/usr \
-DHUNTER_ROOT="../.hunter" \
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
-DUSE_BUNDLED_OPENSSL=ON \
-DCI_BUILD=ON
cmake --build build
( cd build || exit
git clone https://github.com/Nheko-Reborn/qt-jdenticon.git
( cd qt-jdenticon || exit
qmake
make -j 4
cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS
)
"$(brew --prefix qt5)/bin/macdeployqt" nheko.app -always-overwrite -qmldir=../resources/qml/
)

View file

@ -1,34 +0,0 @@
#!/usr/bin/env sh
set -eux
# unused
#TAG=$(git tag -l --points-at HEAD)
# Add Qt binaries to path
PATH=/usr/local/opt/qt@5/bin/:${PATH}
( cd build
# macdeployqt does not copy symlinks over.
# this specifically addresses icu4c issues but nothing else.
ICU_LIB="$(brew --prefix icu4c)/lib"
export ICU_LIB
mkdir -p nheko.app/Contents/Frameworks
find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/
user=$(id -nu)
chown "${user}" nheko.dmg
mv nheko.dmg ..
)
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg
VERSION=${CI_COMMIT_SHORT_SHA}
if [ -n "$VERSION" ]; then
mv nheko.dmg "nheko-${VERSION}.dmg"
mkdir artifacts
cp "nheko-${VERSION}.dmg" artifacts/
fi

View file

@ -7,24 +7,28 @@ set -u
# Add Qt binaries to path
PATH="/usr/local/opt/qt@5/bin/:${PATH}"
export PATH
security unlock-keychain -p "${RUNNER_USER_PW}" login.keychain
( cd build || exit
# macdeployqt does not copy symlinks over.
# this specifically addresses icu4c issues but nothing else.
# We might not even need this any longer...
# ICU_LIB="$(brew --prefix icu4c)/lib"
# export ICU_LIB
# mkdir -p nheko.app/Contents/Frameworks
# find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
if [ -n "${CI_PIPELINE_TRIGGERED:-}" ] && [ "${TRIGGERED_BY:-}" = "cirrus" ]; then
echo "cirrus build id: ${TRIGGER_BUILD_ID}"
cat "${TRIGGER_PAYLOAD}"
# download the build artifacts from cirrus api
curl "https://api.cirrus-ci.com/v1/artifact/build/${TRIGGER_BUILD_ID}/binaries.zip" -o binaries.zip
# cirrus ci artifacts task name is 'binaries' so that's the zip name.
unzip binaries.zip
# we zip 'build/nheko.app' in cirrus ci, cirrus itself puts it in a 'build' directory
# so move it to the right place for the rest of the process.
( cd build || exit
unzip nheko.zip
)
fi
#macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/ -sign-for-notarization="${APPLE_DEV_IDENTITY}"
macdeployqt nheko.app -always-overwrite -qmldir=../resources/qml/
# user=$(id -nu)
# chown "${user}" nheko.dmg
)
if [ ! -d "build/nheko.app" ]; then
echo "nheko.app is missing, you did something wrong!"
exit 1
fi
echo "[INFO] Signing app contents"
find "build/nheko.app/Contents"|while read -r fname; do
@ -46,6 +50,7 @@ trap finish EXIT
dmgbuild -s .ci/macos/settings.json "Nheko" nheko.dmg
codesign -s "${APPLE_DEV_IDENTITY}" nheko.dmg
user=$(id -nu)
chown "${user}" nheko.dmg
@ -72,7 +77,7 @@ while sleep 60 && date; do
#isSuccess=$(grep "success" "$NOTARIZE_STATUS_LOG")
#isFailure=$(grep "invalid" "$NOTARIZE_STATUS_LOG")
echo "Status for submission \"${requestUUID}\": \"${sub_status}\""
echo "Status for submission \"${requestUUID}\": \"${sub_status}\""
if [ "${sub_status}" = "Accepted" ]; then
echo "Notarization done!"
@ -82,6 +87,7 @@ while sleep 60 && date; do
fi
if [ "${sub_status}" = "Invalid" ] || [ "${sub_status}" = "Rejected" ]; then
echo "Notarization failed"
xcrun notarytool log "${requestUUID}" --apple-id "${APPLE_DEV_USER}" --password "${APPLE_DEV_PASS}" --team-id "${APPLE_TEAM_ID}" > "$NOTARIZE_STATUS_LOG" 2>&1
cat "$NOTARIZE_STATUS_LOG" 1>&2
exit 1
fi
@ -91,7 +97,7 @@ done
VERSION=${CI_COMMIT_SHORT_SHA}
if [ -n "$VERSION" ]; then
mv nheko.dmg "nheko-${VERSION}.dmg"
mv nheko.dmg "nheko-${VERSION}_${PLAT}.dmg"
mkdir artifacts
cp "nheko-${VERSION}.dmg" artifacts/
cp "nheko-${VERSION}_${PLAT}.dmg" artifacts/
fi

24
.cirrus.yml Normal file
View file

@ -0,0 +1,24 @@
task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:13
name: Build - macOS Apple Silicon
only_if: $CIRRUS_REPO_OWNER == 'Nheko-Reborn'
environment:
GITLAB_TRIGGER_TOKEN: ENCRYPTED[!5fb4bbdecbde3b2c766ac7383dca573cd5ec8b815c5ac9bede0cadfe9ad70ecd3e64b1728f7840da087099f3fc1fd4f7!]
homebrew_script:
- brew bundle --file .ci/macos/Brewfile
build_script:
- export PATH="$(brew --prefix qt5)/bin/:${PATH}"
- ./.ci/macos/build.sh
zip_script:
- ditto -c -k --sequesterRsrc --keepParent build/nheko.app build/nheko.zip
gitlab_script:
- curl -X POST
--fail
-F token="${GITLAB_TRIGGER_TOKEN}"
-F ref="${CIRRUS_BRANCH}"
-F "variables[TRIGGER_BUILD_ID]=${CIRRUS_BUILD_ID}"
-F "variables[TRIGGERED_BY]=cirrus"
"https://nheko.im/api/v4/projects/2/trigger/pipeline"
binaries_artifacts:
path: build/nheko.zip

View file

@ -13,3 +13,6 @@ KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Right
Cpp11BracedListStyle: true
PenaltyReturnTypeOnItsOwnLine: 0
---
BasedOnStyle: WebKit
Language: ObjC

View file

@ -14,10 +14,10 @@ build-clazy:
before_script:
- apt-get update
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake liblmdb-dev libre2-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
script:
- export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}"
- export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
@ -28,6 +28,8 @@ build-clazy:
-DCMAKE_BUILD_TYPE=Release
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF -DCMAKE_CXX_COMPILER=clazy
- cmake --build build
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
cache:
key: "$CI_JOB_NAME"
paths:
@ -41,11 +43,11 @@ build-gcc11:
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
# need recommended deps for wget
- apt-get -y install wget
- /usr/sbin/update-ccache-symlinks
@ -63,6 +65,8 @@ build-gcc11:
- cmake --build build
after_script:
- mv ../.hunter .hunter
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
cache:
key: "$CI_JOB_NAME"
paths:
@ -77,11 +81,11 @@ build-gcc10:
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
# need recommended deps for wget
- apt-get -y install wget
- /usr/sbin/update-ccache-symlinks
@ -100,6 +104,8 @@ build-gcc10:
- cmake --build build
after_script:
- mv ../.hunter .hunter
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
cache:
key: "$CI_JOB_NAME"
paths:
@ -112,22 +118,11 @@ build-macos:
before_script:
- rm -rf ../.hunter && mv .hunter ../.hunter || true
script:
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5
- cmake -GNinja -H. -Bbuild
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT="../.hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo
-DUSE_BUNDLED_OPENSSL=ON
-DUSE_BUNDLED_BOOST=ON
-DCI_BUILD=ON
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
- cmake --build build
- (cd build && git clone https://github.com/Nheko-Reborn/qt-jdenticon.git && cd qt-jdenticon && qmake && make -j 4 && cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS)
- ./.ci/macos/build.sh
after_script:
- mv ../.hunter .hunter
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
artifacts:
paths:
- build/nheko.app
@ -143,22 +138,27 @@ build-macos:
codesign-macos:
stage: deploy
tags: [macos]
variables:
PLAT: "intel"
before_script:
- 'brew upgrade qt@5'
- pip3 install dmgbuild
script:
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
- ./.ci/macos/notarize.sh
after_script:
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}_${PLAT}.dmg
needs:
- build-macos
- job: build-macos
optional: true # optional since we want to be able to also trigger this job from cirrus ci for apple silicon builds.
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if : '$CI_PIPELINE_TRIGGERED && $CI_COMMIT_REF_PROTECTED == "true"'
variables:
PLAT: "m1"
- if : '$CI_COMMIT_BRANCH == "master"'
- if : $CI_COMMIT_TAG
artifacts:
paths:
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}_${PLAT}.dmg
- /tmp/notarize*
name: nheko-${CI_COMMIT_SHORT_SHA}-macos
@ -181,6 +181,8 @@ build-flatpak-amd64:
after_script:
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-amd64.flatpak
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
cache:
key: "$CI_JOB_NAME"
paths:
@ -202,13 +204,16 @@ build-flatpak-arm64:
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
script:
- export VERSION=$(git describe)
- if [ "$(grep MemTotal /proc/meminfo | tr -cd '[0-9]')" -lt "6000000" ]; then export EXTRA_FLAGS='--jobs=3'; fi
- mkdir -p build-flatpak
- cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
- flatpak-builder --user --disable-rofiles-fuse --ccache $EXTRA_FLAGS --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
after_script:
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-arm64.flatpak
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'
cache:
key: "$CI_JOB_NAME"
paths:
@ -285,3 +290,6 @@ linting:
script:
- make lint
- make license
rules:
- if : '$CI_PIPELINE_TRIGGERED == null'

View file

@ -25,9 +25,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default")
option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.24.3.tar.gz"
SHA1 "10738b59e539818a01090e64c2d09896247530c7"
LOCAL
URL "https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz"
SHA1 "ca7838dded9a1811b04ffd56175f629e0af82d3d"
LOCAL
)
macro(hunter_add_package_safe)
@ -186,7 +186,7 @@ if(USE_BUNDLED_COEURL)
FetchContent_Declare(
coeurl
GIT_REPOSITORY https://nheko.im/Nheko-Reborn/coeurl.git
GIT_TAG v0.2.1
GIT_TAG f989f3c54c1ca15e29c5bd6b1ce4efbcb3fd8078
)
FetchContent_MakeAvailable(coeurl)
set(COEURL_TARGET_NAME coeurl::coeurl)
@ -451,6 +451,8 @@ set(SRC_FILES
src/ColorImageProvider.h
src/CombinedImagePackModel.cpp
src/CombinedImagePackModel.h
src/CommandCompleter.cpp
src/CommandCompleter.h
src/CompletionModelRoles.h
src/CompletionProxyModel.cpp
src/CompletionProxyModel.h
@ -592,8 +594,8 @@ if(USE_BUNDLED_MTXCLIENT)
include(FetchContent)
FetchContent_Declare(
MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG e139f8b98fb2cfb0d89b44b63af86d037c2f2c55
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG d187c63a27710fa87a44ab44d43b7cfa2023132a
)
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
@ -629,9 +631,9 @@ set(TRANSLATION_DEPS ${LANG_QRC} ${QRC} ${QM_SRC})
if (APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Foundation -framework Cocoa -framework UserNotifications")
set(SRC_FILES ${SRC_FILES} src/notifications/ManagerMac.mm src/notifications/ManagerMac.cpp src/emoji/MacHelper.mm src/emoji/MacHelper.h)
set(SRC_FILES ${SRC_FILES} src/notifications/NotificationManagerProxy.h src/notifications/MacNotificationDelegate.h src/notifications/MacNotificationDelegate.mm src/notifications/ManagerMac.mm src/notifications/ManagerMac.cpp src/emoji/MacHelper.mm src/emoji/MacHelper.h)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
set_source_files_properties( src/notifications/ManagerMac.mm src/emoji/MacHelper.mm src/emoji/MacHelper.h PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
set_source_files_properties( src/notifications/NotificationManagerProxy.h src/notifications/MacNotificationDelegate.h src/notifications/MacNotificationDelegate.mm src/notifications/ManagerMac.mm src/emoji/MacHelper.mm src/emoji/MacHelper.h PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endif()
elseif (WIN32)
file(DOWNLOAD

View file

@ -2,7 +2,7 @@
# CMake module to search for the cmark library
#
include(FindPkgConfig)
find_package(PkgConfig)
pkg_check_modules(PC_CMARK QUIET cmark)
if(NOT CMARK_INCLUDE_DIR)
@ -34,9 +34,8 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(cmark
DEFAULT_MSG
CMARK_INCLUDE_DIR
CMARK_LIBRARY)
REQUIRED_VARS CMARK_LIBRARY CMARK_INCLUDE_DIR
)
mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR)

View file

@ -170,8 +170,8 @@ modules:
- -Ddefault_library=static
name: coeurl
sources:
- commit: cfeae3acef061dbb19706f462ee58b9be2e6ec76
tag: v0.2.1
- commit: f989f3c54c1ca15e29c5bd6b1ce4efbcb3fd8078
#tag: v0.2.1
type: git
url: https://nheko.im/nheko-reborn/coeurl.git
- config-opts:
@ -182,7 +182,7 @@ modules:
buildsystem: cmake-ninja
name: mtxclient
sources:
- commit: e139f8b98fb2cfb0d89b44b63af86d037c2f2c55
- commit: d187c63a27710fa87a44ab44d43b7cfa2023132a
#tag: v0.8.2
type: git
url: https://github.com/Nheko-Reborn/mtxclient.git

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.0"
width="32.000000pt"
height="10.000000pt"
viewBox="0 0 32.000000 10.000000"
preserveAspectRatio="xMidYMid meet"
id="svg4"
sodipodi:docname="confettiparticle.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="pt"
showgrid="false"
inkscape:zoom="17.7"
inkscape:cx="7.1751412"
inkscape:cy="0.64971751"
inkscape:window-width="1920"
inkscape:window-height="1015"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<g
transform="translate(0.000000,10.000000) scale(0.100000,-0.100000)"
fill="#000000"
stroke="none"
id="g2" />
<rect
style="fill:#ffffff;stroke-width:0.75"
id="rect307"
width="32.033897"
height="10"
x="0"
y="0" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

5100
resources/langs/nheko_uk.ts Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -209,6 +210,30 @@ Control {
}
DelegateChoice {
roleValue: "command"
RowLayout {
id: del
anchors.centerIn: parent
spacing: rowSpacing
Label {
text: model.name
color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text
font.bold: true
}
Label {
text: model.description
color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText
}
}
}
DelegateChoice {
roleValue: "customEmoji"

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -34,8 +35,8 @@ Image {
width: 16
height: 16
sourceSize.height: height * Screen.devicePixelRatio
sourceSize.width: width * Screen.devicePixelRatio
sourceSize.height: height
sourceSize.width: width
source: {
if (encrypted) {
switch (trust) {

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -20,6 +21,7 @@ ColumnLayout {
property alias font: input.font
property alias echoMode: input.echoMode
property alias selectByMouse: input.selectByMouse
property var hasClear: false
Timer {
id: timer
@ -129,6 +131,39 @@ ColumnLayout {
color: labelC.text ? "transparent" : backgroundColor
}
ToolButton {
id: clearText
Layout.fillWidth: true
visible: c.hasClear && searchField.text !== ''
icon.source: "image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearText.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
focusPolicy: Qt.NoFocus
onClicked: {
searchField.clear()
topBar.searchString = "";
}
hoverEnabled: true
background: null
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
}
// clear the default hover effects.
Image {
height: parent.height - 2 * Nheko.paddingSmall
width: height
source: "image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearText.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
margins: Nheko.paddingSmall
}
}
}
}
Rectangle {

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -168,6 +169,8 @@ Rectangle {
messageInput.openCompleter(selectionStart-1, "roomAliases");
} else if (lastChar == "~") {
messageInput.openCompleter(selectionStart-1, "customEmoji");
} else if (lastChar == "/" && cursorPosition == 1) {
messageInput.openCompleter(selectionStart-1, "command");
}
}
onCursorPositionChanged: {
@ -216,6 +219,11 @@ Rectangle {
popup.close();
} else if (event.matches(StandardKey.InsertLineSeparator)) {
if (popup.opened) popup.close();
if (Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) {
room.input.send();
event.accepted = true;
}
} else if (event.matches(StandardKey.InsertParagraphSeparator)) {
if (popup.opened) {
var currentCompletion = completer.currentCompletion();
@ -227,7 +235,7 @@ Rectangle {
return;
}
}
if (!Qt.inputMethod.visible || Qt.platform.os === "windows") {
if (!Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) {
room.input.send();
event.accepted = true;
}

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -38,6 +39,8 @@ Item {
property int delegateMaxWidth: ((Settings.timelineMaxWidth > 100 && Settings.timelineMaxWidth < chatRoot.availableWidth) ? Settings.timelineMaxWidth : chatRoot.availableWidth) - chatRoot.padding * 2 - (scrollbar.interactive? scrollbar.width : 0)
readonly property alias filteringInProgress: filteredTimeline.filteringInProgress
displayMarginBeginning: height / 2
displayMarginEnd: height / 2
@ -59,7 +62,6 @@ Item {
onCountChanged: {
// Mark timeline as read
if (atYEnd && room) model.currentIndex = 0;
}
ScrollBar.vertical: scrollbar
@ -415,6 +417,7 @@ Item {
required property string callType
required property var reactions
required property int trustlevel
required property int notificationlevel
required property int encryptionError
required property var timestamp
required property int status
@ -482,6 +485,7 @@ Item {
callType: wrapper.callType
reactions: wrapper.reactions
trustlevel: wrapper.trustlevel
notificationlevel: wrapper.notificationlevel
encryptionError: wrapper.encryptionError
timestamp: wrapper.timestamp
status: wrapper.status
@ -560,7 +564,7 @@ Item {
footer: Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: Nheko.paddingLarge
visible: room && room.paginationInProgress
visible: (room && room.paginationInProgress) || chat.filteringInProgress
// hacky, but works
height: loadingSpinner.height + 2 * Nheko.paddingLarge
@ -569,7 +573,7 @@ Item {
anchors.centerIn: parent
anchors.margins: Nheko.paddingLarge
running: room && room.paginationInProgress
running: (room && room.paginationInProgress) || chat.filteringInProgress
foreground: Nheko.colors.mid
z: 3
}

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -159,6 +160,11 @@ Page {
}
}
Platform.MenuItem {
text: qsTr("Room settings")
onTriggered: TimelineManager.openRoomSettings(roomContextMenu.roomid)
}
Platform.MenuItem {
text: qsTr("Leave room")
onTriggered: TimelineManager.openLeaveRoomDialog(roomContextMenu.roomid)
@ -775,9 +781,9 @@ Page {
ToolTip.text: qsTr("Search rooms (Ctrl+K)")
Layout.margins: Nheko.paddingMedium
onClicked: {
var quickSwitch = quickSwitcherComponent.createObject(timelineRoot);
var quickSwitch = Qt.createComponent("qrc:/qml/QuickSwitcher.qml").createObject(timelineRoot);
quickSwitch.open();
timelineRoot.destroyOnClose(quickSwitch);
destroyOnClosed(quickSwitch);
}
}

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -2,6 +2,7 @@
// Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsystems.com>
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -41,6 +42,7 @@ AbstractButton {
required property string callType
required property var reactions
required property int trustlevel
required property int notificationlevel
required property int encryptionError
required property int duration
required property var timestamp
@ -117,6 +119,8 @@ AbstractButton {
property color bgColor: Nheko.colors.base
color: (Settings.bubbles && !isStateEvent) ? Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.2)) : "#00000000"
radius: 4
border.width: r.notificationlevel == MtxEvent.Highlight ? 1 : 0
border.color: Nheko.theme.red
GridLayout {
anchors {
@ -125,6 +129,7 @@ AbstractButton {
right: parent.right
margins: (Settings.bubbles && ! isStateEvent)? 4 : 2
leftMargin: 4
rightMargin: 4
}
id: msg
rowSpacing: 0
@ -297,7 +302,7 @@ AbstractButton {
Reactions {
anchors {
top: row.bottom
topMargin: -2
topMargin: -4
left: row.bubbleOnRight? undefined : row.left
right: row.bubbleOnRight? row.right : undefined
}
@ -315,9 +320,11 @@ AbstractButton {
anchors {
top: reactionRow.bottom
topMargin: 5
left: parent.left
right: parent.right
}
color: Nheko.colors.highlight
width: row.maxWidth
visible: (r.index > 0 && (room.fullyReadEventId == r.eventId))
height: visible ? 3 : 0

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -13,6 +14,7 @@ import Qt.labs.platform 1.1 as Platform
import QtQuick 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import QtQuick.Particles 2.15
import QtQuick.Window 2.13
import im.nheko 1.0
import im.nheko.EmojiModel 1.0
@ -25,6 +27,11 @@ Item {
property bool showBackButton: false
clip: true
onRoomChanged: if (room != null) room.triggerSpecialEffects()
// focus message input on key press, but not on Ctrl-C and such.
Keys.onPressed: if (event.text && !topBar.searchHasFocus) TimelineManager.focusMessageInput();
Shortcut {
sequence: StandardKey.Close
onActivated: Rooms.resetCurrentRoom()
@ -164,6 +171,7 @@ Item {
property string roomName: room ? room.roomName : (roomPreview ? roomPreview.roomName : "")
property string roomTopic: room ? room.roomTopic : (roomPreview ? roomPreview.roomTopic : "")
property string avatarUrl: room ? room.roomAvatarUrl : (roomPreview ? roomPreview.roomAvatarUrl : "")
property string reason: roomPreview ? roomPreview.reason : ""
visible: room != null && room.isSpace || roomPreview != null
enabled: visible
@ -271,6 +279,44 @@ Item {
onClicked: Rooms.declineInvite(roomPreview.roomid)
}
ScrollView {
id: reasonField
property bool showReason: false
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.leftMargin: Nheko.paddingLarge
Layout.rightMargin: Nheko.paddingLarge
visible: preview.reason !== "" && showReason
TextArea {
text: TimelineManager.escapeEmoji(preview.reason)
wrapMode: TextEdit.WordWrap
textFormat: TextEdit.RichText
readOnly: true
background: null
selectByMouse: true
color: Nheko.colors.text
horizontalAlignment: TextEdit.AlignHCenter
}
}
Button {
id: showReasonButton
Layout.alignment: Qt.AlignHCenter
//Layout.fillWidth: true
Layout.leftMargin: Nheko.paddingLarge
Layout.rightMargin: Nheko.paddingLarge
visible: preview.reason !== ""
text: reasonField.showReason ? qsTr("Hide invite reason") : qsTr("Show invite reason")
onClicked: {
reasonField.showReason = !reasonField.showReason;
}
}
Item {
visible: room != null
Layout.preferredHeight: Math.ceil(fontMetrics.lineSpacing * 2)
@ -298,6 +344,58 @@ Item {
onClicked: Rooms.resetCurrentRoom()
}
ParticleSystem { id: confettiParticleSystem }
Emitter {
id: confettiEmitter
width: parent.width * 3/4
enabled: false
anchors.horizontalCenter: parent.horizontalCenter
y: parent.height
emitRate: Math.min(400 * Math.sqrt(parent.width * parent.height) / 870, 1000)
lifeSpan: 15000
system: confettiParticleSystem
velocityFromMovement: 8
size: 16
sizeVariation: 4
velocity: PointDirection {
x: 0
y: -Math.min(450 * parent.height / 700, 1000)
xVariation: Math.min(4 * parent.width / 7, 450)
yVariation: 250
}
ImageParticle {
system: confettiParticleSystem
source: "qrc:/confettiparticle.svg"
rotationVelocity: 0
rotationVelocityVariation: 360
colorVariation: 1
color: "white"
entryEffect: ImageParticle.None
xVector: PointDirection {
x: 1
y: 0
xVariation: 0.2
yVariation: 0.2
}
yVector: PointDirection {
x: 0
y: 0.5
xVariation: 0.2
yVariation: 0.2
}
}
}
Gravity {
system: confettiParticleSystem
anchors.fill: parent
magnitude: 350
angle: 90
}
NhekoDropArea {
anchors.fill: parent
roomid: room ? room.roomId : ""
@ -321,6 +419,15 @@ Item {
timelineRoot.destroyOnClose(dialog);
}
function onConfetti()
{
if (!Settings.fancyEffects)
return
confettiEmitter.pulse(parent.height * 2)
room.markSpecialEffectsDone()
}
target: room
}

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -25,6 +26,8 @@ Pane {
property bool isDirect: room ? room.isDirect : false
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
property bool searchHasFocus: searchField.focus && searchField.enabled
property string searchString: ""
onRoomIdChanged: {
@ -225,11 +228,9 @@ Pane {
Layout.row: 1
Layout.rowSpan: 2
Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium
Layout.maximumWidth: Nheko.avatarSize - Nheko.paddingMedium
Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium
contentItem: EncryptionIndicator {
sourceSize.height: parent.Layout.preferredHeight * Screen.devicePixelRatio
sourceSize.width: parent.Layout.preferredWidth * Screen.devicePixelRatio
encrypted: isEncrypted
trust: trustlevel
enabled: false
@ -449,6 +450,8 @@ Pane {
MatrixTextField {
id: searchField
visible: searchButton.searchActive
enabled: visible
hasClear: true
Layout.row: 5
Layout.column: 2

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -48,8 +49,8 @@ Page {
Layout.fillHeight: true
Layout.fillWidth: true
sourceSize.height: height
sourceSize.width: width
sourceSize.height: parent.availableHeight - namefield.height
sourceSize.width: parent.availableWidth
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
@ -63,6 +64,7 @@ Page {
source: (modelData.thumbnail != "") ? modelData.thumbnail : ("image://colorimage/:/icons/icons/ui/"+typeStr+".svg?" + Nheko.colors.buttonText)
}
MatrixTextField {
id: namefield
Layout.fillWidth: true
text: modelData.filename
onTextEdited: modelData.filename = text

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -61,6 +62,33 @@ Item {
}
DelegateChoice {
roleValue: MtxEvent.Tombstone
ColumnLayout {
width: parent.width
NoticeMessage {
body: formatted
isOnlyEmoji: false
isReply: d.isReply
keepFullText: d.keepFullText
isStateEvent: d.isStateEvent
Layout.fillWidth: true
formatted: qsTr("This room was replaced for the following reason: %1").arg(d.body)
}
Button {
palette: Nheko.colors
Layout.alignment: Qt.AlignHCenter
text: qsTr("Go to replacement room")
onClicked: room.joinReplacementRoom(eventId)
}
}
}
DelegateChoice {
roleValue: MtxEvent.TextMessage
@ -75,6 +103,20 @@ Item {
}
DelegateChoice {
roleValue: MtxEvent.ConfettiMessage
TextMessage {
formatted: d.formattedBody
body: d.body
isOnlyEmoji: d.isOnlyEmoji
isReply: d.isReply
keepFullText: d.keepFullText
metadataWidth: d.metadataWidth
}
}
DelegateChoice {
roleValue: MtxEvent.NoticeMessage
@ -565,6 +607,7 @@ Item {
Button {
visible: d.relatedEventCacheBuster, room.showAcceptKnockButton(d.eventId)
palette: Nheko.colors
Layout.alignment: Qt.AlignHCenter
text: qsTr("Allow them in")
onClicked: room.acceptKnock(eventId)
}

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@ -132,13 +133,17 @@ ApplicationWindow {
spacing: Nheko.paddingMedium
Layout.fillWidth: true
TextField {
MatrixTextField {
id: newAliasVal
focus: true
Layout.fillWidth: true
selectByMouse: true
font.pixelSize: fontMetrics.font.pixelSize
color: Nheko.colors.text
placeholderText: qsTr("#new-alias:server.tld")
Component.onCompleted: forceActiveFocus()
Keys.onPressed: {
if (event.matches(StandardKey.InsertParagraphSeparator)) {
editingModel.addAlias(newAliasVal.text);

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

Some files were not shown because too many files have changed in this diff Show more