Compare commits
94 Commits
work/tobia
...
work/redst
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f060dcfe6 | ||
|
|
45c5806c5a | ||
|
|
abf37c90cb | ||
|
|
5d9508b165 | ||
|
|
f5a652f7a1 | ||
|
|
f165cb1f10 | ||
|
|
11132c3e89 | ||
|
|
089ab2009a | ||
|
|
6ebedc5dfc | ||
|
|
e5b2fb7316 | ||
|
|
5da3aff607 | ||
|
|
3fa46d52fe | ||
|
|
ece9811d82 | ||
|
|
b543b1c2f9 | ||
|
|
5065bccb64 | ||
|
|
10c3125668 | ||
|
|
73019cfea2 | ||
|
|
4bc6a88acf | ||
|
|
56a49cfc50 | ||
|
|
c50380b448 | ||
|
|
673a8c8bc8 | ||
|
|
c298c348a4 | ||
|
|
2fcd535aeb | ||
|
|
8f5e68de5d | ||
|
|
5fe36a9057 | ||
|
|
8d8c6444e0 | ||
|
|
03d5955c8d | ||
|
|
197d7ce8e8 | ||
|
|
efbf6d96d4 | ||
|
|
b8cd3c69c2 | ||
|
|
1da24191f0 | ||
|
|
2ecc567792 | ||
|
|
66e1fe067d | ||
|
|
d08f014def | ||
|
|
63941d6685 | ||
|
|
38523c97c5 | ||
|
|
65c6f4c1d3 | ||
|
|
0cb3fd32f4 | ||
|
|
b02cb0157e | ||
|
|
ca163fc169 | ||
|
|
5687eb33e1 | ||
|
|
fc795e50b3 | ||
|
|
c4adfe7939 | ||
|
|
ce96232bbd | ||
|
|
95653cf3f7 | ||
|
|
0c11cd331f | ||
|
|
3c8ca0d421 | ||
|
|
52f71d5c55 | ||
|
|
00f7dd5175 | ||
|
|
52da8415e9 | ||
|
|
953e4cd792 | ||
|
|
ee4b1578b1 | ||
|
|
ae24424a32 | ||
|
|
51be282824 | ||
|
|
c539dfc352 | ||
|
|
fe734206df | ||
|
|
79a49165f1 | ||
|
|
ada5eef088 | ||
|
|
9cc5778126 | ||
|
|
b129805f94 | ||
|
|
887865c0aa | ||
|
|
1336194cf4 | ||
|
|
5a7ae3563e | ||
|
|
7c56e24fdc | ||
|
|
e6b9abeca3 | ||
|
|
1b45784a88 | ||
|
|
a12b0d5282 | ||
|
|
a6d75f2ff5 | ||
|
|
b8f7f33b9a | ||
|
|
273d962707 | ||
|
|
5e8b44fea6 | ||
|
|
be9e2ec7d0 | ||
|
|
ee042cc1a2 | ||
|
|
25c0bc131a | ||
|
|
7def8c066c | ||
|
|
1ddaf37e52 | ||
|
|
40694f502a | ||
|
|
d9f4a0a032 | ||
|
|
5e392f3101 | ||
|
|
ce1ac6128e | ||
|
|
a9d08a6ee2 | ||
|
|
24d4829ba9 | ||
|
|
a121c39b6e | ||
|
|
f009420c20 | ||
|
|
069e0d8f16 | ||
|
|
1f1db11197 | ||
|
|
be92e56c3a | ||
|
|
d1fc426513 | ||
|
|
c778ba8b24 | ||
|
|
07fb3160eb | ||
|
|
7444d68280 | ||
|
|
1d5536401d | ||
|
|
099e996f2f | ||
|
|
6d9974b2b1 |
@@ -2,7 +2,7 @@
|
||||
"id": "org.kde.neochat",
|
||||
"branch": "master",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "6.9",
|
||||
"runtime-version": "6.10",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"command": "neochat",
|
||||
"tags": [
|
||||
@@ -31,19 +31,6 @@
|
||||
"/share/ndk-modules"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "kirigamiaddons",
|
||||
"config-opts": [
|
||||
"-DBUILD_TESTING=OFF"
|
||||
],
|
||||
"buildsystem": "cmake-ninja",
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://invent.kde.org/libraries/kirigami-addons.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "opencv",
|
||||
"config-opts": [
|
||||
@@ -78,6 +65,7 @@
|
||||
"name": "olm",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"config-opts": [
|
||||
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
|
||||
"-DOLM_TESTS=OFF"
|
||||
],
|
||||
"sources": [
|
||||
@@ -184,8 +172,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://download.kde.org/stable/release-service/25.08.0/src/kunifiedpush-25.08.0.tar.xz",
|
||||
"sha256": "846db6ffc7d93f6afea7ce0d5a9f10b52792157ceb593856542279f4197f3518",
|
||||
"url": "https://download.kde.org/stable/release-service/25.08.3/src/kunifiedpush-25.08.3.tar.xz",
|
||||
"sha256": "e8c924438d5359f0fa0930ab35111012076e3a0ff4e959d6929595571383320a",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 8763,
|
||||
|
||||
@@ -14,7 +14,6 @@ Dependencies:
|
||||
'frameworks/kquickcharts': '@latest-kf6'
|
||||
'frameworks/knotifications': '@latest-kf6'
|
||||
'frameworks/kcolorscheme': '@latest-kf6'
|
||||
'frameworks/kiconthemes': '@latest-kf6'
|
||||
'libraries/kquickimageeditor': '@latest-kf6'
|
||||
'frameworks/sonnet': '@latest-kf6'
|
||||
'frameworks/prison': '@latest-kf6'
|
||||
@@ -29,12 +28,15 @@ Dependencies:
|
||||
'frameworks/kio': '@latest-kf6'
|
||||
'frameworks/kwindowsystem': '@latest-kf6'
|
||||
'frameworks/kstatusnotifieritem': '@latest-kf6'
|
||||
'frameworks/kcrash': '@latest-kf6'
|
||||
|
||||
- 'on': ['Linux', 'FreeBSD', 'Android']
|
||||
'require':
|
||||
'libraries/kunifiedpush': '@latest-kf6'
|
||||
|
||||
- 'on': ['Linux', 'FreeBSD']
|
||||
'require':
|
||||
'frameworks/kdbusaddons': '@latest-kf6'
|
||||
'frameworks/purpose': '@latest-kf6'
|
||||
'libraries/kunifiedpush': '@latest-kf6'
|
||||
|
||||
- 'on': ['Linux']
|
||||
'require':
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# KDE Applications version, managed by release script.
|
||||
set(RELEASE_SERVICE_VERSION_MAJOR "25")
|
||||
set(RELEASE_SERVICE_VERSION_MINOR "11")
|
||||
set(RELEASE_SERVICE_VERSION_MAJOR "26")
|
||||
set(RELEASE_SERVICE_VERSION_MINOR "03")
|
||||
set(RELEASE_SERVICE_VERSION_MICRO "70")
|
||||
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
|
||||
|
||||
@@ -46,10 +46,6 @@ if (NOT ANDROID)
|
||||
include(KDEClangFormat)
|
||||
endif()
|
||||
|
||||
if(NEOCHAT_FLATPAK)
|
||||
include(cmake/Flatpak.cmake)
|
||||
endif()
|
||||
|
||||
set(QUOTIENT_FORCE_NAMESPACED_INCLUDES TRUE)
|
||||
|
||||
ecm_set_disabled_deprecation_versions(Qt 6.9.0 KF 6.17.0)
|
||||
@@ -69,7 +65,7 @@ if (QT_KNOWN_POLICY_QTP0004)
|
||||
qt_policy(SET QTP0004 NEW)
|
||||
endif ()
|
||||
|
||||
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels IconThemes ColorScheme)
|
||||
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme)
|
||||
set_package_properties(KF6 PROPERTIES
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Basic application components"
|
||||
@@ -92,7 +88,7 @@ if(ANDROID)
|
||||
)
|
||||
else()
|
||||
find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Widgets)
|
||||
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle KIO WindowSystem StatusNotifierItem Crash)
|
||||
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle KIO WindowSystem StatusNotifierItem)
|
||||
find_package(KF6SyntaxHighlighting ${KF_MIN_VERSION} REQUIRED)
|
||||
set_package_properties(KF6QQC2DesktopStyle PROPERTIES
|
||||
TYPE RUNTIME
|
||||
@@ -152,7 +148,7 @@ set_package_properties(KF6DocTools PROPERTIES DESCRIPTION
|
||||
|
||||
option(WITH_UNIFIEDPUSH "Build with KUnifiedPush support" ON)
|
||||
|
||||
if (ANDROID OR APPLE OR WIN32 OR HAIKU)
|
||||
if (APPLE OR WIN32 OR HAIKU)
|
||||
set(WITH_UNIFIEDPUSH OFF)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Include FontConfig config which uses the Emoji One font from the
|
||||
# KDE Flatpak SDK.
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Flatpak/99-noto-mono-color-emoji.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}/fonts/local.conf
|
||||
)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
|
||||
@@ -320,7 +320,6 @@
|
||||
<value key="KDE::windows_store::StoreLogoSquare">https://invent.kde.org/network/neochat/-/raw/master/icons/windows/storelogo-1080x1080.png</value>
|
||||
<value key="KDE::windows_store::Icon">https://invent.kde.org/network/neochat/-/raw/master/icons/300-apps-neochat.png</value>
|
||||
<value key="KDE::windows_store::PromotionalArt16x9">https://invent.kde.org/network/neochat/-/raw/master/icons/windows/promoimage-1920x1080.png</value>
|
||||
<value key="KDE::supporters">.</value>
|
||||
</custom>
|
||||
<launchable type="desktop-id">org.kde.neochat.desktop</launchable>
|
||||
<screenshots>
|
||||
@@ -488,6 +487,8 @@
|
||||
<content_attribute id="social-chat">intense</content_attribute>
|
||||
</content_rating>
|
||||
<releases>
|
||||
<release version="25.12.0" date="2025-12-11"/>
|
||||
<release version="25.08.3" date="2025-11-06"/>
|
||||
<release version="25.08.2" date="2025-10-09"/>
|
||||
<release version="25.08.1" date="2025-09-11"/>
|
||||
<release version="25.08.0" date="2025-08-14"/>
|
||||
|
||||
810
po/ar/neochat.po
810
po/ar/neochat.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
833
po/az/neochat.po
833
po/az/neochat.po
File diff suppressed because it is too large
Load Diff
793
po/ca/neochat.po
793
po/ca/neochat.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
769
po/cs/neochat.po
769
po/cs/neochat.po
File diff suppressed because it is too large
Load Diff
759
po/da/neochat.po
759
po/da/neochat.po
File diff suppressed because it is too large
Load Diff
1323
po/de/neochat.po
1323
po/de/neochat.po
File diff suppressed because it is too large
Load Diff
882
po/el/neochat.po
882
po/el/neochat.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
908
po/eo/neochat.po
908
po/eo/neochat.po
File diff suppressed because it is too large
Load Diff
716
po/es/neochat.po
716
po/es/neochat.po
File diff suppressed because it is too large
Load Diff
925
po/eu/neochat.po
925
po/eu/neochat.po
File diff suppressed because it is too large
Load Diff
925
po/fi/neochat.po
925
po/fi/neochat.po
File diff suppressed because it is too large
Load Diff
926
po/fr/neochat.po
926
po/fr/neochat.po
File diff suppressed because it is too large
Load Diff
911
po/gl/neochat.po
911
po/gl/neochat.po
File diff suppressed because it is too large
Load Diff
795
po/he/neochat.po
795
po/he/neochat.po
File diff suppressed because it is too large
Load Diff
899
po/hi/neochat.po
899
po/hi/neochat.po
File diff suppressed because it is too large
Load Diff
1231
po/hu/neochat.po
1231
po/hu/neochat.po
File diff suppressed because it is too large
Load Diff
940
po/ia/neochat.po
940
po/ia/neochat.po
File diff suppressed because it is too large
Load Diff
890
po/id/neochat.po
890
po/id/neochat.po
File diff suppressed because it is too large
Load Diff
827
po/ie/neochat.po
827
po/ie/neochat.po
File diff suppressed because it is too large
Load Diff
868
po/it/neochat.po
868
po/it/neochat.po
File diff suppressed because it is too large
Load Diff
664
po/ja/neochat.po
664
po/ja/neochat.po
File diff suppressed because it is too large
Load Diff
802
po/ka/neochat.po
802
po/ka/neochat.po
File diff suppressed because it is too large
Load Diff
924
po/ko/neochat.po
924
po/ko/neochat.po
File diff suppressed because it is too large
Load Diff
771
po/lt/neochat.po
771
po/lt/neochat.po
File diff suppressed because it is too large
Load Diff
940
po/lv/neochat.po
940
po/lv/neochat.po
File diff suppressed because it is too large
Load Diff
816
po/nl/neochat.po
816
po/nl/neochat.po
File diff suppressed because it is too large
Load Diff
792
po/nn/neochat.po
792
po/nn/neochat.po
File diff suppressed because it is too large
Load Diff
830
po/pa/neochat.po
830
po/pa/neochat.po
File diff suppressed because it is too large
Load Diff
926
po/pl/neochat.po
926
po/pl/neochat.po
File diff suppressed because it is too large
Load Diff
879
po/pt/neochat.po
879
po/pt/neochat.po
File diff suppressed because it is too large
Load Diff
122
po/pt_BR/docs/neochat/man-neochat.1.docbook
Normal file
122
po/pt_BR/docs/neochat/man-neochat.1.docbook
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
|
||||
<!ENTITY % Brazilian-Portuguese "INCLUDE">
|
||||
]>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
|
||||
<refentry lang="&language;">
|
||||
<refentryinfo>
|
||||
<title
|
||||
>Manual do Usuário do NeoChat</title>
|
||||
<author
|
||||
><firstname
|
||||
>Carl</firstname
|
||||
><surname
|
||||
>Schwan</surname
|
||||
> <contrib
|
||||
>NeoChat man page.</contrib
|
||||
> <email
|
||||
>carl@carlschwan.eu</email
|
||||
></author>
|
||||
<date
|
||||
>01/11/2022</date>
|
||||
<releaseinfo
|
||||
>22.09</releaseinfo>
|
||||
<productname
|
||||
>NeoChat</productname>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
<command
|
||||
>neochat</command>
|
||||
</refentrytitle>
|
||||
<manvolnum
|
||||
>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname
|
||||
>neochat</refname>
|
||||
<refpurpose
|
||||
>Cliente para interação com o protocolo de mensagens Matrix.</refpurpose>
|
||||
</refnamediv>
|
||||
<!-- body begins here -->
|
||||
<refsynopsisdiv id='synopsis'>
|
||||
<cmdsynopsis
|
||||
><command
|
||||
>neochat</command
|
||||
> <arg choice="opt"
|
||||
><replaceable
|
||||
>URI</replaceable
|
||||
></arg
|
||||
> </cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
|
||||
<refsect1 id="description">
|
||||
<title
|
||||
>Descrição</title>
|
||||
<para
|
||||
>O <command
|
||||
>neochat</command
|
||||
> é um aplicativo de bate-papo para o protocolo Matrix. Ele funciona tanto em computadores quanto em dispositivos móveis. </para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="options"
|
||||
><title
|
||||
>Opções</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term
|
||||
><option
|
||||
>URI</option
|
||||
></term>
|
||||
<listitem>
|
||||
<para
|
||||
>O URI da matriz para um usuário ou uma sala. Por exemplo, matrix:u/usuário:exemplo.org e matrix:r/root:exemplo.org. Isso fará com que o NeoChat tente abrir a sala ou conversa especificada. </para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="bug">
|
||||
<title
|
||||
>Relatar bugs</title>
|
||||
<para
|
||||
>Você pode reportar erros e solicitar novas funcionalidades em <ulink url="https://bugs.kde.org/enter_bug.cgi?product=NeoChat&component=General"
|
||||
>https://bugs.kde.org/enter_bug.cgi?product=NeoChat&component=General</ulink
|
||||
></para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title
|
||||
>Veja também</title>
|
||||
<simplelist>
|
||||
<member
|
||||
>Lista de perguntas frequentes sobre o Matrix <ulink url="https://matrix.org/faq/"
|
||||
>https://matrix.org/faq/</ulink
|
||||
> </member>
|
||||
<member
|
||||
>kf5options(7)</member>
|
||||
<member
|
||||
>qt5options(7)</member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="copyright"
|
||||
><title
|
||||
>Direitos autorais</title>
|
||||
<para
|
||||
>Direitos autorais © 2020-2022 Tobias Fella </para>
|
||||
<para
|
||||
>Direitos autorais © 2020-2022 Carl Schwan </para>
|
||||
<para
|
||||
>Licença: GNU General Public Versão 3 ou posterior <ulink url="https://www.gnu.org/licenses/gpl-3.0.html"
|
||||
>https://www.gnu.org/licenses/gpl-3.0.html</ulink
|
||||
>></para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
File diff suppressed because it is too large
Load Diff
800
po/ro/neochat.po
800
po/ro/neochat.po
File diff suppressed because it is too large
Load Diff
919
po/ru/neochat.po
919
po/ru/neochat.po
File diff suppressed because it is too large
Load Diff
899
po/sa/neochat.po
899
po/sa/neochat.po
File diff suppressed because it is too large
Load Diff
844
po/sk/neochat.po
844
po/sk/neochat.po
File diff suppressed because it is too large
Load Diff
812
po/sl/neochat.po
812
po/sl/neochat.po
File diff suppressed because it is too large
Load Diff
925
po/sv/neochat.po
925
po/sv/neochat.po
File diff suppressed because it is too large
Load Diff
1033
po/ta/neochat.po
1033
po/ta/neochat.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
830
po/tr/neochat.po
830
po/tr/neochat.po
File diff suppressed because it is too large
Load Diff
815
po/uk/neochat.po
815
po/uk/neochat.po
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
@@ -103,6 +103,7 @@ ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
||||
qml/ReasonDialog.qml
|
||||
qml/NewPollDialog.qml
|
||||
qml/UserMenu.qml
|
||||
qml/MeetingDialog.qml
|
||||
DEPENDENCIES
|
||||
QtCore
|
||||
QtQuick
|
||||
@@ -202,7 +203,6 @@ target_link_libraries(neochat PUBLIC
|
||||
KF6::ConfigGui
|
||||
KF6::CoreAddons
|
||||
KF6::SonnetCore
|
||||
KF6::IconThemes
|
||||
KF6::ItemModels
|
||||
KF6::I18nQml
|
||||
KirigamiApp
|
||||
@@ -213,10 +213,6 @@ target_link_libraries(neochat PUBLIC
|
||||
Spaces
|
||||
)
|
||||
|
||||
if (TARGET KF6::Crash)
|
||||
target_link_libraries(neochat PUBLIC KF6::Crash)
|
||||
endif()
|
||||
|
||||
kconfig_target_kcfg_file(neochat FILE neochatconfig.kcfg CLASS_NAME NeoChatConfig MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION)
|
||||
|
||||
if(NEOCHAT_FLATPAK)
|
||||
@@ -356,7 +352,8 @@ endif()
|
||||
install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
|
||||
install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
|
||||
# krunner plugin must be the same as the app id for flatpak to export it
|
||||
install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins RENAME org.kde.neochat.desktop)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
|
||||
@@ -246,7 +246,10 @@ void Controller::initActiveConnection(NeoChatConnection *oldConnection, NeoChatC
|
||||
if (newConnection) {
|
||||
connect(newConnection, &NeoChatConnection::errorOccured, this, &Controller::errorOccured);
|
||||
connect(newConnection, &NeoChatConnection::badgeNotificationCountChanged, this, &Controller::updateBadgeNotificationCount);
|
||||
|
||||
// Refresh and update manually, in case we init too late for the badge count to actually change.
|
||||
newConnection->refreshBadgeNotificationCount();
|
||||
updateBadgeNotificationCount(newConnection->badgeNotificationCount());
|
||||
}
|
||||
Q_EMIT activeConnectionChanged(newConnection);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <KWindowSystem>
|
||||
#endif
|
||||
|
||||
#include <KIconTheme>
|
||||
#include <KLocalizedQmlContext>
|
||||
#include <KLocalizedString>
|
||||
#include <KirigamiApp>
|
||||
@@ -162,12 +161,6 @@ int main(int argc, char *argv[])
|
||||
Connection::setEncryptionDefault(true);
|
||||
Connection::setDirectChatEncryptionDefault(true);
|
||||
|
||||
#ifdef NEOCHAT_FLATPAK
|
||||
// Copy over the included FontConfig configuration to the
|
||||
// app's config dir:
|
||||
QFile::copy(u"/app/etc/fonts/conf.d/99-noto-mono-color-emoji.conf"_s, u"/var/config/fontconfig/conf.d/99-noto-mono-color-emoji.conf"_s);
|
||||
#endif
|
||||
|
||||
ColorSchemer colorScheme;
|
||||
|
||||
QCommandLineParser parser;
|
||||
|
||||
@@ -259,7 +259,7 @@ Comment[sa]=कक्षस्य नूतनं निमन्त्रणम
|
||||
Comment[sl]=Tam je novo povabilo v sobo
|
||||
Comment[sv]=Det finns en ny inbjudan till ett rum
|
||||
Comment[ta]=ஓர் அரங்கிற்கான புதிய அழைப்பிதழ் உள்ளது
|
||||
Comment[tr]=Bir odaya yeni bir davetiye var
|
||||
Comment[tr]=Bir odaya yeni bir davet var
|
||||
Comment[uk]=У кімнаті нове запрошення
|
||||
Comment[zh_CN]=有新的聊天室邀请
|
||||
Comment[zh_TW]=有新的加入聊天室邀請
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Timeline">
|
||||
<entry name="FontScale" type="double">
|
||||
<label>Scaling factor for font sizes</label>
|
||||
<default>1.0</default>
|
||||
</entry>
|
||||
<entry name="ShowAvatarInTimeline" type="bool">
|
||||
<label>Show avatar in the timeline</label>
|
||||
<default>true</default>
|
||||
@@ -207,10 +211,6 @@
|
||||
<label>Enable threads</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SecretBackup" type="bool">
|
||||
<label>Enable secret backup</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="Phone3PId" type="bool">
|
||||
<label>Enable add phone numbers as 3PIDs</label>
|
||||
<default>false</default>
|
||||
|
||||
@@ -79,7 +79,6 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
Kirigami.Action {
|
||||
text: i18nc("@action:inmenu", "Open Secret Backup")
|
||||
icon.name: "unlock"
|
||||
visible: NeoChatConfig.secretBackup
|
||||
onTriggered: root.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
|
||||
title: i18nc("@title:window", "Open Key Backup")
|
||||
})
|
||||
|
||||
@@ -91,6 +91,7 @@ Components.AbstractMaximizeComponent {
|
||||
color: Kirigami.Theme.textColor
|
||||
|
||||
font.family: "monospace"
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
|
||||
Kirigami.SpellCheck.enabled: false
|
||||
|
||||
|
||||
@@ -54,6 +54,12 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
Kirigami.Heading {
|
||||
text: root.currentRoom.displayName
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
Kirigami.SelectableLabel {
|
||||
Layout.fillWidth: true
|
||||
font: Kirigami.Theme.smallFont
|
||||
@@ -61,12 +67,7 @@ ColumnLayout {
|
||||
visible: root.currentRoom && root.currentRoom.canonicalAlias
|
||||
text: root.currentRoom && root.currentRoom.canonicalAlias ? root.currentRoom.canonicalAlias : ""
|
||||
color: Kirigami.Theme.disabledTextColor
|
||||
}
|
||||
|
||||
Kirigami.Heading {
|
||||
text: root.currentRoom.displayName
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
22
src/app/qml/MeetingDialog.qml
Normal file
22
src/app/qml/MeetingDialog.qml
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
required property bool hasExistingMeeting
|
||||
|
||||
title: hasExistingMeeting ? i18nc("@title", "Join Meeting") : i18nc("@title", "Start Meeting")
|
||||
subtitle: hasExistingMeeting ? i18nc("@info:label", "You are about to join a Jitsi meeting in your web browser.") : i18nc("@info:label", "You are about to start a new Jitsi meeting in your web browser.")
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
|
||||
customFooterActions: Kirigami.Action {
|
||||
icon.name: "camera-video-symbolic"
|
||||
text: hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start")
|
||||
onTriggered: root.accept()
|
||||
}
|
||||
}
|
||||
@@ -23,13 +23,45 @@ Components.AlbumMaximizeComponent {
|
||||
*/
|
||||
required property NeoChatRoom currentRoom
|
||||
|
||||
readonly property string currentEventId: model.data(model.index((content as ListView).currentIndex, 0), TimelineMessageModel.EventIdRole)
|
||||
readonly property string currentEventId: {
|
||||
const idx = (content as ListView).currentIndex;
|
||||
|
||||
readonly property var currentAuthor: model.data(model.index((content as ListView).currentIndex, 0), TimelineMessageModel.AuthorRole)
|
||||
if (idx === -1) {
|
||||
return ""
|
||||
}
|
||||
|
||||
readonly property var currentTime: model.data(model.index((content as ListView).currentIndex, 0), TimelineMessageModel.TimeRole)
|
||||
return model.data(model.index(idx, 0), TimelineMessageModel.EventIdRole)
|
||||
}
|
||||
|
||||
readonly property var currentProgressInfo: model.data(model.index((content as ListView).currentIndex, 0), TimelineMessageModel.ProgressInfoRole)
|
||||
readonly property var currentAuthor: {
|
||||
const idx = (content as ListView).currentIndex;
|
||||
|
||||
if (idx === -1) {
|
||||
return {}
|
||||
}
|
||||
|
||||
return model.data(model.index(idx, 0), TimelineMessageModel.AuthorRole)
|
||||
}
|
||||
|
||||
readonly property var currentTime: {
|
||||
|
||||
const idx = (content as ListView).currentIndex;
|
||||
|
||||
if (idx === -1) {
|
||||
return {}
|
||||
}
|
||||
|
||||
model.data(model.index(idx, 0), TimelineMessageModel.TimeRole)
|
||||
}
|
||||
|
||||
readonly property var currentProgressInfo: {
|
||||
const idx = (content as ListView).currentIndex;
|
||||
|
||||
if (idx === -1) {
|
||||
return {}
|
||||
}
|
||||
model.data(model.index(idx, 0), TimelineMessageModel.ProgressInfoRole)
|
||||
}
|
||||
|
||||
actions: [
|
||||
ShareAction {
|
||||
|
||||
@@ -77,11 +77,33 @@ Kirigami.Page {
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
tooltip: i18nc("@action:button", "Open Jitsi Meet in browser")
|
||||
icon.name: "camera-video-symbolic"
|
||||
id: jitsiMeetingAction
|
||||
|
||||
readonly property bool hasExistingMeeting: root.widgetModel.jitsiIndex >= 0
|
||||
readonly property bool canStartNewMeeting: root.currentRoom.canSendState("im.vector.modular.widgets")
|
||||
|
||||
tooltip: {
|
||||
if (hasExistingMeeting) {
|
||||
return i18nc("@action:button", "Join Jitsi meeting…");
|
||||
}
|
||||
|
||||
return canStartNewMeeting ? i18nc("@action:button", "Start Jitsi meeting…") : i18nc("@action:button", "You do not have permissions to start Jitsi meetings")
|
||||
}
|
||||
icon {
|
||||
name: "camera-video-symbolic"
|
||||
color: hasExistingMeeting ? Kirigami.Theme.highlightColor : "transparent"
|
||||
}
|
||||
enabled: hasExistingMeeting || canStartNewMeeting
|
||||
visible: root.currentRoom && !root.currentRoom.isSpace
|
||||
onTriggered: {
|
||||
let url
|
||||
if (root.widgetModel.jitsiIndex < 0) {
|
||||
const dialog = Qt.createComponent("org.kde.neochat", "MeetingDialog").createObject(QQC2.Overlay.overlay, { hasExistingMeeting });
|
||||
dialog.onAccepted.connect(doAction);
|
||||
dialog.open();
|
||||
}
|
||||
|
||||
function doAction(): void {
|
||||
let url;
|
||||
if (!hasExistingMeeting) {
|
||||
url = root.widgetModel.addJitsiConference();
|
||||
} else {
|
||||
let idx = root.widgetModel.index(root.widgetModel.jitsiIndex, 0);
|
||||
@@ -97,6 +119,18 @@ Kirigami.Page {
|
||||
}
|
||||
]
|
||||
|
||||
Kirigami.Action {
|
||||
enabled: root.currentRoom && !root.currentRoom.isSpace
|
||||
shortcut: "Ctrl+F"
|
||||
onTriggered: {
|
||||
((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RoomSearchPage'), {
|
||||
room: root.currentRoom
|
||||
}, {
|
||||
title: i18nc("@action:title", "Search")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
KeyNavigation.left: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).get(0)
|
||||
|
||||
onCurrentRoomChanged: {
|
||||
@@ -193,6 +227,8 @@ Kirigami.Page {
|
||||
// Used to keep track of messages so we can hide the right one at the right time
|
||||
property string messageId
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
showCloseButton: true
|
||||
visible: false
|
||||
position: Kirigami.InlineMessage.Position.Header
|
||||
@@ -219,7 +255,6 @@ Kirigami.Page {
|
||||
id: timelineView
|
||||
messageFilterModel: root.messageFilterModel
|
||||
compactLayout: NeoChatConfig.compactLayout
|
||||
fileDropEnabled: !Controller.isFlatpak
|
||||
markReadCondition: NeoChatConfig.markReadCondition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import org.kde.neochat
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
||||
property bool processing: false
|
||||
|
||||
title: i18nc("@title:window", "Load your encrypted messages")
|
||||
|
||||
topPadding: Kirigami.Units.gridUnit
|
||||
@@ -25,75 +27,42 @@ FormCard.FormCardPage {
|
||||
position: Kirigami.InlineMessage.Position.Header
|
||||
}
|
||||
|
||||
property SSSSHandler ssssHandler: SSSSHandler {
|
||||
id: ssssHandler
|
||||
Connections {
|
||||
target: Controller.activeConnection
|
||||
function onKeyBackupError(): void {
|
||||
securityKeyField.clear()
|
||||
root.processing = false
|
||||
banner.text = i18nc("@info:status", "The security key or backup passphrase was not correct.")
|
||||
banner.visible = true
|
||||
}
|
||||
|
||||
property bool processing: false
|
||||
|
||||
connection: Controller.activeConnection
|
||||
onKeyBackupUnlocked: {
|
||||
ssssHandler.processing = false
|
||||
function onKeyBackupUnlocked(): void {
|
||||
root.processing = false
|
||||
banner.text = i18nc("@info:status", "Encryption keys restored.")
|
||||
banner.type = Kirigami.MessageType.Positive
|
||||
banner.visible = true
|
||||
}
|
||||
onError: error => {
|
||||
if (error !== SSSSHandler.WrongKeyError) {
|
||||
banner.text = error
|
||||
banner.visible = true
|
||||
return;
|
||||
}
|
||||
passwordField.clear()
|
||||
ssssHandler.processing = false
|
||||
banner.text = i18nc("@info:status", "The security phrase was not correct.")
|
||||
banner.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
title: i18nc("@title", "Unlock using Passphrase")
|
||||
title: i18nc("@title", "Unlock using Security Key or Backup Passphrase")
|
||||
}
|
||||
FormCard.FormCard {
|
||||
FormCard.FormTextDelegate {
|
||||
description: i18nc("@info", "If you have a backup passphrase for this account, enter it below.")
|
||||
}
|
||||
FormCard.FormTextFieldDelegate {
|
||||
id: passwordField
|
||||
label: i18nc("@label:textbox", "Backup Password:")
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
FormCard.FormButtonDelegate {
|
||||
id: unlockButton
|
||||
text: i18nc("@action:button", "Unlock")
|
||||
icon.name: "unlock"
|
||||
enabled: passwordField.text.length > 0 && !ssssHandler.processing
|
||||
onClicked: {
|
||||
ssssHandler.processing = true
|
||||
banner.visible = false
|
||||
ssssHandler.unlockSSSSWithPassphrase(passwordField.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
title: i18nc("@title", "Unlock using Security Key")
|
||||
}
|
||||
FormCard.FormCard {
|
||||
FormCard.FormTextDelegate {
|
||||
description: i18nc("@info", "If you have a security key for this account, enter it below or upload it as a file.")
|
||||
description: i18nc("@info", "If you have a security key or backup passphrase for this account, enter it below or upload it as a file.")
|
||||
}
|
||||
FormCard.FormTextFieldDelegate {
|
||||
id: securityKeyField
|
||||
label: i18nc("@label:textbox", "Security Key:")
|
||||
label: i18nc("@label:textbox", "Security Key or Backup Passphrase:")
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
FormCard.FormButtonDelegate {
|
||||
id: uploadSecurityKeyButton
|
||||
text: i18nc("@action:button", "Upload from File")
|
||||
icon.name: "cloud-upload"
|
||||
enabled: !ssssHandler.processing
|
||||
enabled: !root.processing
|
||||
onClicked: {
|
||||
ssssHandler.processing = true
|
||||
root.processing = true
|
||||
openFileDialog.open()
|
||||
}
|
||||
}
|
||||
@@ -101,10 +70,10 @@ FormCard.FormCardPage {
|
||||
id: unlockSecurityKeyButton
|
||||
text: i18nc("@action:button", "Unlock")
|
||||
icon.name: "unlock"
|
||||
enabled: securityKeyField.text.length > 0 && !ssssHandler.processing
|
||||
enabled: securityKeyField.text.length > 0 && !root.processing
|
||||
onClicked: {
|
||||
ssssHandler.processing = true
|
||||
ssssHandler.unlockSSSSFromSecurityKey(securityKeyField.text)
|
||||
root.processing = true
|
||||
Controller.activeConnection.unlockSSSS(securityKeyField.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,10 +89,10 @@ FormCard.FormCardPage {
|
||||
id: unlockCrossSigningButton
|
||||
icon.name: "emblem-shared-symbolic"
|
||||
text: i18nc("@action:button", "Request from other Devices")
|
||||
enabled: !ssssHandler.processing
|
||||
enabled: !root.processing
|
||||
onClicked: {
|
||||
ssssHandler.processing = true
|
||||
ssssHandler.unlockSSSSFromCrossSigning()
|
||||
root.processing = true
|
||||
Controller.activeConnection.unlockSSSS("")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,5 +293,25 @@ Kirigami.Dialog {
|
||||
icon.name: "username-copy"
|
||||
onClicked: Clipboard.saveText("https://matrix.to/#/" + root.user.id)
|
||||
}
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
text: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report…")
|
||||
icon.name: "dialog-warning-symbolic"
|
||||
visible: root.connection.supportsMatrixSpecVersion("v1.13")
|
||||
onClicked: {
|
||||
let dialog = ((QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
||||
title: i18nc("@title:dialog", "Report User"),
|
||||
placeholder: i18nc("@info:placeholder", "Reason for reporting this user"),
|
||||
icon: "dialog-warning-symbolic",
|
||||
actionText: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report")
|
||||
}, {
|
||||
title: i18nc("@title", "Report User"),
|
||||
width: Kirigami.Units.gridUnit * 25
|
||||
}) as ReasonDialog;
|
||||
dialog.accepted.connect(reason => {
|
||||
root.connection.reportUser(root.user.id, reason);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,19 @@ VerificationMessage {
|
||||
|
||||
required property int reason
|
||||
|
||||
icon: "security-low"
|
||||
icon: {
|
||||
switch (root.reason) {
|
||||
case KeyVerificationSession.TIMEOUT:
|
||||
case KeyVerificationSession.REMOTE_TIMEOUT:
|
||||
case KeyVerificationSession.USER:
|
||||
case KeyVerificationSession.REMOTE_USER:
|
||||
case KeyVerificationSession.SESSION_ACCEPTED:
|
||||
case KeyVerificationSession.REMOTE_SESSION_ACCEPTED:
|
||||
return "dialog-information";
|
||||
default:
|
||||
return "security-low";
|
||||
}
|
||||
}
|
||||
text: {
|
||||
switch (root.reason) {
|
||||
case KeyVerificationSession.NONE:
|
||||
|
||||
@@ -263,6 +263,7 @@ QQC2.Control {
|
||||
wrapMode: TextEdit.Wrap
|
||||
// This has to stay PlainText or else formatting starts breaking in strange ways
|
||||
textFormat: TextEdit.PlainText
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
|
||||
Accessible.description: placeholderText
|
||||
|
||||
@@ -285,6 +286,8 @@ QQC2.Control {
|
||||
quickFormatBar.selectionStart = selectionStart;
|
||||
quickFormatBar.selectionEnd = selectionEnd;
|
||||
quickFormatBar.open();
|
||||
} else if (quickFormatBar.visible) {
|
||||
quickFormatBar.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.neochat
|
||||
|
||||
QQC2.ItemDelegate {
|
||||
id: root
|
||||
@@ -29,6 +30,7 @@ QQC2.ItemDelegate {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: "emoji"
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
|
||||
Kirigami.Icon {
|
||||
width: Kirigami.Units.gridUnit * 0.5
|
||||
|
||||
@@ -17,6 +17,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
property NeoChatRoom room
|
||||
required property NeoChatConnection connection
|
||||
property alias currentTabIndex: tabBar.currentIndex
|
||||
|
||||
title: i18nc("@title", "Developer Tools")
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@ FormCard.FormCard {
|
||||
|
||||
onToggled: NeoChatConfig.threads = checked
|
||||
}
|
||||
FormCard.FormCheckDelegate {
|
||||
text: i18nc("@option:check Enable the matrix 'secret backup' feature", "Secret Backup")
|
||||
checked: NeoChatConfig.secretBackup
|
||||
|
||||
onToggled: NeoChatConfig.secretBackup = checked
|
||||
}
|
||||
FormCard.FormCheckDelegate {
|
||||
text: i18nc("@option:check Enable the matrix feature to add a phone number as a third party ID", "Add phone numbers as 3PIDs")
|
||||
checked: NeoChatConfig.phone3PId
|
||||
|
||||
@@ -33,6 +33,8 @@ target_sources(LibNeoChat PRIVATE
|
||||
events/imagepackevent.cpp
|
||||
events/pollevent.cpp
|
||||
jobs/neochatgetcommonroomsjob.cpp
|
||||
jobs/neochatreportroomjob.cpp
|
||||
jobs/neochatreportuserjob.cpp
|
||||
models/actionsmodel.cpp
|
||||
models/completionmodel.cpp
|
||||
models/completionproxymodel.cpp
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "general_logging.h"
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
using namespace Quotient;
|
||||
|
||||
AccountManager::AccountManager(bool testMode, QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -40,7 +39,7 @@ Quotient::AccountRegistry *AccountManager::accounts()
|
||||
|
||||
void AccountManager::loadAccountsFromCache()
|
||||
{
|
||||
for (const auto &accountId : AccountSettingsGroup().childGroups()) {
|
||||
for (const auto &accountId : Quotient::SettingsGroup("Accounts"_L1).childGroups()) {
|
||||
Quotient::AccountSettings account{accountId};
|
||||
m_accountsLoading += accountId;
|
||||
Q_EMIT accountsLoadingChanged();
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "chatbarcache.h"
|
||||
|
||||
#include <QMimeData>
|
||||
|
||||
#include <KUrlMimeData>
|
||||
|
||||
#include <Quotient/roommember.h>
|
||||
|
||||
#include "eventhandler.h"
|
||||
@@ -295,4 +299,17 @@ void ChatBarCache::clearCache()
|
||||
clearRelations();
|
||||
}
|
||||
|
||||
void ChatBarCache::drop(QList<QUrl> u, const QString &transferPortal)
|
||||
{
|
||||
QMimeData mimeData;
|
||||
mimeData.setUrls(u);
|
||||
if (!transferPortal.isEmpty()) {
|
||||
mimeData.setData(u"application/vnd.portal.filetransfer"_s, transferPortal.toLatin1());
|
||||
}
|
||||
auto urls = KUrlMimeData::urlsFromMimeData(&mimeData);
|
||||
if (urls.size() > 0) {
|
||||
setAttachmentPath(urls[0].toString());
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_chatbarcache.cpp"
|
||||
|
||||
@@ -198,6 +198,8 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE void postMessage();
|
||||
|
||||
Q_INVOKABLE void drop(QList<QUrl> urls, const QString &transferPortal);
|
||||
|
||||
Q_SIGNALS:
|
||||
void textChanged();
|
||||
void relationIdChanged(const QString &oldEventId, const QString &newEventId);
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
case Parameter::MostHighlights:
|
||||
return i18nc("@info", "Rooms with the most highlighted messages are higher");
|
||||
case Parameter::LastActive:
|
||||
return i18nc("@info", "Rooms with the newer messages are higher");
|
||||
return i18nc("@info", "Rooms with newer events are higher");
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -389,9 +389,9 @@ QString EventHandler::getBody(const NeoChatRoom *room, const Quotient::RoomEvent
|
||||
return i18n("left the room");
|
||||
}
|
||||
if (const auto &reason = e.contentJson()["reason"_L1].toString().toHtmlEscaped(); !reason.isEmpty()) {
|
||||
return i18n("has put %1 out of the room: %2", subjectName, reason);
|
||||
return i18n("has removed %1 from the room: %2", subjectName, reason);
|
||||
}
|
||||
return i18n("has put %1 out of the room", subjectName);
|
||||
return i18n("has removed %1 from the room", subjectName);
|
||||
case Membership::Ban:
|
||||
if (e.senderId() != e.userId()) {
|
||||
if (e.reason().isEmpty()) {
|
||||
|
||||
14
src/libneochat/jobs/neochatreportroomjob.cpp
Normal file
14
src/libneochat/jobs/neochatreportroomjob.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "neochatreportroomjob.h"
|
||||
|
||||
using namespace Quotient;
|
||||
|
||||
NeochatReportRoomJob::NeochatReportRoomJob(const QString &userId, const QString &reason)
|
||||
: BaseJob(HttpVerb::Post, u"ReportRoomJob"_s, makePath(" /_matrix/client/v3/", userId, "/report"))
|
||||
{
|
||||
QJsonObject _dataJson;
|
||||
addParam<IfNotEmpty>(_dataJson, "reason"_L1, reason);
|
||||
setRequestData({_dataJson});
|
||||
}
|
||||
13
src/libneochat/jobs/neochatreportroomjob.h
Normal file
13
src/libneochat/jobs/neochatreportroomjob.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Quotient/jobs/basejob.h>
|
||||
|
||||
// TODO: Remove once libQuotient updates to Matrix API v1.14
|
||||
class NeochatReportRoomJob : public Quotient::BaseJob
|
||||
{
|
||||
public:
|
||||
explicit NeochatReportRoomJob(const QString &roomId, const QString &reason);
|
||||
};
|
||||
14
src/libneochat/jobs/neochatreportuserjob.cpp
Normal file
14
src/libneochat/jobs/neochatreportuserjob.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "neochatreportuserjob.h"
|
||||
|
||||
using namespace Quotient;
|
||||
|
||||
NeochatReportUserJob::NeochatReportUserJob(const QString &userId, const QString &reason)
|
||||
: BaseJob(HttpVerb::Post, u"ReportUserJob"_s, makePath("/_matrix/client/v3/users/", userId, "/report"))
|
||||
{
|
||||
QJsonObject _dataJson;
|
||||
addParam<IfNotEmpty>(_dataJson, "reason"_L1, reason);
|
||||
setRequestData({_dataJson});
|
||||
}
|
||||
13
src/libneochat/jobs/neochatreportuserjob.h
Normal file
13
src/libneochat/jobs/neochatreportuserjob.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Quotient/jobs/basejob.h>
|
||||
|
||||
// TODO: Remove once libQuotient updates to Matrix API v1.14
|
||||
class NeochatReportUserJob : public Quotient::BaseJob
|
||||
{
|
||||
public:
|
||||
explicit NeochatReportUserJob(const QString &userId, const QString &reason);
|
||||
};
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QImageReader>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include "jobs/neochatreportuserjob.h"
|
||||
#include "neochatroom.h"
|
||||
#include "spacehierarchycache.h"
|
||||
|
||||
@@ -19,6 +20,7 @@
|
||||
#include <Quotient/csapi/profile.h>
|
||||
#include <Quotient/csapi/registration.h>
|
||||
#include <Quotient/csapi/versions.h>
|
||||
#include <Quotient/e2ee/sssshandler.h>
|
||||
#include <Quotient/jobs/downloadfilejob.h>
|
||||
#include <Quotient/qt_connection_util.h>
|
||||
#include <Quotient/room.h>
|
||||
@@ -95,6 +97,7 @@ void NeoChatConnection::connectSignals()
|
||||
Q_EMIT directChatsHaveHighlightNotificationsChanged();
|
||||
});
|
||||
}
|
||||
Q_EMIT roomInvitesChanged();
|
||||
connect(room, &Room::unreadStatsChanged, this, [this]() {
|
||||
refreshBadgeNotificationCount();
|
||||
Q_EMIT homeNotificationsChanged();
|
||||
@@ -159,6 +162,10 @@ void NeoChatConnection::refreshBadgeNotificationCount()
|
||||
for (const auto &r : allRooms()) {
|
||||
if (const auto room = static_cast<NeoChatRoom *>(r)) {
|
||||
count += room->contextAwareNotificationCount();
|
||||
|
||||
if (room->joinState() == JoinState::Invite) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +197,7 @@ void NeoChatConnection::setKeywordPushRuleDefault(PushRuleAction::Action default
|
||||
|
||||
void NeoChatConnection::logout(bool serverSideLogout)
|
||||
{
|
||||
AccountSettingsGroup().remove(userId());
|
||||
SettingsGroup(u"Accounts"_s).remove(userId());
|
||||
|
||||
QKeychain::DeletePasswordJob job(qAppName());
|
||||
job.setAutoDelete(true);
|
||||
@@ -452,15 +459,20 @@ bool NeoChatConnection::homeHaveHighlightNotifications() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool NeoChatConnection::directChatInvites() const
|
||||
qsizetype NeoChatConnection::directChatInvites() const
|
||||
{
|
||||
auto inviteRooms = rooms(JoinState::Invite);
|
||||
for (const auto inviteRoom : inviteRooms) {
|
||||
if (inviteRoom->isDirectChat()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
const auto inviteRooms = rooms(JoinState::Invite);
|
||||
return std::ranges::count_if(inviteRooms, [](const auto room) {
|
||||
return room->isDirectChat();
|
||||
});
|
||||
}
|
||||
|
||||
qsizetype NeoChatConnection::roomInvites() const
|
||||
{
|
||||
const auto inviteRooms = rooms(JoinState::Invite);
|
||||
return std::ranges::count_if(inviteRooms, [](const auto room) {
|
||||
return !room->isDirectChat();
|
||||
});
|
||||
}
|
||||
|
||||
QCoro::Task<void> NeoChatConnection::setupPushNotifications(QString endpoint)
|
||||
@@ -564,4 +576,36 @@ bool NeoChatConnection::isVerifiedSession() const
|
||||
return isVerifiedDevice(userId(), deviceId());
|
||||
}
|
||||
|
||||
void NeoChatConnection::unlockSSSS(const QString &secret)
|
||||
{
|
||||
auto handler = new SSSSHandler();
|
||||
handler->setConnection(this);
|
||||
connect(handler, &SSSSHandler::error, this, [secret, handler, this]() {
|
||||
disconnect(handler, &SSSSHandler::error, this, nullptr);
|
||||
if (!secret.isEmpty()) {
|
||||
connect(handler, &SSSSHandler::error, this, [handler, this]() {
|
||||
Q_EMIT keyBackupError();
|
||||
delete handler;
|
||||
});
|
||||
handler->unlockSSSSWithPassphrase(secret);
|
||||
} else {
|
||||
Q_EMIT keyBackupError();
|
||||
}
|
||||
});
|
||||
connect(handler, &SSSSHandler::keyBackupUnlocked, this, [handler, this]() {
|
||||
Q_EMIT keyBackupUnlocked();
|
||||
connect(handler, &SSSSHandler::finished, handler, &SSSSHandler::deleteLater);
|
||||
});
|
||||
if (secret.isEmpty()) {
|
||||
handler->unlockSSSSFromCrossSigning();
|
||||
} else {
|
||||
handler->unlockSSSSFromSecurityKey(secret);
|
||||
}
|
||||
}
|
||||
|
||||
void NeoChatConnection::reportUser(const QString &userId, const QString &reason)
|
||||
{
|
||||
callApi<NeochatReportUserJob>(userId, reason);
|
||||
}
|
||||
|
||||
#include "moc_neochatconnection.cpp"
|
||||
|
||||
@@ -66,9 +66,14 @@ class NeoChatConnection : public Quotient::Connection
|
||||
Q_PROPERTY(bool homeHaveHighlightNotifications READ homeHaveHighlightNotifications NOTIFY homeHaveHighlightNotificationsChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether there is at least one invite to a direct chat.
|
||||
* @brief The number of invites to 1-on-1 direct chats.
|
||||
*/
|
||||
Q_PROPERTY(bool directChatInvites READ directChatInvites NOTIFY directChatInvitesChanged)
|
||||
Q_PROPERTY(qsizetype directChatInvites READ directChatInvites NOTIFY directChatInvitesChanged)
|
||||
|
||||
/**
|
||||
* @brief The number of pending, normal room invites.
|
||||
*/
|
||||
Q_PROPERTY(qsizetype roomInvites READ roomInvites NOTIFY roomInvitesChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether the server supports querying a user's mutual rooms.
|
||||
@@ -200,7 +205,8 @@ public:
|
||||
*/
|
||||
static void setKeywordPushRuleDefault(PushRuleAction::Action defaultAction);
|
||||
|
||||
bool directChatInvites() const;
|
||||
qsizetype directChatInvites() const;
|
||||
qsizetype roomInvites() const;
|
||||
|
||||
// note: this is intentionally a copied QString because
|
||||
// the reference could be destroyed before the task is finished
|
||||
@@ -216,6 +222,13 @@ public:
|
||||
*/
|
||||
bool isVerifiedSession() const;
|
||||
|
||||
Q_INVOKABLE void unlockSSSS(const QString &secret);
|
||||
|
||||
/**
|
||||
* @brief Report a user.
|
||||
*/
|
||||
Q_INVOKABLE void reportUser(const QString &userId, const QString &reason);
|
||||
|
||||
Q_SIGNALS:
|
||||
void globalUrlPreviewEnabledChanged();
|
||||
void labelChanged();
|
||||
@@ -225,6 +238,7 @@ Q_SIGNALS:
|
||||
void homeNotificationsChanged();
|
||||
void homeHaveHighlightNotificationsChanged();
|
||||
void directChatInvitesChanged();
|
||||
void roomInvitesChanged();
|
||||
void passwordStatus(NeoChatConnection::PasswordStatus status);
|
||||
void userConsentRequired(QUrl url);
|
||||
void badgeNotificationCountChanged(int count);
|
||||
@@ -252,6 +266,9 @@ Q_SIGNALS:
|
||||
*/
|
||||
void ownSessionVerified();
|
||||
|
||||
void keyBackupUnlocked();
|
||||
void keyBackupError();
|
||||
|
||||
private:
|
||||
static bool m_globalUrlPreviewDefault;
|
||||
static PushRuleAction::Action m_defaultAction;
|
||||
|
||||
@@ -50,12 +50,12 @@
|
||||
#include "roomlastmessageprovider.h"
|
||||
#include "spacehierarchycache.h"
|
||||
#include "urlhelper.h"
|
||||
#include "jobs/neochatreportroomjob.h"
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
#include <KIO/Job>
|
||||
#include <KIO/JobTracker>
|
||||
#endif
|
||||
|
||||
#include <KJobTrackerInterface>
|
||||
#include <KLocalizedString>
|
||||
|
||||
@@ -346,6 +346,10 @@ void NeoChatRoom::forget()
|
||||
|
||||
void NeoChatRoom::sendTypingNotification(bool isTyping)
|
||||
{
|
||||
// During the chatbar setup sequence, this may get called while we're still initializing
|
||||
if (localMember().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
connection()->callApi<SetTypingJob>(BackgroundRequest, localMember().id(), id(), isTyping, 10000);
|
||||
}
|
||||
|
||||
@@ -1834,4 +1838,9 @@ QString NeoChatRoom::pinnedMessage() const
|
||||
return m_pinnedMessage;
|
||||
}
|
||||
|
||||
void NeoChatRoom::report(const QString &reason)
|
||||
{
|
||||
connection()->callApi<NeochatReportRoomJob>(id(), reason);
|
||||
}
|
||||
|
||||
#include "moc_neochatroom.cpp"
|
||||
|
||||
@@ -622,6 +622,11 @@ public:
|
||||
*/
|
||||
QString pinnedMessage() const;
|
||||
|
||||
/**
|
||||
* @brief Send a report about this room.
|
||||
*/
|
||||
Q_INVOKABLE void report(const QString &reason);
|
||||
|
||||
private:
|
||||
bool m_visible = false;
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ QQC2.Control {
|
||||
color: Kirigami.Theme.textColor
|
||||
|
||||
font.family: "monospace"
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
|
||||
Kirigami.SpellCheck.enabled: false
|
||||
|
||||
|
||||
@@ -41,7 +41,12 @@ QQC2.Control {
|
||||
*/
|
||||
property var defaultHeight: Kirigami.Units.gridUnit * 3 + Kirigami.Units.largeSpacing * 2
|
||||
|
||||
property bool truncated: linkPreviewDescription.truncated || !linkPreviewDescription.visible
|
||||
/**
|
||||
* @brief Whether the link preview description is truncated.
|
||||
*
|
||||
* This is only applicable if there *is* a text description, and is never true for images.
|
||||
*/
|
||||
property bool truncated: linkPreviewDescription.truncated && linkPreviewDescription.visible
|
||||
|
||||
/**
|
||||
* @brief Request for this delegate to be removed.
|
||||
@@ -72,7 +77,7 @@ QQC2.Control {
|
||||
id: previewImage
|
||||
Layout.preferredWidth: root.defaultHeight
|
||||
Layout.preferredHeight: root.defaultHeight
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: root.defaultHeight
|
||||
Layout.fillHeight: true
|
||||
visible: root.linkPreviewer.imageSource.toString().length > 0
|
||||
source: root.linkPreviewer.imageSource
|
||||
@@ -82,9 +87,9 @@ QQC2.Control {
|
||||
}
|
||||
ColumnLayout {
|
||||
id: column
|
||||
implicitWidth: Math.max(linkPreviewTitle.implicitWidth, linkPreviewDescription.implicitWidth)
|
||||
Layout.preferredWidth: Math.max(linkPreviewTitle.implicitWidth, linkPreviewDescription.implicitWidth)
|
||||
Layout.fillWidth: true
|
||||
spacing: Kirigami.Units.smallSpacing
|
||||
visible: root.linkPreviewer.title.length > 0 || root.linkPreviewer.description.length > 0
|
||||
Kirigami.Heading {
|
||||
id: linkPreviewTitle
|
||||
Layout.fillWidth: true
|
||||
@@ -121,10 +126,11 @@ QQC2.Control {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onTapped: RoomManager.resolveResource(root.linkPreviewer.url, "join")
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onHoveredChanged: (root.QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = hovered ? root.linkPreviewer.url : ""
|
||||
}
|
||||
}
|
||||
|
||||
QQC2.Button {
|
||||
|
||||
@@ -58,6 +58,7 @@ QQC2.Control {
|
||||
selectionColor: Kirigami.Theme.highlightColor
|
||||
|
||||
font.italic: true
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
|
||||
onSelectedTextChanged: root.selectedTextChanged(selectedText)
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ Flow {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: reactionDelegate.textContent
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
background: null
|
||||
wrapMode: TextEdit.NoWrap
|
||||
textFormat: Text.RichText
|
||||
|
||||
@@ -67,7 +67,9 @@ TextEdit {
|
||||
selectedTextColor: Kirigami.Theme.highlightedTextColor
|
||||
selectionColor: Kirigami.Theme.highlightColor
|
||||
font {
|
||||
pointSize: !root.isReply && QmlUtils.isEmoji(display) ? Kirigami.Theme.defaultFont.pointSize * 4 : Kirigami.Theme.defaultFont.pointSize
|
||||
pointSize: !root.isReply && QmlUtils.isEmoji(display)
|
||||
? Kirigami.Theme.defaultFont.pointSize * 4 * NeoChatConfig.fontScale
|
||||
: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale
|
||||
family: QmlUtils.isEmoji(display) ? 'emoji' : Kirigami.Theme.defaultFont.family
|
||||
}
|
||||
selectByMouse: !Kirigami.Settings.isMobile
|
||||
|
||||
@@ -121,7 +121,9 @@ void PollHandler::handleResponse(const Quotient::PollResponseEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
m_selections[event->senderId()] = event->selections().size() > 0 ? event->selections().first(pollStartEvent->maxSelections()) : event->selections();
|
||||
m_selections[event->senderId()] = event->selections().size() > 0
|
||||
? event->selections().first(std::min(pollStartEvent->maxSelections(), (int)event->selections().size()))
|
||||
: event->selections();
|
||||
if (m_selections.contains(event->senderId()) && m_selections[event->senderId()].isEmpty()) {
|
||||
m_selections.remove(event->senderId());
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import QtPositioning
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat.libneochat
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Page {
|
||||
id: root
|
||||
|
||||
@@ -79,7 +79,7 @@ QQC2.ScrollView {
|
||||
id: searchButton
|
||||
visible: !root.room.isSpace
|
||||
icon.name: "search"
|
||||
text: i18n("Search in this room")
|
||||
text: i18nc("@action:button", "Search Messages")
|
||||
activeFocusOnTab: true
|
||||
|
||||
Layout.fillWidth: true
|
||||
@@ -107,7 +107,7 @@ QQC2.ScrollView {
|
||||
id: favouriteButton
|
||||
visible: !root.room.isSpace
|
||||
icon.name: root.room && root.room.isFavourite ? "rating" : "rating-unrated"
|
||||
text: root.room && root.room.isFavourite ? i18n("Remove room from favorites") : i18n("Favorite this room")
|
||||
text: root.room && root.room.isFavourite ? i18nc("@action:button", "Remove from Favorites") : i18nc("@action:button", "Add to Favorites")
|
||||
|
||||
onClicked: root.room.isFavourite ? root.room.removeTag("m.favourite") : root.room.addTag("m.favourite", 1.0)
|
||||
|
||||
@@ -120,7 +120,7 @@ QQC2.ScrollView {
|
||||
id: widgetsButton
|
||||
visible: !root.room.isSpace
|
||||
icon.name: "extension-symbolic"
|
||||
text: i18nc("@action:button", "Extensions for this room")
|
||||
text: i18nc("@action:button", "Extensions")
|
||||
activeFocusOnTab: true
|
||||
|
||||
onClicked: ((QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'WidgetsPage'), {
|
||||
@@ -136,7 +136,7 @@ QQC2.ScrollView {
|
||||
id: locationsButton
|
||||
visible: !root.room.isSpace
|
||||
icon.name: "map-flat"
|
||||
text: i18n("Show locations for this room")
|
||||
text: i18nc("@action:button", "Shared Locations")
|
||||
activeFocusOnTab: true
|
||||
|
||||
onClicked: ((QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'LocationsPage'), {
|
||||
@@ -152,7 +152,7 @@ QQC2.ScrollView {
|
||||
id: pinnedMessagesButton
|
||||
visible: !root.room.isSpace
|
||||
icon.name: "pin-symbolic"
|
||||
text: i18nc("@action:button", "Pinned messages")
|
||||
text: i18nc("@action:button", "Pinned Messages")
|
||||
activeFocusOnTab: true
|
||||
|
||||
Layout.fillWidth: true
|
||||
@@ -166,10 +166,29 @@ QQC2.ScrollView {
|
||||
}
|
||||
}
|
||||
|
||||
Delegates.RoundedItemDelegate {
|
||||
text: i18nc("@action:inmenu", "Inspect Room Data")
|
||||
icon.name: "tools"
|
||||
visible: NeoChatConfig.developerTools
|
||||
activeFocusOnTab: true
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
onClicked: ((QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), {
|
||||
connection: root.room.connection,
|
||||
currentTabIndex: 1, // Room data tab
|
||||
room: root.room
|
||||
}, {
|
||||
title: i18nc("@title:window", "Developer Tools"),
|
||||
width: Kirigami.Units.gridUnit * 50,
|
||||
height: Kirigami.Units.gridUnit * 42
|
||||
})
|
||||
}
|
||||
|
||||
Delegates.RoundedItemDelegate {
|
||||
id: leaveButton
|
||||
icon.name: "arrow-left-symbolic"
|
||||
text: root.room.isSpace ? i18nc("@action:button", "Leave this space…") : i18nc("@action:button", "Leave this room…")
|
||||
text: root.room.isSpace ? i18nc("@action:button", "Leave Space…") : i18nc("@action:button", "Leave Room…")
|
||||
activeFocusOnTab: true
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -46,10 +46,6 @@ RowLayout {
|
||||
onClicked: root.search();
|
||||
icon.name: "search"
|
||||
text: i18nc("@action", "Search Rooms")
|
||||
Shortcut {
|
||||
sequence: "Ctrl+F"
|
||||
onActivated: searchButton.clicked()
|
||||
}
|
||||
|
||||
QQC2.ToolTip.visible: hovered
|
||||
QQC2.ToolTip.text: text
|
||||
|
||||
@@ -46,7 +46,7 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
QQC2.Action {
|
||||
text: i18nc("@action:inmenu", "Mark as Read")
|
||||
icon.name: "checkmark"
|
||||
enabled: root.room.notificationCount > 0
|
||||
enabled: root.room.notificationCount > 0 || root.room.highlightCount > 0
|
||||
onTriggered: root.room.markAllMessagesAsRead()
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
}
|
||||
|
||||
Kirigami.Action {
|
||||
text: i18nc("As in 'notify for all messages'", "All")
|
||||
text: i18nc("As in 'notify for all messages'", "All Messages")
|
||||
icon.name: "notifications"
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
@@ -95,7 +95,7 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
}
|
||||
|
||||
Kirigami.Action {
|
||||
text: i18nc("As in 'do not notify for any messages'", "Off")
|
||||
text: i18nc("As in 'do not notify for any messages'", "None")
|
||||
icon.name: "notifications-disabled"
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
@@ -150,6 +150,26 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
separator: true
|
||||
}
|
||||
|
||||
Kirigami.Action {
|
||||
text: i18nc("@action:button 'Report' as in 'Report this room to the administrators'", "Report…")
|
||||
icon.name: "dialog-warning-symbolic"
|
||||
visible: root.connection.supportsMatrixSpecVersion("v1.13")
|
||||
onTriggered: {
|
||||
let dialog = (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
||||
title: i18nc("@title:dialog", "Report Room"),
|
||||
placeholder: i18nc("@info:placeholder", "Reason for reporting this room"),
|
||||
icon: "dialog-warning-symbolic",
|
||||
actionText: i18nc("@action:button 'Report' as in 'Report this room to the administrators'", "Report")
|
||||
}, {
|
||||
title: i18nc("@title", "Report Room"),
|
||||
width: Kirigami.Units.gridUnit * 25
|
||||
}) as ReasonDialog;
|
||||
dialog.accepted.connect(reason => {
|
||||
currentRoom.report(reason);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
QQC2.Action {
|
||||
text: i18nc("@action:inmenu", "Leave Room…")
|
||||
icon.name: "go-previous"
|
||||
|
||||
@@ -78,11 +78,11 @@ Kirigami.Page {
|
||||
}
|
||||
|
||||
function goToNextUnreadRoom() {
|
||||
goToNextRoomFiltered(item => (item && item instanceof RoomDelegate && item.hasUnread));
|
||||
goToNextRoomFiltered(item => (item && item instanceof RoomDelegate && item.hasUnreadMessages));
|
||||
}
|
||||
|
||||
function goToPreviousUnreadRoom() {
|
||||
goToPreviousRoomFiltered(item => (item && item instanceof RoomDelegate && item.hasUnread));
|
||||
goToPreviousRoomFiltered(item => (item && item instanceof RoomDelegate && item.hasUnreadMessages));
|
||||
}
|
||||
|
||||
titleDelegate: Loader {
|
||||
|
||||
@@ -81,12 +81,15 @@ QQC2.Control {
|
||||
AvatarTabButton {
|
||||
id: allRoomButton
|
||||
|
||||
readonly property int countedNotifications: root.connection.homeNotifications + root.connection.roomInvites
|
||||
readonly property bool hasCountableNotifications: countedNotifications > 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: width - Kirigami.Units.smallSpacing
|
||||
Layout.maximumHeight: width - Kirigami.Units.smallSpacing
|
||||
Layout.topMargin: Kirigami.Units.smallSpacing / 2
|
||||
|
||||
text: i18n("Home")
|
||||
text: hasCountableNotifications ? i18ncp("Home space for the uncategorized rooms", "Home (%1 notification)", "Home (%1 notifications)", countedNotifications) : i18nc("Home space for the uncategorized rooms", "Home")
|
||||
contentItem: Kirigami.Icon {
|
||||
source: "user-home-symbolic"
|
||||
|
||||
@@ -100,15 +103,15 @@ QQC2.Control {
|
||||
width: Math.max(homeNotificationCountTextMetrics.advanceWidth + Kirigami.Units.smallSpacing * 2, height)
|
||||
height: Kirigami.Units.iconSizes.smallMedium
|
||||
|
||||
text: root.connection.homeNotifications > 0 ? root.connection.homeNotifications : ""
|
||||
visible: root.connection.homeNotifications > 0 && (RoomManager.currentSpace.length > 0 || RoomManager.currentSpace !== "DM")
|
||||
text: allRoomButton.countedNotifications
|
||||
visible: allRoomButton.hasCountableNotifications && (RoomManager.currentSpace.length > 0 || RoomManager.currentSpace !== "DM")
|
||||
color: Kirigami.Theme.textColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
background: Rectangle {
|
||||
visible: true
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.inherit: false
|
||||
color: root.connection.homeHaveHighlightNotifications ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.backgroundColor
|
||||
color: root.connection.homeHaveHighlightNotifications || root.connection.roomInvites > 0 ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.backgroundColor
|
||||
radius: height / 2
|
||||
}
|
||||
|
||||
@@ -127,7 +130,8 @@ QQC2.Control {
|
||||
AvatarTabButton {
|
||||
id: directChatButton
|
||||
|
||||
readonly property bool hasCountableNotifications: root.connection.directChatNotifications > 0 || root.connection.directChatInvites > 0
|
||||
readonly property int countedNotifications: root.connection.directChatNotifications + root.connection.directChatInvites
|
||||
readonly property bool hasCountableNotifications: countedNotifications > 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: width - Kirigami.Units.smallSpacing
|
||||
@@ -136,7 +140,7 @@ QQC2.Control {
|
||||
|
||||
text: {
|
||||
if (directChatButton.hasCountableNotifications) {
|
||||
return i18ncp("@button View all one-on-one chats.", "Direct Messages (%1 notification)", "Direct Messages (%1 notifications)", root.connection.directChatNotifications + root.connection.directChatInvites);
|
||||
return i18ncp("@button View all one-on-one chats.", "Direct Messages (%1 notification)", "Direct Messages (%1 notifications)", directChatButton.countedNotifications);
|
||||
}
|
||||
|
||||
return i18nc("@button View all one-on-one chats.", "Direct Messages");
|
||||
@@ -162,7 +166,7 @@ QQC2.Control {
|
||||
visible: true
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.inherit: false
|
||||
color: root.connection.directChatsHaveHighlightNotifications || root.connection.directChatInvites ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.backgroundColor
|
||||
color: root.connection.directChatsHaveHighlightNotifications || root.connection.directChatInvites > 0 ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.backgroundColor
|
||||
radius: height / 2
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,40 @@ FormCard.FormCardPage {
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {
|
||||
above: fontScaleSliderDelegate
|
||||
below: compactRoomListDelegate
|
||||
}
|
||||
|
||||
/*!
|
||||
Font scale setting allows user to adjust the font size used in the app.
|
||||
*/
|
||||
FormCard.AbstractFormDelegate {
|
||||
id: fontScaleSliderDelegate
|
||||
background: Item {}
|
||||
contentItem: ColumnLayout {
|
||||
QQC2.Label {
|
||||
text: i18nc("@label Font size for text in the chat pane", "Chat font scaling")
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
QQC2.Label {
|
||||
text: i18nc("@label:slider Current font scale percentage. %1 is the numeric percentage value, the second % is the symbol e.g. 120%", "%1%", Math.round(NeoChatConfig.fontScale * 100))
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
QQC2.Slider {
|
||||
from: 0.5
|
||||
to: 3.0
|
||||
stepSize: 0.1
|
||||
value: NeoChatConfig.fontScale
|
||||
onMoved: {
|
||||
NeoChatConfig.fontScale = value;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
|
||||
@@ -50,6 +50,7 @@ ecm_add_qml_module(Settings GENERATE_PLUGIN_SOURCE
|
||||
RoomSortParameterDialog.qml
|
||||
RoomProfile.qml
|
||||
RoomAdvancedPage.qml
|
||||
KeyboardShortcutsPage.qml
|
||||
SOURCES
|
||||
colorschemer.cpp
|
||||
threepidaddhelper.cpp
|
||||
|
||||
52
src/settings/KeyboardShortcutsPage.qml
Normal file
52
src/settings/KeyboardShortcutsPage.qml
Normal file
@@ -0,0 +1,52 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
FormCard.FormCardPage {
|
||||
title: i18nc("@title:window", "Keyboard Shortcuts")
|
||||
|
||||
FormCard.FormCard {
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing * 4
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Open Quick Switcher")
|
||||
description: "Ctrl+K"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Open Account Switcher")
|
||||
description: "Ctrl+U"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Search Messages in Current Room")
|
||||
description: "Ctrl+F"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Go to Previous Room")
|
||||
description: "Ctrl+PgUp, Ctrl+Backtab, Alt+Up"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Go to Next Room")
|
||||
description: "Ctrl+PgDown, Ctrl+Tab, Alt+Down"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Go to Previous Unread Room")
|
||||
description: "Alt+Shift+Up"
|
||||
}
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Go to Next Unread Room")
|
||||
description: "Alt+Shift+Down"
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user