Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
95887c87
Commit
95887c87
authored
3 years ago
by
Loren Burkholder
Browse files
Options
Downloads
Patches
Plain Diff
Make it obvious that this is a notification and not the actual message
parent
0a3e6475
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/qml/delegates/Encrypted.qml
+53
-27
53 additions, 27 deletions
resources/qml/delegates/Encrypted.qml
with
53 additions
and
27 deletions
resources/qml/delegates/Encrypted.qml
+
53
−
27
View file @
95887c87
...
...
@@ -4,45 +4,71 @@
import
"
..
"
import
QtQuick
2.15
import
QtQuick
.
Controls
2.1
import
QtQuick
.
Controls
2.15
import
QtQuick
.
Layouts
1.15
import
im
.
nheko
1.0
Column
{
Rectangle
{
id
:
r
required
property
int
encryptionError
required
property
string
eventId
radius
:
height
/
4
width
:
parent
?
parent
.
width
:
undefined
height
:
contents
.
implicitHeight
+
Nheko
.
paddingMedium
*
2
color
:
Nheko
.
colors
.
alternateBase
MatrixText
{
text
:
{
switch
(
encryptionError
)
{
case
Olm
.
MissingSession
:
return
qsTr
(
"
There is no key to unlock this message. We requested the key automatically, but you can try requesting it again if you are impatient.
"
);
case
Olm
.
MissingSessionIndex
:
return
qsTr
(
"
This message couldn't be decrypted, because we only have a key for newer messages. You can try requesting access to this message.
"
);
case
Olm
.
DbError
:
return
qsTr
(
"
There was an internal error reading the decryption key from the database.
"
);
case
Olm
.
DecryptionFailed
:
return
qsTr
(
"
There was an error decrypting this message.
"
);
case
Olm
.
ParsingFailed
:
return
qsTr
(
"
The message couldn't be parsed.
"
);
case
Olm
.
ReplayAttack
:
return
qsTr
(
"
The encryption key was reused! Someone is possibly trying to insert false messages into this chat!
"
);
default
:
return
qsTr
(
"
Unknown decryption error
"
);
RowLayout
{
id
:
contents
anchors.fill
:
parent
anchors.margins
:
Nheko
.
paddingMedium
spacing
:
Nheko
.
paddingMedium
Image
{
source
:
"
image://colorimage/:/icons/icons/ui/shield-filled-cross.svg?
"
+
Nheko
.
theme
.
error
Layout.alignment
:
Qt
.
AlignVCenter
width
:
24
height
:
width
}
Column
{
spacing
:
Nheko
.
paddingSmall
Layout.fillWidth
:
true
MatrixText
{
text
:
{
switch
(
encryptionError
)
{
case
Olm
.
MissingSession
:
return
qsTr
(
"
There is no key to unlock this message. We requested the key automatically, but you can try requesting it again if you are impatient.
"
);
case
Olm
.
MissingSessionIndex
:
return
qsTr
(
"
This message couldn't be decrypted, because we only have a key for newer messages. You can try requesting access to this message.
"
);
case
Olm
.
DbError
:
return
qsTr
(
"
There was an internal error reading the decryption key from the database.
"
);
case
Olm
.
DecryptionFailed
:
return
qsTr
(
"
There was an error decrypting this message.
"
);
case
Olm
.
ParsingFailed
:
return
qsTr
(
"
The message couldn't be parsed.
"
);
case
Olm
.
ReplayAttack
:
return
qsTr
(
"
The encryption key was reused! Someone is possibly trying to insert false messages into this chat!
"
);
default
:
return
qsTr
(
"
Unknown decryption error
"
);
}
}
color
:
Nheko
.
colors
.
buttonText
width
:
parent
?
parent
.
width
:
undefined
}
Button
{
palette
:
Nheko
.
colors
visible
:
encryptionError
==
Olm
.
MissingSession
||
encryptionError
==
Olm
.
MissingSessionIndex
text
:
qsTr
(
"
Request key
"
)
onClicked
:
room
.
requestKeyForEvent
(
eventId
)
}
}
color
:
Nheko
.
colors
.
buttonText
width
:
r
?
r
.
width
:
undefined
}
Button
{
palette
:
Nheko
.
colors
visible
:
encryptionError
==
Olm
.
MissingSession
||
encryptionError
==
Olm
.
MissingSessionIndex
text
:
qsTr
(
"
Request key
"
)
onClicked
:
room
.
requestKeyForEvent
(
eventId
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment