summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--resources/langs/nheko_eo.ts64
-rw-r--r--resources/langs/nheko_et.ts6
-rw-r--r--resources/langs/nheko_fi.ts34
-rw-r--r--resources/qml/EncryptionIndicator.qml4
-rw-r--r--resources/qml/RoomList.qml2
-rw-r--r--resources/qml/TimelineRow.qml18
-rw-r--r--resources/qml/TopBar.qml43
-rw-r--r--resources/qml/delegates/Pill.qml2
-rw-r--r--resources/qml/dialogs/RoomSettings.qml10
-rw-r--r--resources/qml/dialogs/UserProfile.qml4
-rw-r--r--src/LoginPage.cpp2
-rw-r--r--src/MainWindow.cpp4
-rw-r--r--src/encryption/Olm.cpp9
13 files changed, 116 insertions, 86 deletions
diff --git a/resources/langs/nheko_eo.ts b/resources/langs/nheko_eo.ts

index 9450af33..f99d38e0 100644 --- a/resources/langs/nheko_eo.ts +++ b/resources/langs/nheko_eo.ts
@@ -1472,7 +1472,7 @@ Ekzemplo: https://servilo.mia:8787</translation> <message> <location line="+11"/> <source>Choose custom homeserver</source> - <translation>Elekti propran hejmservilon</translation> + <translation type="unfinished">Elekti propran hejmservilon</translation> </message> </context> <context> @@ -1560,13 +1560,13 @@ Ekzemplo: https://servilo.mia:8787</translation> <location line="+3"/> <source>Unverified login</source> <extracomment>The user just signed in with this device and hasn&apos;t verified their master key.</extracomment> - <translation type="unfinished"></translation> + <translation>Nekontrolita saluto</translation> </message> <message> <location line="+3"/> <source>Please verify your other devices</source> <extracomment>There are unverified devices signed in to this account.</extracomment> - <translation type="unfinished"></translation> + <translation>Bonvolu kontroli aliajn viajn aparatojn</translation> </message> <message> <location line="+20"/> @@ -1809,27 +1809,27 @@ Ekzemplo: https://servilo.mia:8787</translation> <message> <location filename="../qml/Root.qml" line="+255"/> <source>Please enter your login password to continue:</source> - <translation type="unfinished"></translation> + <translation>Bonvolu enigi vian pasvorton por daŭrigi:</translation> </message> <message> <location line="+10"/> <source>Please enter a valid email address to continue:</source> - <translation type="unfinished"></translation> + <translation>Bonvolu enigi validan retpoŝtadreson por daŭrigi:</translation> </message> <message> <location line="+10"/> <source>Please enter a valid phone number to continue:</source> - <translation type="unfinished"></translation> + <translation>Bonvolu enigi validan telefonnumeron por daŭrigi:</translation> </message> <message> <location line="+10"/> <source>Please enter the token, which has been sent to you:</source> - <translation type="unfinished"></translation> + <translation>Bonvolu enigi la pecon, kiu sendiĝis al vi:</translation> </message> <message> <location line="+16"/> <source>Wait for the confirmation link to arrive, then continue.</source> - <translation type="unfinished"></translation> + <translation>Atendu venon de la konfirma ligilo, kaj poste daŭrigu.</translation> </message> </context> <context> @@ -1904,49 +1904,51 @@ Ekzemplo: https://servilo.mia:8787</translation> <message> <location filename="../qml/SelfVerificationCheck.qml" line="+39"/> <source>This is your recovery key. You will need it to restore access to your encrypted messages and verification keys. Keep this safe. Don&apos;t share it with anyone and don&apos;t lose it! Do not pass go! Do not collect $200!</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Jen via rehava ŝlosilo. Vi bezonos ĝin por rehavi aliron al viaj ĉifritaj mesaĝoj kaj kontrolaj ŝlosiloj. Tenu ĝin sekura. Ne havigu ĝin al iu ajn, kaj ne perdu ĝin!</translation> </message> <message> <location line="+33"/> <source>Encryption setup successfully</source> - <translation type="unfinished"></translation> + <translation>Ĉifrado agordiĝis sukcese</translation> </message> <message> <location line="+9"/> <source>Failed to setup encryption: %1</source> - <translation type="unfinished"></translation> + <translation>Malsukcesis agordi ĉifradon: %1</translation> </message> <message> <location line="+22"/> <source>Setup Encryption</source> - <translation type="unfinished"></translation> + <translation>Agordi ĉifradon</translation> </message> <message> <location line="+10"/> <source>Hello and welcome to Matrix! It seems like you are new. Before you can securely encrypt your messages, we need to setup a few small things. You can either press accept immediately or adjust a few basic options. We also try to explain a few of the basics. You can skip those parts, but they might prove to be helpful!</source> - <translation type="unfinished"></translation> + <translation>Saluton kaj bonvelu al Matrikso! +Ŝajnas, ke vi novas. Antaŭ ol vi povos sekure ĉifri viajn mesaĝojn, ni bezonas agordi kelkajn aferojn. Vi povas tuj premi la butonon akcepti, aŭ unue agordi kelkajn elektojn. Ni ankaŭ provas komprenigi al vi kelkajn bazajn principojn. Vi povas preterpasi la komprenigon, sed ĝi povus esti utila!</translation> </message> <message> <location line="+124"/> <source>Activate Encryption</source> - <translation type="unfinished"></translation> + <translation>Ŝalti ĉifradon</translation> </message> <message> <location line="+10"/> <source>It seems like you have encryption already configured for this account. To be able to access your encrypted messages and make this device appear as trusted, you can either verify an existing device or (if you have one) enter your recovery passphrase. Please select one of the options below. If you choose verify, you need to have the other device available. If you choose &quot;enter passphrase&quot;, you will need your recovery key or passphrase. If you click cancel, you can choose to verify yourself at a later point.</source> - <translation type="unfinished"></translation> + <translation>Ŝajnas, ke ĉifrado ne jam estas ŝaltita por ĉi tiu konto. Por ke vi povu aliri viajn ĉifritajn mesaĝojn kaj aperigi la aparaton fidata, vi povas aŭ kontroli per jama aparato (se vi havas tian), aŭ enigi vian rehavan pasfrazon. Bonvolu elekti unu elekteblon sube. +Se vi elektos kontrolon, vi devos havi alian aparaton disponeblan. Se vi elektos enigon de pasfrazo, vi bezonos viajn rehavajn ŝlosilon aŭ pasfrazon. Se vi nuligos, vi ankoraŭ povos komenci la kontrolon pli poste.</translation> </message> <message> <location line="+7"/> <source>verify</source> - <translation type="unfinished"></translation> + <translation>kontroli</translation> </message> <message> <location line="+10"/> <source>enter passphrase</source> - <translation type="unfinished"></translation> + <translation>enigi pasfrazon</translation> </message> </context> <context> @@ -1954,27 +1956,27 @@ If you choose verify, you need to have the other device available. If you choose <message> <location filename="../../src/encryption/SelfVerificationStatus.cpp" line="+42"/> <source>Failed to create keys for cross-signing!</source> - <translation type="unfinished"></translation> + <translation>Malsukcesis krei delege subskribajn ŝlosilojn!</translation> </message> <message> <location line="+16"/> <source>Failed to create keys for online key backup!</source> - <translation type="unfinished"></translation> + <translation>Malsukcesis krei ŝlosilojn por enreta savkopiado de ŝlosiloj!</translation> </message> <message> <location line="+29"/> <source>Failed to create keys for secure server side secret storage!</source> - <translation type="unfinished"></translation> + <translation>Malsukcesis krei ŝlosilojn por sekura servilflanka sekreta deponejo!</translation> </message> <message> <location line="+44"/> <source>Encryption Setup</source> - <translation type="unfinished"></translation> + <translation>Starigo de ĉifrado</translation> </message> <message> <location line="+6"/> <source>Encryption setup failed: %1</source> - <translation type="unfinished"></translation> + <translation>Starigo de ĉifrado malsukcesis: %1</translation> </message> <message> <location line="+140"/> @@ -2324,7 +2326,7 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+2"/> <source>This room contains verified devices and devices which have never changed their master key.</source> - <translation type="unfinished"></translation> + <translation>Ĉi tiu ĉambro enhavas kontrolitajn aparatojn kaj aparatojn, kiuj neniam ŝanĝis sian ĉefan ŝlosilon.</translation> </message> <message> <location line="+2"/> @@ -2382,7 +2384,7 @@ If you choose verify, you need to have the other device available. If you choose <location line="+24"/> <location line="+17"/> <source>Registration aborted</source> - <translation type="unfinished"></translation> + <translation>Registriĝo nuliĝis</translation> </message> <message> <location line="-27"/> @@ -2392,7 +2394,7 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+165"/> <source>Invalid token</source> - <translation type="unfinished"></translation> + <translation>Nevalida peco</translation> </message> </context> <context> @@ -2466,22 +2468,22 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+9"/> <source>Refresh device list.</source> - <translation type="unfinished"></translation> + <translation>Aktualigi liston de aparatoj.</translation> </message> <message> <location line="+54"/> <source>Sign out this device.</source> - <translation type="unfinished"></translation> + <translation>Adiaŭigi ĉi tiun aparaton.</translation> </message> <message> <location line="+31"/> <source>Change device name.</source> - <translation type="unfinished"></translation> + <translation>Ŝanĝi nomon de aparato.</translation> </message> <message> <location line="+22"/> <source>Last seen %1 from %2</source> - <translation type="unfinished"></translation> + <translation>Lastafoje vidis uzanton %1 je %2</translation> </message> <message> <location line="+27"/> @@ -2491,12 +2493,12 @@ If you choose verify, you need to have the other device available. If you choose <message> <location filename="../../src/ui/UserProfile.cpp" line="+152"/> <source>Sign out device %1</source> - <translation type="unfinished"></translation> + <translation>Adiaŭigi aparaton %1</translation> </message> <message> <location line="+10"/> <source>You signed out this device.</source> - <translation type="unfinished"></translation> + <translation>Vi adiaŭigis ĉi tiun aparaton.</translation> </message> <message> <location line="+225"/> diff --git a/resources/langs/nheko_et.ts b/resources/langs/nheko_et.ts
index bf472df9..edf8bc9f 100644 --- a/resources/langs/nheko_et.ts +++ b/resources/langs/nheko_et.ts
@@ -143,12 +143,12 @@ <message> <location line="+13"/> <source>The cache on your disk is newer than this version of Nheko supports. Please update Nheko or clear your cache.</source> - <translation type="unfinished"></translation> + <translation>Sinu andmekandjale salvestatud puhvri versioon on uuem, kui käesolev Nheko versioon kasutada oskab. Palun tee Nheko uuendus või kustuta puhverdatud andmed.</translation> </message> <message> <location line="+41"/> <source>Failed to open database, logging out!</source> - <translation type="unfinished"></translation> + <translation>Andmebaasi avamine ei õnnestunud. Login välja!</translation> </message> <message> <location line="+314"/> @@ -1977,7 +1977,7 @@ Kui eelistad verifitseerimist, siis peab sul teine seade olema käepärast. Kui <message> <location line="+140"/> <source>Identity key changed. This breaks E2EE, so logging out.</source> - <translation type="unfinished"></translation> + <translation>Sinu isikutuvastuse võti on muutunud. Kuna seetõttu läheb läbiv krüptimine katki, siis login välja.</translation> </message> </context> <context> diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts
index eac9909e..26f83fe3 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts
@@ -143,7 +143,7 @@ <message> <location line="+13"/> <source>The cache on your disk is newer than this version of Nheko supports. Please update Nheko or clear your cache.</source> - <translation type="unfinished"></translation> + <translation>Levylläsi oleva välimuisti on uudempaa kuin mitä tämä Nhekon versio tukee. Päivitä tai poista välimuistisi.</translation> </message> <message> <location line="+41"/> @@ -803,12 +803,12 @@ <message> <location filename="../qml/dialogs/JoinRoomDialog.qml" line="+14"/> <source>Join room</source> - <translation type="unfinished"></translation> + <translation>Liity huoneeseen</translation> </message> <message> <location line="+22"/> <source>Room ID or alias</source> - <translation type="unfinished">Huoneen tunnus tai osoite</translation> + <translation>Huoneen tunnus tai osoite</translation> </message> </context> <context> @@ -816,12 +816,12 @@ <message> <location filename="../qml/dialogs/LeaveRoomDialog.qml" line="+15"/> <source>Leave room</source> - <translation type="unfinished">Poistu huoneesta</translation> + <translation>Poistu huoneesta</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to leave?</source> - <translation type="unfinished">Oletko varma, että haluat poistua?</translation> + <translation>Oletko varma, että haluat poistua?</translation> </message> </context> <context> @@ -943,17 +943,17 @@ Esimerkki: https://server.my:8787</translation> <message> <location filename="../qml/dialogs/LogoutDialog.qml" line="+13"/> <source>Log out</source> - <translation type="unfinished"></translation> + <translation>Kirjaudu ulos</translation> </message> <message> <location line="+1"/> <source>A call is in progress. Log out?</source> - <translation type="unfinished"></translation> + <translation>Puhelu on käynnissä. Haluatko kirjautua ulos?</translation> </message> <message> <location line="+0"/> <source>Are you sure you want to log out?</source> - <translation type="unfinished"></translation> + <translation>Haluatko varmasti kirjautua ulos?</translation> </message> </context> <context> @@ -1567,7 +1567,7 @@ Esimerkki: https://server.my:8787</translation> <message> <location line="+20"/> <source>Close</source> - <translation type="unfinished">Sulje</translation> + <translation>Sulje</translation> </message> <message> <location line="+65"/> @@ -1892,7 +1892,7 @@ Esimerkki: https://server.my:8787</translation> <message> <location line="+1"/> <source>Nheko could not connect to the secure storage to save encryption secrets to. This can have multiple reasons. Check if your D-Bus service is running and you have configured a service like KWallet, Gnome Keyring, KeePassXC or the equivalent for your platform. If you are having trouble, feel free to open an issue here: https://github.com/Nheko-Reborn/nheko/issues</source> - <translation type="unfinished"></translation> + <translation>Nheko ei pystynyt yhdistämään salattuun tallennustilaan tallentamaan salaukseen kuuluvia salaisuuksia. Tämä voi johtua useasta syystä. Tarkista, onko D-Bus-palvelu käynnissä ja oletko määrittänyt alustallesi palvelun kuten KWallet, Gnome Keyring, KeePassXC tai vastaavan. Jos sinulla on ongelmia, voit luoda vikailmoituksen täällä: https://github.com/Nheko-Reborn/nheko/issues</translation> </message> </context> <context> @@ -1937,7 +1937,7 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+7"/> <source>verify</source> - <translation type="unfinished"></translation> + <translation>vahvista</translation> </message> <message> <location line="+10"/> @@ -2264,7 +2264,7 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+137"/> <source>No preview available</source> - <translation type="unfinished">Esikatselu ei saatavilla</translation> + <translation>Esikatselu ei saatavilla</translation> </message> <message> <location line="+7"/> @@ -2317,7 +2317,7 @@ If you choose verify, you need to have the other device available. If you choose <message> <location line="+2"/> <source>This room contains verified devices and devices which have never changed their master key.</source> - <translation type="unfinished"></translation> + <translation>Tämä huone sisältää vahvistettuja laitteita ja laitteita, jotka eivät ole koskaan vaihtaneet pääavainta.</translation> </message> <message> <location line="+2"/> @@ -2375,17 +2375,17 @@ If you choose verify, you need to have the other device available. If you choose <location line="+24"/> <location line="+17"/> <source>Registration aborted</source> - <translation type="unfinished"></translation> + <translation>Rekisteröinti keskeytetty</translation> </message> <message> <location line="-27"/> <source>Please enter a valid registration token.</source> - <translation type="unfinished">Anna kelvollinen rekisteröitymispoletti.</translation> + <translation>Anna kelvollinen rekisteröitymispoletti.</translation> </message> <message> <location line="+165"/> <source>Invalid token</source> - <translation type="unfinished"></translation> + <translation>Virheellinen poletti</translation> </message> </context> <context> @@ -3033,7 +3033,7 @@ Tämä yleensä saa sovelluksen kuvakkeen liikkumaan jollain tapaa tehtäväpalk <message> <location filename="../../src/encryption/VerificationManager.cpp" line="+105"/> <source>No encrypted private chat found with this user. Create an encrypted private chat with this user and try again.</source> - <translation type="unfinished">Salattua keskustelua ei löydetty tälle käyttäjälle. Luo salattu yksityiskeskustelu tämän käyttäjän kanssa ja yritä uudestaan.</translation> + <translation>Salattua keskustelua ei löydetty tälle käyttäjälle. Luo salattu yksityiskeskustelu tämän käyttäjän kanssa ja yritä uudestaan.</translation> </message> </context> <context> diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml
index 6bc16a18..f5f4cc76 100644 --- a/resources/qml/EncryptionIndicator.qml +++ b/resources/qml/EncryptionIndicator.qml
@@ -22,10 +22,10 @@ Image { case Crypto.TOFU: return "image://colorimage/:/icons/icons/ui/lock.png?" + Nheko.colors.buttonText; default: - return "image://colorimage/:/icons/icons/ui/lock.png?#dd3d3d"; + return "image://colorimage/:/icons/icons/ui/lock.png?#d6c020"; } } else { - return "image://colorimage/:/icons/icons/ui/unlock.png?#dd3d3d"; + return "image://colorimage/:/icons/icons/ui/unlock.png?#d6c020"; } } ToolTip.visible: ma.hovered diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index db255bd3..6780a3f7 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml
@@ -480,6 +480,8 @@ Page { visible: !collapsed Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: fontMetrics.lineSpacing * 2 + Layout.preferredHeight: fontMetrics.lineSpacing * 2 image: ":/icons/icons/ui/power-button-off.png" ToolTip.visible: hovered ToolTip.text: qsTr("Logout") diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index c612479a..3a945062 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml
@@ -160,15 +160,6 @@ Item { eventId: r.eventId } - EncryptionIndicator { - visible: room.isEncrypted - encrypted: isEncrypted - trust: trustlevel - Layout.alignment: Qt.AlignRight | Qt.AlignTop - Layout.preferredHeight: 16 - Layout.preferredWidth: 16 - } - Image { visible: isEdited || eventId == chat.model.edit Layout.alignment: Qt.AlignRight | Qt.AlignTop @@ -188,6 +179,15 @@ Item { } + EncryptionIndicator { + visible: room.isEncrypted + encrypted: isEncrypted + trust: trustlevel + Layout.alignment: Qt.AlignRight | Qt.AlignTop + Layout.preferredHeight: 16 + Layout.preferredWidth: 16 + } + Label { Layout.alignment: Qt.AlignRight | Qt.AlignTop text: timestamp.toLocaleTimeString(Locale.ShortFormat) diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml
index e9f482c9..aec99f43 100644 --- a/resources/qml/TopBar.qml +++ b/resources/qml/TopBar.qml
@@ -3,8 +3,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later import Qt.labs.platform 1.1 as Platform -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick 2.15 +import QtQuick.Controls 2.15 import QtQuick.Layouts 1.2 import im.nheko 1.0 @@ -28,14 +28,27 @@ Rectangle { TapHandler { onSingleTapped: { - if (room) - TimelineManager.openRoomSettings(room.roomId); + if (room) { + let p = topBar.mapToItem(roomTopicC, eventPoint.position.x, eventPoint.position.y); + let link = roomTopicC.linkAt(p.x, p.y); + + if (link) { + Nheko.openLink(link); + } else { + TimelineManager.openRoomSettings(room.roomId); + } + } eventPoint.accepted = true; } gesturePolicy: TapHandler.ReleaseWithinBounds } + HoverHandler { + grabPermissions: PointerHandler.TakeOverForbidden | PointerHandler.CanTakeOverFromAnything + //cursorShape: Qt.PointingHandCursor + } + GridLayout { id: topLayout @@ -51,8 +64,8 @@ Rectangle { Layout.row: 0 Layout.rowSpan: 2 Layout.alignment: Qt.AlignVCenter - width: Nheko.avatarSize - height: Nheko.avatarSize + Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium + Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium visible: showBackButton image: ":/icons/icons/ui/angle-pointing-to-left.png" ToolTip.visible: hovered @@ -71,11 +84,7 @@ Rectangle { roomid: roomId userid: isDirect ? directChatOtherUserId : "" displayName: roomName - onClicked: { - if (room) - TimelineManager.openRoomSettings(roomId); - - } + enabled: false } Label { @@ -91,10 +100,13 @@ Rectangle { } MatrixText { + id: roomTopicC Layout.fillWidth: true Layout.column: 2 Layout.row: 1 Layout.maximumHeight: fontMetrics.lineSpacing * 2 // show 2 lines + selectByMouse: false + enabled: false clip: true text: roomTopic } @@ -103,6 +115,8 @@ Rectangle { Layout.column: 3 Layout.row: 0 Layout.rowSpan: 2 + Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium + Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium visible: isEncrypted encrypted: isEncrypted trust: trustlevel @@ -129,6 +143,8 @@ Rectangle { Layout.row: 0 Layout.rowSpan: 2 Layout.alignment: Qt.AlignVCenter + Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium + Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium image: ":/icons/icons/ui/vertical-ellipsis.png" ToolTip.visible: hovered ToolTip.text: qsTr("Room options") @@ -164,4 +180,9 @@ Rectangle { } + CursorShape { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + } + } diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml
index 248d91da..17c3c7d4 100644 --- a/resources/qml/delegates/Pill.qml +++ b/resources/qml/delegates/Pill.qml
@@ -7,7 +7,7 @@ import QtQuick.Controls 2.1 import im.nheko 1.0 Label { - color: Nheko.colors.brightText + color: Nheko.colors.text horizontalAlignment: Text.AlignHCenter height: contentHeight * 1.2 width: contentWidth * 1.2 diff --git a/resources/qml/dialogs/RoomSettings.qml b/resources/qml/dialogs/RoomSettings.qml
index b0f7730b..32357690 100644 --- a/resources/qml/dialogs/RoomSettings.qml +++ b/resources/qml/dialogs/RoomSettings.qml
@@ -34,8 +34,8 @@ ApplicationWindow { id: contentLayout1 anchors.fill: parent - anchors.margins: 10 - spacing: 10 + anchors.margins: Nheko.paddingMedium + spacing: Nheko.paddingMedium Avatar { url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/") @@ -156,7 +156,7 @@ ApplicationWindow { GridLayout { columns: 2 - rowSpacing: Nheko.paddingLarge + rowSpacing: Nheko.paddingMedium MatrixText { text: qsTr("SETTINGS") @@ -278,7 +278,7 @@ ApplicationWindow { MatrixText { text: roomSettings.roomId - font.pixelSize: fontMetrics.font.pixelSize * 1.2 + font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 0.8) Layout.alignment: Qt.AlignRight } @@ -288,7 +288,7 @@ ApplicationWindow { MatrixText { text: roomSettings.roomVersion - font.pixelSize: fontMetrics.font.pixelSize * 1.2 + font.pixelSize: fontMetrics.font.pixelSize Layout.alignment: Qt.AlignRight } diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index da573ec1..e32a4595 100644 --- a/resources/qml/dialogs/UserProfile.qml +++ b/resources/qml/dialogs/UserProfile.qml
@@ -309,7 +309,7 @@ ApplicationWindow { case VerificationStatus.VERIFIED: return "image://colorimage/:/icons/icons/ui/lock.png?green"; case VerificationStatus.UNVERIFIED: - return "image://colorimage/:/icons/icons/ui/unlock.png?yellow"; + return "image://colorimage/:/icons/icons/ui/unlock.png?#d6c020"; case VerificationStatus.SELF: return "image://colorimage/:/icons/icons/ui/checkmark.png?green"; default: @@ -390,7 +390,7 @@ ApplicationWindow { case VerificationStatus.VERIFIED: return "image://colorimage/:/icons/icons/ui/lock.png?green"; case VerificationStatus.UNVERIFIED: - return "image://colorimage/:/icons/icons/ui/unlock.png?yellow"; + return "image://colorimage/:/icons/icons/ui/unlock.png?#d6c020"; case VerificationStatus.SELF: return "image://colorimage/:/icons/icons/ui/checkmark.png?green"; default: diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp
index 64e9c865..7d3e7446 100644 --- a/src/LoginPage.cpp +++ b/src/LoginPage.cpp
@@ -368,6 +368,8 @@ LoginPage::versionOk(bool passwordSupported_, bool ssoSupported_) matrixidLayout_->removeWidget(spinner_); spinner_->stop(); + password_input_->setVisible(passwordSupported); + password_input_->setEnabled(passwordSupported); sso_login_button_->setVisible(ssoSupported); login_button_->setVisible(passwordSupported); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 34db0d1d..ae2e4e5d 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -247,6 +247,10 @@ MainWindow::showChatPage() login_page_->reset(); chat_page_->bootstrap(userid, homeserver, token); connect(cache::client(), + &Cache::databaseReady, + userSettingsPage_, + &UserSettingsPage::updateSecretStatus); + connect(cache::client(), &Cache::secretChanged, userSettingsPage_, &UserSettingsPage::updateSecretStatus); diff --git a/src/encryption/Olm.cpp b/src/encryption/Olm.cpp
index 01a16ba7..0931b4e3 100644 --- a/src/encryption/Olm.cpp +++ b/src/encryption/Olm.cpp
@@ -17,6 +17,7 @@ #include "Cache_p.h" #include "ChatPage.h" #include "DeviceVerificationFlow.h" +#include "EventAccessors.h" #include "Logging.h" #include "MatrixClient.h" #include "UserSettingsPage.h" @@ -1124,8 +1125,6 @@ decryptEvent(const MegolmSessionIndex &index, return {DecryptionErrorCode::DbError, e.what(), std::nullopt}; } - // TODO: Lookup index,event_id,origin_server_ts tuple for replay attack errors - std::string msg_str; try { auto session = cache::client()->getInboundMegolmSession(index); @@ -1165,12 +1164,12 @@ decryptEvent(const MegolmSessionIndex &index, body["origin_server_ts"] = event.origin_server_ts; body["unsigned"] = event.unsigned_data; - // relations are unencrypted in content... - mtx::common::add_relations(body["content"], event.content.relations); - mtx::events::collections::TimelineEvent te; mtx::events::collections::from_json(body, te); + // relations are unencrypted in content... + mtx::accessors::set_relations(te.data, std::move(event.content.relations)); + return {DecryptionErrorCode::NoError, std::nullopt, std::move(te.data)}; } catch (std::exception &e) { return {DecryptionErrorCode::ParsingFailed, e.what(), std::nullopt};