summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-08-14 07:59:39 +0000
committerGitHub <noreply@github.com>2020-08-14 07:59:39 +0000
commit3fece53eb7bc38a338ac85faa58638c251d3cda7 (patch)
tree4e8c69ff9cccf376185f3a430ef1b07c06c288f4 /resources
parentAdded translation using Weblate (Sinhala) (diff)
parentAppease the linter (diff)
downloadnheko-3fece53eb7bc38a338ac85faa58638c251d3cda7.tar.xz
Merge pull request #237 from trilene/voip
Support voice calls
Diffstat (limited to 'resources')
-rw-r--r--resources/icons/ui/end-call.pngbin0 -> 643 bytes
-rw-r--r--resources/icons/ui/microphone-mute.pngbin0 -> 1153 bytes
-rw-r--r--resources/icons/ui/microphone-unmute.pngbin0 -> 1093 bytes
-rw-r--r--resources/icons/ui/place-call.pngbin0 -> 759 bytes
-rw-r--r--resources/langs/nheko_en.ts45
-rw-r--r--resources/media/README.txt5
-rw-r--r--resources/media/callend.oggbin0 -> 13932 bytes
-rw-r--r--resources/media/ring.oggbin0 -> 66715 bytes
-rw-r--r--resources/media/ringback.oggbin0 -> 8352 bytes
-rw-r--r--resources/qml/delegates/MessageDelegate.qml18
-rw-r--r--resources/res.qrc10
11 files changed, 78 insertions, 0 deletions
diff --git a/resources/icons/ui/end-call.png b/resources/icons/ui/end-call.png
new file mode 100644

index 00000000..6cbb983e --- /dev/null +++ b/resources/icons/ui/end-call.png
Binary files differdiff --git a/resources/icons/ui/microphone-mute.png b/resources/icons/ui/microphone-mute.png new file mode 100644
index 00000000..0042fbe2 --- /dev/null +++ b/resources/icons/ui/microphone-mute.png
Binary files differdiff --git a/resources/icons/ui/microphone-unmute.png b/resources/icons/ui/microphone-unmute.png new file mode 100644
index 00000000..27999c70 --- /dev/null +++ b/resources/icons/ui/microphone-unmute.png
Binary files differdiff --git a/resources/icons/ui/place-call.png b/resources/icons/ui/place-call.png new file mode 100644
index 00000000..a820cf3f --- /dev/null +++ b/resources/icons/ui/place-call.png
Binary files differdiff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts
index db24f1fe..f2bb04f9 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts
@@ -404,6 +404,21 @@ Example: https://server.my:8787</translation> <source>%1 created and configured room: %2</source> <translation>%1 created and configured room: %2</translation> </message> + <message> + <location line="+6"/> + <source>%1 placed a %2 call.</source> + <translation>%1 placed a %2 call.</translation> + </message> + <message> + <location line="+6"/> + <source>%1 answered the call.</source> + <translation>%1 answered the call.</translation> + </message> + <message> + <location line="+6"/> + <source>%1 ended the call.</source> + <translation>%1 ended the call.</translation> + </message> </context> <context> <name>Placeholder</name> @@ -1796,6 +1811,36 @@ Media size: %2 <source>%1 sent an encrypted message</source> <translation>%1 sent an encrypted message</translation> </message> + <message> + <location line="+5"/> + <source>You placed a call</source> + <translation>You placed a call</translation> + </message> + <message> + <location line="+3"/> + <source>%1 placed a call</source> + <translation>%1 placed a call</translation> + </message> + <message> + <location line="+5"/> + <source>You answered a call</source> + <translation>You answered a call</translation> + </message> + <message> + <location line="+3"/> + <source>%1 answered a call</source> + <translation>%1 answered a call</translation> + </message> + <message> + <location line="+5"/> + <source>You ended a call</source> + <translation>You ended a call</translation> + </message> + <message> + <location line="+3"/> + <source>%1 ended a call</source> + <translation>%1 ended a call</translation> + </message> </context> <context> <name>popups::UserMentions</name> diff --git a/resources/media/README.txt b/resources/media/README.txt new file mode 100644
index 00000000..ce1e5933 --- /dev/null +++ b/resources/media/README.txt
@@ -0,0 +1,5 @@ +The below media files were obtained from https://github.com/matrix-org/matrix-react-sdk/tree/develop/res/media + +callend.ogg +ringback.ogg +ring.ogg diff --git a/resources/media/callend.ogg b/resources/media/callend.ogg new file mode 100644
index 00000000..927ce1f6 --- /dev/null +++ b/resources/media/callend.ogg
Binary files differdiff --git a/resources/media/ring.ogg b/resources/media/ring.ogg new file mode 100644
index 00000000..708213bf --- /dev/null +++ b/resources/media/ring.ogg
Binary files differdiff --git a/resources/media/ringback.ogg b/resources/media/ringback.ogg new file mode 100644
index 00000000..7dbfdcd0 --- /dev/null +++ b/resources/media/ringback.ogg
Binary files differdiff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index 17fe7360..ed18b2e5 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml
@@ -91,6 +91,24 @@ Item { } } DelegateChoice { + roleValue: MtxEvent.CallInvite + NoticeMessage { + text: qsTr("%1 placed a %2 call.").arg(model.data.userName).arg(model.data.callType) + } + } + DelegateChoice { + roleValue: MtxEvent.CallAnswer + NoticeMessage { + text: qsTr("%1 answered the call.").arg(model.data.userName) + } + } + DelegateChoice { + roleValue: MtxEvent.CallHangUp + NoticeMessage { + text: qsTr("%1 ended the call.").arg(model.data.userName) + } + } + DelegateChoice { // TODO: make a more complex formatter for the power levels. roleValue: MtxEvent.PowerLevels NoticeMessage { diff --git a/resources/res.qrc b/resources/res.qrc
index 439ed97b..b245f48f 100644 --- a/resources/res.qrc +++ b/resources/res.qrc
@@ -70,6 +70,11 @@ <file>icons/ui/mail-reply.png</file> + <file>icons/ui/place-call.png</file> + <file>icons/ui/end-call.png</file> + <file>icons/ui/microphone-mute.png</file> + <file>icons/ui/microphone-unmute.png</file> + <file>icons/emoji-categories/people.png</file> <file>icons/emoji-categories/people@2x.png</file> <file>icons/emoji-categories/nature.png</file> @@ -136,4 +141,9 @@ <file>qml/delegates/Placeholder.qml</file> <file>qml/delegates/Reply.qml</file> </qresource> + <qresource prefix="/media"> + <file>media/ring.ogg</file> + <file>media/ringback.ogg</file> + <file>media/callend.ogg</file> + </qresource> </RCC>