diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a31183f..282dc3ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -295,6 +295,7 @@ set(SRC_FILES
src/RegisterPage.cpp
src/RoomInfoListItem.cpp
src/RoomList.cpp
+ src/SSOHandler.cpp
src/SideBarActions.cpp
src/Splitter.cpp
src/TextInputWidget.cpp
@@ -337,7 +338,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare(
MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
- GIT_TAG 1893cd6171c40c250ca64d388c082789452340a8
+ GIT_TAG 71bd56b66cf634341ffef804f07d33f01fd57c25
)
FetchContent_MakeAvailable(MatrixClient)
else()
@@ -496,6 +497,7 @@ qt5_wrap_cpp(MOC_HEADERS
src/RegisterPage.h
src/RoomInfoListItem.h
src/RoomList.h
+ src/SSOHandler.h
src/SideBarActions.h
src/Splitter.h
src/TextInputWidget.h
@@ -559,7 +561,7 @@ elseif(WIN32)
else()
target_link_libraries (nheko PRIVATE Qt5::DBus)
endif()
-target_include_directories(nheko PRIVATE src includes third_party/blurhash)
+target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
target_link_libraries(nheko PRIVATE
MatrixClient::MatrixClient
diff --git a/README.md b/README.md
index 761318a3..0cb3e044 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ can be found in the [Github releases](https://github.com/Nheko-Reborn/nheko/rele
pacaur -S nheko # nheko-git
```
-#### Debian (10 and above)
+#### Debian (10 and above) / Ubuntu (18.04 and above)
```bash
sudo apt install nheko
@@ -179,22 +179,14 @@ sudo pacman -S qt5-base \
sudo emerge -a ">=dev-qt/qtgui-5.9.0" media-libs/fontconfig
```
-##### Ubuntu 16.04
-
-```bash
-sudo add-apt-repository ppa:beineri/opt-qt592-xenial
-sudo add-apt-repository ppa:george-edison55/cmake-3.x
-sudo add-apt-repository ppa:ubuntu-toolchain-r-test
-sudo apt-get update
-sudo apt-get install -y g++-7 qt59base qt59svg qt59tools qt59multimedia cmake liblmdb-dev libsodium-dev
-```
-
-##### Ubuntu 19.10
+##### Ubuntu 20.04
```bash
# Build requirements + qml modules needed at runtime (you may not need all of them, but the following seem to work according to reports):
-sudo apt install g++-7 cmake liblmdb-dev libsodium-dev libssl-dev qt{base,declarative,tools,multimedia,script,quickcontrols2-}5-dev qml-module-qt{gstreamer,multimedia,quick-extras,-labs-settings,graphicaleffects,quick-controls2} libqt5svg5-dev
+sudo apt install g++ cmake zlib1g-dev libssl-dev qt{base,declarative,tools,multimedia,quickcontrols2-}5-dev libqt5svg5-dev libboost-system-dev libboost-thread-dev libboost-iostreams-dev libolm-dev libsodium-dev liblmdb++-dev libcmark-dev nlohmann-json3-dev libspdlog-dev libgtest-dev qml-module-qt{gstreamer,multimedia,quick-extras,-labs-settings,graphicaleffects,quick-controls2}
```
+This will install all dependencies, except for tweeny (use bundled tweeny)
+and mtxclient (needs to be build separately).
##### Debian Buster (or higher probably)
@@ -237,14 +229,14 @@ Make sure to install the `MSVC 2017 64-bit` toolset for at least Qt 5.10
We can now build nheko:
```bash
-cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
+cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build
```
To use bundled dependencies you can use hunter, i.e.:
```bash
-cmake -H. -Bbuild -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=OFF
+cmake -S. -Bbuild -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=OFF
cmake --build build --config Release
```
@@ -263,7 +255,7 @@ You might need to pass `-DCMAKE_PREFIX_PATH` to cmake to point it at your qt5 in
e.g on macOS
```
-cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
+cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
cmake --build build
```
@@ -283,7 +275,7 @@ Examples for the paths are:
You should also enable hunter by setting `HUNTER_ENABLED` to `ON` and `BUILD_SHARED_LIBS` to `OFF`.
Now right click into the root nheko source directory and choose `Open in Visual Studio`.
-You can choose the build type Release and Debug in the top toolbar.
+You can choose the build type Release and Debug in the top toolbar.
After a successful CMake generation you can select the `nheko.exe` as the run target.
Now choose `Build all` in the CMake menu or press `F7` to compile the executable.
diff --git a/io.github.NhekoReborn.Nheko.json b/io.github.NhekoReborn.Nheko.json
index fe3a4a25..60d984fb 100644
--- a/io.github.NhekoReborn.Nheko.json
+++ b/io.github.NhekoReborn.Nheko.json
@@ -146,9 +146,9 @@
"name": "mtxclient",
"sources": [
{
- "sha256": "a8c0239b7157fe8eadae8b06cd6c4e3531dcc61fc5a7f52dbb3c85106f70e3a5",
+ "sha256": "7055f1459a43a12f27f949564624f13cc593ac894e445e6de0e6563ad38ebc3e",
"type": "archive",
- "url": "https://github.com/Nheko-Reborn/mtxclient/archive/1893cd6171c40c250ca64d388c082789452340a8.tar.gz"
+ "url": "https://github.com/Nheko-Reborn/mtxclient/archive/71bd56b66cf634341ffef804f07d33f01fd57c25.tar.gz"
}
]
},
diff --git a/resources/icons/ui/unlock.png b/resources/icons/ui/unlock.png
new file mode 100644
index 00000000..90e4602a
Binary files /dev/null and b/resources/icons/ui/unlock.png differ
diff --git a/resources/icons/ui/unlock@2x.png b/resources/icons/ui/unlock@2x.png
new file mode 100644
index 00000000..8df18143
Binary files /dev/null and b/resources/icons/ui/unlock@2x.png differ
diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts
index ee1e4dd5..90f0e7d3 100644
--- a/resources/langs/nheko_de.ts
+++ b/resources/langs/nheko_de.ts
@@ -5,8 +5,8 @@
Cache
- You joined this room
-
+ You joined this room.
+ Du bist dem Raum beigetreten.
@@ -18,12 +18,22 @@
-
+ Invited user: %1Eingeladener Benutzer: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+ Migrieren des Caches auf die aktuelle Version fehlgeschlagen. Das kann verschiedene Gründe als Ursache haben. Bitte lege einen Bugreport an und verwende in der Zwischenzeit eine ältere Version. Alternativ kannst du das Cache manuell entfernen.
+
+
+
+ Room %1 created.
+ Raum %1 erzeugt.
+
+
+ Failed to invite %1 to %2: %3Einladung von %1 in Raum %2 fehlgeschlagen: %3
@@ -58,29 +68,24 @@
Verbannung von %1 wurde aufgehoben.
-
+ Failed to upload media. Please try again.Medienupload fehlgeschlagen. Bitte versuche es erneut.Cache migration failed!
-
+ Cache migration fehlgeschlagen!
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
-
+ Inkompatible CacheversionThe cache on your disk is newer than this version of Nheko supports. Please update or clear your cache.
-
+ Das Cache auf der Festplatte wurde mit einer neueren Nheko version angelegt. Bitte aktualisiere Nheko oder entferne das Cache.
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1Bitte melde dich erneut an: %1
@@ -124,12 +129,7 @@
Raum konnte nicht erstellt werden: %1
-
- Room %1 created
- Raum %1 wurde erstellt.
-
-
-
+ Failed to leave room: %1Konnte den Raum nicht verlassen: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ EncryptedVerschlüsselt
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix-ID
@@ -264,22 +269,46 @@
z.B. @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+ Dein Anmeldename. Eine mxid sollte mit einem @ anfangen, gefolgt von dem Benutzernamen. Nach dem Benutzernamen sollten ein Doppelpunkt (:) under der Servername folgen.
+Nach dem Doppelpunkt kann alternativ die Serveradresse (mit oder ohne Port) angegeben werden, wenn der Server nicht per .well-known auffindbar ist.
+Beispiel: @benutzer:dein.server
+Wenn Nheko deinen Server nicht automatisch erkennen kann, wird es dich nach dem Server fragen.
+
+
+ PasswordPasswort
-
+ Device nameGerätename
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+ Ein Name für dieses Gerät. Dieser wird anderen angezeigt, wenn sie dieses Gerät verifizieren. Wenn kein Name angegeben wurde, wird automatisch ein zufälliger Name erzeugt, der keine Rückschlüsse auf deine Identität zulassen sollte.
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+ Die Adresse unter der dein Heimserver erreichbar ist.
+Beispiel: https://mein.server:8787
+
+
+
+ LOGINANMELDEN
-
+ Autodiscovery failed. Received malformed response.Automatische Erkennung fehlgeschlagen. Antwort war fehlerhaft.
@@ -289,7 +318,7 @@
Automatische Erkennung fehlgeschlagen. Unbekannter Fehler bei Anfrage .well-known.
-
+ The required endpoints were not found. Possibly not a Matrix server.Benötigte Ansprechpunkte nicht auffindbar. Möglicherweise kein Matrixserver.
@@ -304,10 +333,20 @@
Ein unbekannter Fehler ist aufgetreten. Bitte Homeserverdomain prüfen.
-
+
+ SSO LOGIN
+ SSO ANMELDUNG
+
+
+ Empty passwordLeeres Passwort
+
+
+ SSO login failed
+ SSO Anmeldung fehlgeschlagen
+ MemberList
@@ -325,7 +364,7 @@
MessageDelegate
-
+ redactedgelöscht
@@ -385,9 +424,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+ Der Benutzername sollte nicht leer sein und nur aus a-z, 0-9, ., _, =, - und / bestehen.
+
+
+ PasswordPasswort
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+ Bitte wähle ein sicheres Passwort. Die genauen Anforderungen bestimmt dein Server.
+ Password confirmation
@@ -395,11 +444,16 @@
- Home Server
- Homeserver
+ Homeserver
+ Heimserver
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+ Ein Server, der Registrierungen zulässt. Weil Matrix ein dezentralisiertes Protokoll ist, musst du erst einen Server ausfindig machen oder einen persönlichen Server aufsetzen.
+
+
+ REGISTERREGISTRIEREN
@@ -548,7 +602,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.-- Entschlüsselungsfehler (Fehler bei Kommunikation mit Datenbank) --
@@ -597,12 +651,7 @@
-- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) --
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.-- Verschlüsseltes Event (Unbekannter Eventtyp) --
@@ -722,7 +771,12 @@
%1 hat das Anklopfen zurückgezogen.
-
+
+ You joined this room.
+ Du bist dem Raum beigetreten.
+
+
+ Rejected the knock from %1.Hat das Anklopfen von %1 abgewiesen.
@@ -746,7 +800,7 @@
TimelineRow
-
+ React
@@ -809,7 +863,7 @@
Kein Raum geöffnet
-
+ CloseSchließen
@@ -898,7 +952,7 @@
Show buttons in timeline
-
+ Zeige Buttons in der Historie
@@ -1116,7 +1170,7 @@
Open Fallback in Browser
- Öffne Fallback im Browser
+ Öffne Fallback im Browser
diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts
index c5351ef3..6c186504 100644
--- a/resources/langs/nheko_el.ts
+++ b/resources/langs/nheko_el.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1
@@ -124,12 +129,7 @@
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix ID
@@ -264,22 +269,42 @@
π.χ @john:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordΚωδικός
-
+ Device name
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINΕΙΣΟΔΟΣ
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.
@@ -304,10 +329,20 @@
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordΚενός κωδικός
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordΚωδικός
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- Διακομιστής
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERΕΓΓΡΑΦΗ
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -597,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -722,7 +767,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -746,7 +796,7 @@
TimelineRow
-
+ React
@@ -809,7 +859,7 @@
-
+ Close
diff --git a/resources/langs/nheko_en.qm b/resources/langs/nheko_en.qm
new file mode 100644
index 00000000..0973db2d
Binary files /dev/null and b/resources/langs/nheko_en.qm differ
diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts
index 0220ee09..d6f5336b 100644
--- a/resources/langs/nheko_en.ts
+++ b/resources/langs/nheko_en.ts
@@ -5,8 +5,8 @@
Cache
- You joined this room
-
+ You joined this room.
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+ Room %1 created.
+ Room %1 created.
+
+
+ Failed to invite %1 to %2: %3Failed to invite %1 to %2: %3
@@ -58,29 +68,24 @@
Unbanned user: %1
-
+ Failed to upload media. Please try again.Failed to upload media. Please try again.Cache migration failed!
-
+ Cache migration failed!
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
-
+ Incompatible cache versionThe cache on your disk is newer than this version of Nheko supports. Please update or clear your cache.
-
+ The cache on your disk is newer than this version of Nheko supports. Please update or clear your cache.
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1Please try to login again: %1
@@ -124,12 +129,7 @@
Room creation failed: %1
-
- Room %1 created
- Room %1 created.
-
-
-
+ Failed to leave room: %1Failed to leave room: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ EncryptedEncrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix ID
@@ -264,22 +269,46 @@
e.g @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+ PasswordPassword
-
+ Device nameDevice name
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+ LOGINLOGIN
-
+ Autodiscovery failed. Received malformed response.Autodiscovery failed. Received malformed response.
@@ -289,7 +318,7 @@
Autodiscovery failed. Unknown error while requesting .well-known.
-
+ The required endpoints were not found. Possibly not a Matrix server.The required endpoints were not found. Possibly not a Matrix server.
@@ -304,10 +333,20 @@
An unknown error occured. Make sure the homeserver domain is valid.
-
+
+ SSO LOGIN
+ SSO LOGIN
+
+
+ Empty passwordEmpty password
+
+
+ SSO login failed
+ SSO login failed
+ MemberList
@@ -325,7 +364,7 @@
MessageDelegate
-
+ redactedredacted
@@ -385,9 +424,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+ PasswordPassword
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+ Password confirmation
@@ -395,11 +444,16 @@
- Home Server
- Home Server
+ Homeserver
+ Homeserver
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+ REGISTERREGISTER
@@ -548,7 +602,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.-- Decryption Error (failed to communicate with DB) --
@@ -597,12 +651,7 @@
-- Encrypted Event (No keys found for decryption) --
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.-- Encrypted Event (Unknown event type) --
@@ -612,8 +661,8 @@
%1 and %2 are typing.Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)
- %1%2 is typing
- %1 and %2 are typing
+ %1%2 is typing.
+ %1 and %2 are typing.
@@ -722,7 +771,12 @@
%1 redacted their knock.
-
+
+ You joined this room.
+ You joined this room.
+
+
+ Rejected the knock from %1.Rejected the knock from %1.
@@ -746,7 +800,7 @@
TimelineRow
-
+ React
@@ -791,7 +845,7 @@
View decrypted raw message
-
+ View decrypted raw message
@@ -809,7 +863,7 @@
No room open
-
+ CloseClose
@@ -893,7 +947,7 @@
Decrypt messages in sidebar
-
+ Decrypt messages in sidebar
diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts
index 712d8ef9..b8aa463f 100644
--- a/resources/langs/nheko_fi.ts
+++ b/resources/langs/nheko_fi.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1Ole hyvä ja yritä kirjautua sisään uudelleen: %1
@@ -124,12 +129,7 @@
Huoneen luominen epäonnistui: %1
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1Huoneesta poistuminen epäonnistui: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix-tunnus
@@ -264,22 +269,42 @@
esim. @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordSalasana
-
+ Device nameLaitteen nimi
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINKIRJAUDU
-
+ Autodiscovery failed. Received malformed response.Palvelimen tietojen hakeminen epäonnistui: virheellinen vastaus.
@@ -289,7 +314,7 @@
Palvelimen tietojen hakeminen epäonnistui: tuntematon virhe hakiessa .well-known -tiedostoa.
-
+ The required endpoints were not found. Possibly not a Matrix server.Vaadittuja päätepisteitä ei löydetty. Mahdollisesti ei Matrix-palvelin.
@@ -304,10 +329,20 @@
Tapahtui tuntematon virhe. Varmista, että kotipalvelimen osoite on pätevä.
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordTyhjä salasana
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordSalasana
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- Kotipalvelin
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERREKISTERÖIDY
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.-- Virhe purkaessa salausta (tietokannan kanssa kommunikointi epäonnistui) --
@@ -597,12 +647,7 @@
-- Salattu viesti (salauksen purkuavaimia ei löydetty) --
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.-- Salattu viesti (tuntematon viestityyppi) --
@@ -722,7 +767,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -746,7 +796,7 @@
TimelineRow
-
+ React
@@ -809,7 +859,7 @@
-
+ CloseSulje
diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts
index c21fda28..cc8c8238 100644
--- a/resources/langs/nheko_fr.ts
+++ b/resources/langs/nheko_fr.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1
@@ -124,12 +129,7 @@
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDIdentifiant Matrix
@@ -264,22 +269,42 @@
ex : @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordMot de passe
-
+ Device name
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINCONNEXION
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.
@@ -304,10 +329,20 @@
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordMot de passe vide
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordMot de passe
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,12 +440,16 @@
- Home Server
- À affiner...
- Serveur Matrix
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERS'ENREGISTRER
@@ -549,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -598,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -723,7 +767,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -747,7 +796,7 @@
TimelineRow
-
+ React
@@ -810,7 +859,7 @@
-
+ Close
diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts
index 4101ea2d..aaba8bd4 100644
--- a/resources/langs/nheko_ja.ts
+++ b/resources/langs/nheko_ja.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1招待されたユーザー: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3%2に%1を招待できませんでした: %3
@@ -58,7 +68,7 @@
永久追放を解除されたユーザー: %1
-
+ Failed to upload media. Please try again.メディアをアップロードできませんでした。やり直して下さい。
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1もう一度ログインしてみて下さい: %1
@@ -124,12 +129,7 @@
部屋を作成できませんでした: %1
-
- Room %1 created
- 部屋 %1 を作成しました
-
-
-
+ Failed to leave room: %1部屋から出られませんでした: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted暗号化されています
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix ID
@@ -264,22 +269,42 @@
例 @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ Passwordパスワード
-
+ Device nameデバイス名
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINログイン
-
+ Autodiscovery failed. Received malformed response.自動検出できませんでした。不正な形式の応答を受信しました。
@@ -289,7 +314,7 @@
自動検出できませんでした。.well-known要求時の不明なエラー。
-
+ The required endpoints were not found. Possibly not a Matrix server.必要な端点が見つかりません。Matrixサーバーではないかもしれません。
@@ -304,10 +329,20 @@
不明なエラーが発生しました。ホームサーバーのドメイン名が有効であるかを確認して下さい。
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordパスワードが入力されていません
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted編集済み
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ Passwordパスワード
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- ホームサーバー
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTER登録
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.-- 復号エラー (データベースと通信できませんでした) --
@@ -597,12 +647,7 @@
-- 暗号化イベント (復号鍵が見つかりません) --
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.-- 暗号化イベント (不明なイベント型です) --
@@ -721,7 +766,12 @@
%1がノックを編集しました。
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.%1からのノックを拒否しました。
@@ -745,7 +795,7 @@
TimelineRow
-
+ React
@@ -808,7 +858,7 @@
部屋が開いていません
-
+ Close閉じる
diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts
index dc19fd4e..8f5a9f21 100644
--- a/resources/langs/nheko_nl.ts
+++ b/resources/langs/nheko_nl.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1
@@ -124,12 +129,7 @@
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDMatrix-id
@@ -264,22 +269,42 @@
b.v @jan:matrix.org<
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordWachtwoord
-
+ Device name
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGININLOGGEN
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.
@@ -304,10 +329,20 @@
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordLeeg wachtwoord
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordWachtwoord
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- Thuisserver
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERREGISTREREN
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -597,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -722,7 +767,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -746,7 +796,7 @@
TimelineRow
-
+ React
@@ -809,7 +859,7 @@
-
+ Close
diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts
index a2d7ca11..7e4495fa 100644
--- a/resources/langs/nheko_pl.ts
+++ b/resources/langs/nheko_pl.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1Spróbuj zalogować się ponownie: %1
@@ -124,12 +129,7 @@
Tworzenie pokoju nie powiodło się: %1
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1Nie udało się opuścić pokoju: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDID Matrixa
@@ -264,22 +269,42 @@
np. @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordHasło
-
+ Device nameNazwa urządzenia
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINZALOGUJ
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.Nie odnaleziono wymaganych punktów końcowych. To może nie być serwer Matriksa.
@@ -304,10 +329,20 @@
Wystąpił nieznany błąd. Upewnij się, że domena serwera domowego jest prawidłowa.
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordPuste hasło
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordHasło
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- Serwer domowy
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERZAREJESTRUJ
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -597,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -723,7 +768,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -747,7 +797,7 @@
TimelineRow
-
+ React
@@ -810,7 +860,7 @@
-
+ Close
diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts
index 178301a3..99a31673 100644
--- a/resources/langs/nheko_ru.ts
+++ b/resources/langs/nheko_ru.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1Повторите попытку входа: %1
@@ -124,12 +129,7 @@
Не удалось создать комнату: %1
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1Не удалось покинуть комнату: %1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix IDИдентификатор Matrix
@@ -264,22 +269,42 @@
Пример: @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ PasswordПароль
-
+ Device nameИмя устройства
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGINВОЙТИ
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.Необходимые конечные точки не найдены. Возможно, это не сервер Matrix.
@@ -304,10 +329,20 @@
Произошла неизвестная ошибка. Убедитесь, что домен homeserver действителен.
-
+
+ SSO LOGIN
+
+
+
+ Empty passwordПустой пароль
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ PasswordПароль
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- Домашний сервер
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTERРЕГИСТРАЦИЯ
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -597,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -723,7 +768,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -747,7 +797,7 @@
TimelineRow
-
+ React
@@ -810,7 +860,7 @@
-
+ CloseЗакрыть
diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts
index b0f6728d..8afd6e3b 100644
--- a/resources/langs/nheko_zh_CN.ts
+++ b/resources/langs/nheko_zh_CN.ts
@@ -5,7 +5,7 @@
Cache
- You joined this room
+ You joined this room.
@@ -18,12 +18,22 @@
-
+ Invited user: %1
-
+
+ Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually.
+
+
+
+
+ Room %1 created.
+
+
+
+ Failed to invite %1 to %2: %3
@@ -58,7 +68,7 @@
-
+ Failed to upload media. Please try again.
@@ -68,12 +78,7 @@
-
- Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually
-
-
-
-
+ Incompatible cache version
@@ -99,7 +104,7 @@
-
+ Please try to login again: %1请尝试再次登录:%1
@@ -124,12 +129,7 @@
创建聊天室失败:%1
-
- Room %1 created
-
-
-
-
+ Failed to leave room: %1离开聊天室失败:%1
@@ -238,10 +238,15 @@
EncryptionIndicator
-
+ Encrypted
+
+
+ This message is not encrypted!
+
+ InviteeItem
@@ -254,7 +259,7 @@
LoginPage
-
+ Matrix ID
@@ -264,22 +269,42 @@
例如 @joe:matrix.org
-
+
+ Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :.
+You can also put your homeserver address there, if your server doesn't support .well-known lookup.
+Example: @user:server.my
+If Nheko fails to discover your homeserver, it will show you a field to enter the server manually.
+
+
+
+ Password密码
-
+ Device name设备名
-
+
+ A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes.
+
+
+
+
+ The address that can be used to contact you homeservers client API.
+Example: https://server.my:8787
+
+
+
+
+ LOGIN登录
-
+ Autodiscovery failed. Received malformed response.
@@ -289,7 +314,7 @@
-
+ The required endpoints were not found. Possibly not a Matrix server.没找到要求的终端。可能不是一个 Matrix 服务器。
@@ -304,10 +329,20 @@
发生了一个未知错误。请确认服务器域名合法。
-
+
+ SSO LOGIN
+
+
+
+ Empty password空密码
+
+
+ SSO login failed
+
+ MemberList
@@ -325,7 +360,7 @@
MessageDelegate
-
+ redacted
@@ -385,9 +420,19 @@
+ The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /.
+
+
+
+ Password密码
+
+
+ Please choose a secure password. The exact requirements for password strength may depend on your server.
+
+ Password confirmation
@@ -395,11 +440,16 @@
- Home Server
- 服务器
+ Homeserver
+
-
+
+ A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own.
+
+
+
+ REGISTER注册
@@ -548,7 +598,7 @@
TimelineModel
-
+ -- Decryption Error (failed to communicate with DB) --Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.
@@ -597,12 +647,7 @@
-
- You joined this room
-
-
-
-
+ -- Encrypted Event (Unknown event type) --Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.
@@ -721,7 +766,12 @@
-
+
+ You joined this room.
+
+
+
+ Rejected the knock from %1.
@@ -745,7 +795,7 @@
TimelineRow
-
+ React
@@ -808,7 +858,7 @@
-
+ Close
diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml
index 00fe2ee4..428c2fae 100644
--- a/resources/qml/EncryptionIndicator.qml
+++ b/resources/qml/EncryptionIndicator.qml
@@ -3,13 +3,14 @@ import QtQuick.Controls 2.1
import im.nheko 1.0
Rectangle {
+ property bool encrypted: false
id: indicator
color: "transparent"
width: 16
height: 16
ToolTip.visible: ma.containsMouse && indicator.visible
- ToolTip.text: qsTr("Encrypted")
+ ToolTip.text: getEncryptionTooltip()
MouseArea{
id: ma
@@ -20,7 +21,21 @@ Rectangle {
Image {
id: stateImg
anchors.fill: parent
- source: "image://colorimage/:/icons/icons/ui/lock.png?"+colors.buttonText
+ source: getEncryptionImage()
+ }
+
+ function getEncryptionImage() {
+ if (encrypted)
+ return "image://colorimage/:/icons/icons/ui/lock.png?"+colors.buttonText
+ else
+ return "image://colorimage/:/icons/icons/ui/unlock.png?#dd3d3d"
+ }
+
+ function getEncryptionTooltip() {
+ if (encrypted)
+ return qsTr("Encrypted")
+ else
+ return qsTr("This message is not encrypted!")
}
}
diff --git a/resources/qml/ScrollHelper.qml b/resources/qml/ScrollHelper.qml
index 3a8868f5..cdb4a23a 100644
--- a/resources/qml/ScrollHelper.qml
+++ b/resources/qml/ScrollHelper.qml
@@ -71,6 +71,8 @@ MouseArea {
pixelDelta = wheel.pixelDelta.y
}
+ pixelDelta = Math.round(pixelDelta)
+
if (!pixelDelta) {
return flickableItem.contentY;
}
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 214f2002..9fc98419 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -67,7 +67,8 @@ MouseArea {
}
EncryptionIndicator {
- visible: model.isEncrypted
+ visible: model.isRoomEncrypted
+ encrypted: model.isEncrypted
Layout.alignment: Qt.AlignRight | Qt.AlignTop
Layout.preferredHeight: 16
width: 16
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index edb25441..ea5e6d60 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -125,6 +125,8 @@ Page {
visible: timelineManager.timeline != null
+ cacheBuffer: 500
+
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index c7e6d127..62d9de60 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -6,10 +6,11 @@ Item {
property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width < 1 ? parent.width : model.data.width)
property double tempHeight: tempWidth * model.data.proportionalHeight
- property bool tooHigh: tempHeight > timelineRoot.height / 2
+ property double divisor: model.isReply ? 4 : 2
+ property bool tooHigh: tempHeight > timelineRoot.height / divisor
- height: tooHigh ? timelineRoot.height / 2 : tempHeight
- width: tooHigh ? (timelineRoot.height / 2) / model.data.proportionalHeight : tempWidth
+ height: tooHigh ? timelineRoot.height / divisor : tempHeight
+ width: tooHigh ? (timelineRoot.height / divisor) / model.data.proportionalHeight : tempWidth
Image {
id: blurhash
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index ff103459..17fe7360 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -6,9 +6,11 @@ Item {
Item {
id: model
property var data;
+ property bool isReply: false
}
property alias modelData: model.data
+ property alias isReply: model.isReply
height: chooser.childrenRect.height
property real implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : width
diff --git a/resources/qml/delegates/NoticeMessage.qml b/resources/qml/delegates/NoticeMessage.qml
index 62ada6d1..be348329 100644
--- a/resources/qml/delegates/NoticeMessage.qml
+++ b/resources/qml/delegates/NoticeMessage.qml
@@ -1,4 +1,6 @@
TextMessage {
font.italic: true
color: colors.buttonText
+ height: isReply ? Math.min(chat.height / 8, implicitHeight) : undefined
+ clip: true
}
diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 20177a04..bab524eb 100644
--- a/resources/qml/delegates/PlayableMediaMessage.qml
+++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -20,8 +20,14 @@ Rectangle {
Rectangle {
id: videoContainer
visible: model.data.type == MtxEvent.VideoMessage
- width: Math.min(parent.width, model.data.width ? model.data.width : 400) // some media has 0 as size...
- height: width*model.data.proportionalHeight
+ property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width < 1 ? 400 : model.data.width)
+ property double tempHeight: tempWidth * model.data.proportionalHeight
+
+ property double divisor: model.isReply ? 4 : 2
+ property bool tooHigh: tempHeight > timelineRoot.height / divisor
+
+ height: tooHigh ? timelineRoot.height / divisor : tempHeight
+ width: tooHigh ? (timelineRoot.height / divisor) / model.data.proportionalHeight : tempWidth
Image {
anchors.fill: parent
source: model.data.thumbnailUrl.replace("mxc://", "image://MxcImage/")
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index 90013de9..f9fd3f11 100644
--- a/resources/qml/delegates/Reply.qml
+++ b/resources/qml/delegates/Reply.qml
@@ -51,6 +51,7 @@ Item {
MessageDelegate {
id: reply
width: parent.width
+ isReply: true
}
}
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index 7e4b1f29..bef4f76d 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -4,4 +4,6 @@ MatrixText {
property string formatted: model.data.formattedBody
text: "" + formatted.replace("
", "
")
width: parent ? parent.width : undefined
+ height: isReply ? Math.min(chat.height / 8, implicitHeight) : undefined
+ clip: true
}
diff --git a/resources/res.qrc b/resources/res.qrc
index 008ff551..439ed97b 100644
--- a/resources/res.qrc
+++ b/resources/res.qrc
@@ -14,6 +14,8 @@
icons/ui/double-tick-indicator@2x.pngicons/ui/lock.pngicons/ui/lock@2x.png
+ icons/ui/unlock.png
+ icons/ui/unlock@2x.pngicons/ui/clock.pngicons/ui/clock@2x.pngicons/ui/checkmark.png
diff --git a/src/Cache.cpp b/src/Cache.cpp
index 8cfc4b55..3a388bb9 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -1338,7 +1338,7 @@ Cache::getLastMessageInfo(lmdb::txn &txn, const std::string &room_id)
auto time = QDateTime::fromMSecsSinceEpoch(ts);
fallbackDesc = DescInfo{QString::fromStdString(obj["event"]["event_id"]),
local_user,
- tr("You joined this room"),
+ tr("You joined this room."),
utils::descriptiveTime(time),
ts,
time};
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index 19339e59..bfefd7bb 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -666,7 +666,7 @@ ChatPage::bootstrap(QString userid, QString homeserver, QString token)
"This can have different reasons. Please open an "
"issue and try to use an older version in the mean "
"time. Alternatively you can try deleting the cache "
- "manually"));
+ "manually."));
QCoreApplication::quit();
}
loadStateFromCache();
@@ -994,8 +994,12 @@ ChatPage::trySync()
const auto err_code = mtx::errors::to_string(err->matrix_error.errcode);
const int status_code = static_cast(err->status_code);
- if (http::is_logged_in() && err->matrix_error.errcode ==
- mtx::errors::ErrorCode::M_UNKNOWN_TOKEN) {
+ if ((http::is_logged_in() &&
+ (err->matrix_error.errcode ==
+ mtx::errors::ErrorCode::M_UNKNOWN_TOKEN ||
+ err->matrix_error.errcode ==
+ mtx::errors::ErrorCode::M_MISSING_TOKEN)) ||
+ !http::is_logged_in()) {
emit dropToLoginPageCb(msg);
return;
}
@@ -1086,7 +1090,7 @@ ChatPage::createRoom(const mtx::requests::CreateRoom &req)
}
emit showNotification(
- tr("Room %1 created").arg(QString::fromStdString(res.room_id.to_string())));
+ tr("Room %1 created.").arg(QString::fromStdString(res.room_id.to_string())));
});
}
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp
index 20fb3888..bb329699 100644
--- a/src/LoginPage.cpp
+++ b/src/LoginPage.cpp
@@ -15,28 +15,35 @@
* along with this program. If not, see .
*/
+#include
#include
#include
#include
+#include
#include
#include "Config.h"
#include "Logging.h"
#include "LoginPage.h"
#include "MatrixClient.h"
+#include "SSOHandler.h"
#include "ui/FlatButton.h"
#include "ui/LoadingIndicator.h"
#include "ui/OverlayModal.h"
#include "ui/RaisedButton.h"
#include "ui/TextField.h"
+Q_DECLARE_METATYPE(LoginPage::LoginMethod)
+
using namespace mtx::identifiers;
LoginPage::LoginPage(QWidget *parent)
: QWidget(parent)
, inferredServerAddress_()
{
+ qRegisterMetaType("LoginPage::LoginMethod");
+
top_layout_ = new QVBoxLayout();
top_bar_layout_ = new QHBoxLayout();
@@ -81,6 +88,14 @@ LoginPage::LoginPage(QWidget *parent)
matrixid_input_ = new TextField(this);
matrixid_input_->setLabel(tr("Matrix ID"));
matrixid_input_->setPlaceholderText(tr("e.g @joe:matrix.org"));
+ matrixid_input_->setToolTip(
+ tr("Your login name. A mxid should start with @ followed by the user id. After the user "
+ "id you need to include your server name after a :.\nYou can also put your homeserver "
+ "address there, if your server doesn't support .well-known lookup.\nExample: "
+ "@user:server.my\nIf Nheko fails to discover your homeserver, it will show you a "
+ "field to enter the server manually."));
+ matrixid_input_->setValidator(
+ new QRegularExpressionValidator(QRegularExpression("@.+?:.{3,}"), this));
spinner_ = new LoadingIndicator(this);
spinner_->setFixedHeight(40);
@@ -97,13 +112,19 @@ LoginPage::LoginPage(QWidget *parent)
password_input_ = new TextField(this);
password_input_->setLabel(tr("Password"));
password_input_->setEchoMode(QLineEdit::Password);
+ password_input_->setToolTip("Your password.");
deviceName_ = new TextField(this);
deviceName_->setLabel(tr("Device name"));
+ deviceName_->setToolTip(
+ tr("A name for this device, which will be shown to others, when verifying your devices. "
+ "If none is provided, a random string is used for privacy purposes."));
serverInput_ = new TextField(this);
serverInput_->setLabel("Homeserver address");
serverInput_->setPlaceholderText("matrix.org");
+ serverInput_->setToolTip(tr("The address that can be used to contact you homeservers "
+ "client API.\nExample: https://server.my:8787"));
serverInput_->hide();
serverLayout_ = new QHBoxLayout();
@@ -212,7 +233,8 @@ LoginPage::onMatrixIdEntered()
emit versionErrorCb(tr("Autodiscovery failed. Unknown error when "
"requesting .well-known."));
nhlog::net()->error("Autodiscovery failed. Unknown error when "
- "requesting .well-known.");
+ "requesting .well-known. {}",
+ err->error_code.message());
return;
}
@@ -249,7 +271,16 @@ LoginPage::checkHomeserverVersion()
return;
}
- emit versionOkCb();
+ http::client()->get_login(
+ [this](mtx::responses::LoginFlows flows, mtx::http::RequestErr err) {
+ if (err || flows.flows.empty())
+ emit versionOkCb(LoginMethod::Password);
+
+ if (flows.flows[0].type == mtx::user_interactive::auth_types::sso)
+ emit versionOkCb(LoginMethod::SSO);
+ else
+ emit versionOkCb(LoginMethod::Password);
+ });
});
}
@@ -280,12 +311,22 @@ LoginPage::versionError(const QString &error)
}
void
-LoginPage::versionOk()
+LoginPage::versionOk(LoginMethod loginMethod_)
{
+ this->loginMethod = loginMethod_;
+
serverLayout_->removeWidget(spinner_);
matrixidLayout_->removeWidget(spinner_);
spinner_->stop();
+ if (loginMethod == LoginMethod::SSO) {
+ password_input_->hide();
+ login_button_->setText(tr("SSO LOGIN"));
+ } else {
+ password_input_->show();
+ login_button_->setText(tr("LOGIN"));
+ }
+
if (serverInput_->isVisible())
serverInput_->hide();
}
@@ -303,29 +344,68 @@ LoginPage::onLoginButtonClicked()
return loginError("You have entered an invalid Matrix ID e.g @joe:matrix.org");
}
- if (password_input_->text().isEmpty())
- return loginError(tr("Empty password"));
+ if (loginMethod == LoginMethod::Password) {
+ if (password_input_->text().isEmpty())
+ return loginError(tr("Empty password"));
- http::client()->login(
- user.localpart(),
- password_input_->text().toStdString(),
- deviceName_->text().trimmed().isEmpty() ? initialDeviceName()
- : deviceName_->text().toStdString(),
- [this](const mtx::responses::Login &res, mtx::http::RequestErr err) {
- if (err) {
- emit loginError(QString::fromStdString(err->matrix_error.error));
- emit errorOccurred();
- return;
- }
+ http::client()->login(
+ user.localpart(),
+ password_input_->text().toStdString(),
+ deviceName_->text().trimmed().isEmpty() ? initialDeviceName()
+ : deviceName_->text().toStdString(),
+ [this](const mtx::responses::Login &res, mtx::http::RequestErr err) {
+ if (err) {
+ emit loginError(QString::fromStdString(err->matrix_error.error));
+ emit errorOccurred();
+ return;
+ }
- if (res.well_known) {
- http::client()->set_server(res.well_known->homeserver.base_url);
- nhlog::net()->info("Login requested to user server: " +
- res.well_known->homeserver.base_url);
- }
+ if (res.well_known) {
+ http::client()->set_server(res.well_known->homeserver.base_url);
+ nhlog::net()->info("Login requested to user server: " +
+ res.well_known->homeserver.base_url);
+ }
- emit loginOk(res);
- });
+ emit loginOk(res);
+ });
+ } else {
+ auto sso = new SSOHandler();
+ connect(sso, &SSOHandler::ssoSuccess, this, [this, sso](std::string token) {
+ mtx::requests::Login req{};
+ req.token = token;
+ req.type = mtx::user_interactive::auth_types::token;
+ req.device_id = deviceName_->text().trimmed().isEmpty()
+ ? initialDeviceName()
+ : deviceName_->text().toStdString();
+ http::client()->login(
+ req, [this](const mtx::responses::Login &res, mtx::http::RequestErr err) {
+ if (err) {
+ emit loginError(
+ QString::fromStdString(err->matrix_error.error));
+ emit errorOccurred();
+ return;
+ }
+
+ if (res.well_known) {
+ http::client()->set_server(
+ res.well_known->homeserver.base_url);
+ nhlog::net()->info("Login requested to user server: " +
+ res.well_known->homeserver.base_url);
+ }
+
+ emit loginOk(res);
+ });
+ sso->deleteLater();
+ });
+ connect(sso, &SSOHandler::ssoFailed, this, [this, sso]() {
+ emit loginError(tr("SSO login failed"));
+ emit errorOccurred();
+ sso->deleteLater();
+ });
+
+ QDesktopServices::openUrl(
+ QString::fromStdString(http::client()->login_sso_redirect(sso->url())));
+ }
emit loggingIn();
}
@@ -335,6 +415,7 @@ LoginPage::reset()
{
matrixid_input_->clear();
password_input_->clear();
+ password_input_->show();
serverInput_->clear();
spinner_->stop();
diff --git a/src/LoginPage.h b/src/LoginPage.h
index 4b84abfc..8a402aea 100644
--- a/src/LoginPage.h
+++ b/src/LoginPage.h
@@ -38,6 +38,12 @@ class LoginPage : public QWidget
Q_OBJECT
public:
+ enum class LoginMethod
+ {
+ Password,
+ SSO,
+ };
+
LoginPage(QWidget *parent = nullptr);
void reset();
@@ -50,7 +56,7 @@ signals:
//! Used to trigger the corresponding slot outside of the main thread.
void versionErrorCb(const QString &err);
void loginErrorCb(const QString &err);
- void versionOkCb();
+ void versionOkCb(LoginPage::LoginMethod method);
void loginOk(const mtx::responses::Login &res);
@@ -77,7 +83,7 @@ private slots:
// Callback for errors produced during server probing
void versionError(const QString &error_message);
// Callback for successful server probing
- void versionOk();
+ void versionOk(LoginPage::LoginMethod method);
private:
bool isMatrixIdValid();
@@ -123,4 +129,5 @@ private:
TextField *password_input_;
TextField *deviceName_;
TextField *serverInput_;
+ LoginMethod loginMethod = LoginMethod::Password;
};
diff --git a/src/RegisterPage.cpp b/src/RegisterPage.cpp
index 2833381d..03e9ab34 100644
--- a/src/RegisterPage.cpp
+++ b/src/RegisterPage.cpp
@@ -85,17 +85,26 @@ RegisterPage::RegisterPage(QWidget *parent)
username_input_ = new TextField();
username_input_->setLabel(tr("Username"));
+ username_input_->setValidator(
+ new QRegularExpressionValidator(QRegularExpression("[a-z0-9._=/-]+"), this));
+ username_input_->setToolTip(tr("The username must not be empty, and must contain only the "
+ "characters a-z, 0-9, ., _, =, -, and /."));
password_input_ = new TextField();
password_input_->setLabel(tr("Password"));
password_input_->setEchoMode(QLineEdit::Password);
+ password_input_->setToolTip(tr("Please choose a secure password. The exact requirements "
+ "for password strength may depend on your server."));
password_confirmation_ = new TextField();
password_confirmation_->setLabel(tr("Password confirmation"));
password_confirmation_->setEchoMode(QLineEdit::Password);
server_input_ = new TextField();
- server_input_->setLabel(tr("Home Server"));
+ server_input_->setLabel(tr("Homeserver"));
+ server_input_->setToolTip(
+ tr("A server that allows registration. Since matrix is decentralized, you need to first "
+ "find a server you can register on or host your own."));
form_layout_->addWidget(username_input_, Qt::AlignHCenter, nullptr);
form_layout_->addWidget(password_input_, Qt::AlignHCenter, nullptr);
diff --git a/src/SSOHandler.cpp b/src/SSOHandler.cpp
new file mode 100644
index 00000000..cacbbaa9
--- /dev/null
+++ b/src/SSOHandler.cpp
@@ -0,0 +1,53 @@
+#include "SSOHandler.h"
+
+#include
+
+#include
+
+#include "Logging.h"
+
+SSOHandler::SSOHandler(QObject *)
+{
+ QTimer::singleShot(120000, this, &SSOHandler::ssoFailed);
+
+ using namespace httplib;
+
+ svr.set_logger([](const Request &req, const Response &res) {
+ nhlog::net()->info("req: {}, res: {}", req.path, res.status);
+ });
+
+ svr.Get("/sso", [this](const Request &req, Response &res) {
+ if (req.has_param("loginToken")) {
+ auto val = req.get_param_value("loginToken");
+ res.set_content("SSO success", "text/plain");
+ emit ssoSuccess(val);
+ } else {
+ res.set_content("Missing loginToken for SSO login!", "text/plain");
+ emit ssoFailed();
+ }
+ });
+
+ std::thread t([this]() {
+ this->port = svr.bind_to_any_port("localhost");
+ svr.listen_after_bind();
+ });
+ t.detach();
+
+ while (!svr.is_running()) {
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
+ }
+}
+
+SSOHandler::~SSOHandler()
+{
+ svr.stop();
+ while (svr.is_running()) {
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
+ }
+}
+
+std::string
+SSOHandler::url() const
+{
+ return "http://localhost:" + std::to_string(port) + "/sso";
+}
diff --git a/src/SSOHandler.h b/src/SSOHandler.h
new file mode 100644
index 00000000..325b7a58
--- /dev/null
+++ b/src/SSOHandler.h
@@ -0,0 +1,24 @@
+#include "httplib.h"
+
+#include
+#include
+
+class SSOHandler : public QObject
+{
+ Q_OBJECT
+
+public:
+ SSOHandler(QObject *parent = nullptr);
+
+ ~SSOHandler();
+
+ std::string url() const;
+
+signals:
+ void ssoSuccess(std::string token);
+ void ssoFailed();
+
+private:
+ httplib::Server svr;
+ int port = 0;
+};
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 4068148b..f8334d9b 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -224,6 +224,7 @@ TimelineModel::roleNames() const
{Id, "id"},
{State, "state"},
{IsEncrypted, "isEncrypted"},
+ {IsRoomEncrypted, "isRoomEncrypted"},
{ReplyTo, "replyTo"},
{Reactions, "reactions"},
{RoomId, "roomId"},
@@ -294,6 +295,10 @@ TimelineModel::data(const QString &id, int role) const
if (isReply)
formattedBody_ = formattedBody_.remove(replyFallback);
}
+
+ formattedBody_.replace(">(events[id]);
}
+ case IsRoomEncrypted: {
+ return cache::isRoomEncrypted(room_id_.toStdString());
+ }
case ReplyTo:
return QVariant(QString::fromStdString(in_reply_to_event(event)));
case Reactions:
@@ -383,6 +391,7 @@ TimelineModel::data(const QString &id, int role) const
m.insert(names[Id], data(id, static_cast(Id)));
m.insert(names[State], data(id, static_cast(State)));
m.insert(names[IsEncrypted], data(id, static_cast(IsEncrypted)));
+ m.insert(names[IsRoomEncrypted], data(id, static_cast(IsRoomEncrypted)));
m.insert(names[ReplyTo], data(id, static_cast(ReplyTo)));
m.insert(names[RoomName], data(id, static_cast(RoomName)));
m.insert(names[RoomTopic], data(id, static_cast(RoomTopic)));
@@ -566,7 +575,7 @@ TimelineModel::updateLastMessage()
room_id_,
DescInfo{QString::fromStdString(mtx::accessors::event_id(event)),
QString::fromStdString(http::client()->user_id().to_string()),
- tr("You joined this room"),
+ tr("You joined this room."),
utils::descriptiveTime(time),
ts,
time});
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 65f6b38c..ea7eaffd 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -159,6 +159,7 @@ public:
Id,
State,
IsEncrypted,
+ IsRoomEncrypted,
ReplyTo,
Reactions,
RoomId,
diff --git a/src/ui/TextField.cpp b/src/ui/TextField.cpp
index 4bb7596a..27584693 100644
--- a/src/ui/TextField.cpp
+++ b/src/ui/TextField.cpp
@@ -147,7 +147,10 @@ QColor
TextField::underlineColor() const
{
if (!underline_color_.isValid()) {
- return QPalette().color(QPalette::Highlight);
+ if (hasAcceptableInput() || !isModified())
+ return QPalette().color(QPalette::Highlight);
+ else
+ return Qt::red;
}
return underline_color_;
diff --git a/third_party/cpp-httplib-0.5.12/httplib.h b/third_party/cpp-httplib-0.5.12/httplib.h
new file mode 100644
index 00000000..7816df8b
--- /dev/null
+++ b/third_party/cpp-httplib-0.5.12/httplib.h
@@ -0,0 +1,5125 @@
+//
+// httplib.h
+//
+// Copyright (c) 2020 Yuji Hirose. All rights reserved.
+// MIT License
+//
+
+#ifndef CPPHTTPLIB_HTTPLIB_H
+#define CPPHTTPLIB_HTTPLIB_H
+
+/*
+ * Configuration
+ */
+
+#ifndef CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND
+#define CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND 5
+#endif
+
+#ifndef CPPHTTPLIB_KEEPALIVE_TIMEOUT_USECOND
+#define CPPHTTPLIB_KEEPALIVE_TIMEOUT_USECOND 0
+#endif
+
+#ifndef CPPHTTPLIB_KEEPALIVE_MAX_COUNT
+#define CPPHTTPLIB_KEEPALIVE_MAX_COUNT 5
+#endif
+
+#ifndef CPPHTTPLIB_READ_TIMEOUT_SECOND
+#define CPPHTTPLIB_READ_TIMEOUT_SECOND 5
+#endif
+
+#ifndef CPPHTTPLIB_READ_TIMEOUT_USECOND
+#define CPPHTTPLIB_READ_TIMEOUT_USECOND 0
+#endif
+
+#ifndef CPPHTTPLIB_REQUEST_URI_MAX_LENGTH
+#define CPPHTTPLIB_REQUEST_URI_MAX_LENGTH 8192
+#endif
+
+#ifndef CPPHTTPLIB_REDIRECT_MAX_COUNT
+#define CPPHTTPLIB_REDIRECT_MAX_COUNT 20
+#endif
+
+#ifndef CPPHTTPLIB_PAYLOAD_MAX_LENGTH
+#define CPPHTTPLIB_PAYLOAD_MAX_LENGTH ((std::numeric_limits::max)())
+#endif
+
+#ifndef CPPHTTPLIB_RECV_BUFSIZ
+#define CPPHTTPLIB_RECV_BUFSIZ size_t(4096u)
+#endif
+
+#ifndef CPPHTTPLIB_THREAD_POOL_COUNT
+#define CPPHTTPLIB_THREAD_POOL_COUNT \
+ ((std::max)(8u, std::thread::hardware_concurrency() - 1))
+#endif
+
+/*
+ * Headers
+ */
+
+#ifdef _WIN32
+#ifndef _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#endif //_CRT_SECURE_NO_WARNINGS
+
+#ifndef _CRT_NONSTDC_NO_DEPRECATE
+#define _CRT_NONSTDC_NO_DEPRECATE
+#endif //_CRT_NONSTDC_NO_DEPRECATE
+
+#if defined(_MSC_VER)
+#ifdef _WIN64
+using ssize_t = __int64;
+#else
+using ssize_t = int;
+#endif
+
+#if _MSC_VER < 1900
+#define snprintf _snprintf_s
+#endif
+#endif // _MSC_VER
+
+#ifndef S_ISREG
+#define S_ISREG(m) (((m)&S_IFREG) == S_IFREG)
+#endif // S_ISREG
+
+#ifndef S_ISDIR
+#define S_ISDIR(m) (((m)&S_IFDIR) == S_IFDIR)
+#endif // S_ISDIR
+
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif // NOMINMAX
+
+#include
+#include
+#include
+
+#ifndef WSA_FLAG_NO_HANDLE_INHERIT
+#define WSA_FLAG_NO_HANDLE_INHERIT 0x80
+#endif
+
+#ifdef _MSC_VER
+#pragma comment(lib, "ws2_32.lib")
+#endif
+
+#ifndef strcasecmp
+#define strcasecmp _stricmp
+#endif // strcasecmp
+
+using socket_t = SOCKET;
+#ifdef CPPHTTPLIB_USE_POLL
+#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout)
+#endif
+
+#else // not _WIN32
+
+#include
+#include
+#include
+#include
+#include
+#ifdef CPPHTTPLIB_USE_POLL
+#include
+#endif
+#include
+#include
+#include
+#include
+#include
+
+using socket_t = int;
+#define INVALID_SOCKET (-1)
+#endif //_WIN32
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include