Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Robert Maerkisch
kaidan
Commits
42460ae8
Verified
Commit
42460ae8
authored
Aug 30, 2018
by
Jonah Brüchert
🌳
Committed by
Linus Jahn
Aug 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature to copy an invitation URL
parent
e6eee8cb
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
113 additions
and
13 deletions
+113
-13
i18n/base.ts
i18n/base.ts
+8
-0
i18n/de.ts
i18n/de.ts
+8
-0
i18n/es.ts
i18n/es.ts
+8
-0
i18n/fr.ts
i18n/fr.ts
+8
-0
i18n/ja.ts
i18n/ja.ts
+8
-0
i18n/ms.ts
i18n/ms.ts
+8
-0
i18n/nb.ts
i18n/nb.ts
+8
-0
i18n/nl.ts
i18n/nl.ts
+8
-0
i18n/pt.ts
i18n/pt.ts
+8
-0
i18n/ru.ts
i18n/ru.ts
+8
-0
src/Kaidan.cpp
src/Kaidan.cpp
+8
-1
src/Kaidan.h
src/Kaidan.h
+5
-0
src/qml/GlobalDrawer.qml
src/qml/GlobalDrawer.qml
+20
-12
No files found.
i18n/base.ts
View file @
42460ae8
...
...
@@ -65,6 +65,14 @@
<
source
>
About
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/de.ts
View file @
42460ae8
...
...
@@ -119,6 +119,14 @@
<
source
>
Back
<
/source
>
<
translation
>
Zurück
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/es.ts
View file @
42460ae8
...
...
@@ -88,6 +88,14 @@
<
source
>
About
<
/source
>
<
translation
>
Acerca
de
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/fr.ts
View file @
42460ae8
...
...
@@ -111,6 +111,14 @@
<
source
>
Back
<
/source
>
<
translation
>
Retour
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/ja.ts
View file @
42460ae8
...
...
@@ -88,6 +88,14 @@
<
source
>
Back
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/ms.ts
View file @
42460ae8
...
...
@@ -107,6 +107,14 @@
<
source
>
Back
<
/source
>
<
translation
>
Kembali
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/nb.ts
View file @
42460ae8
...
...
@@ -88,6 +88,14 @@
<
source
>
About
<
/source
>
<
translation
>
Om
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/nl.ts
View file @
42460ae8
...
...
@@ -88,6 +88,14 @@
<
source
>
About
<
/source
>
<
translation
>
Over
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/pt.ts
View file @
42460ae8
...
...
@@ -88,6 +88,14 @@
<
source
>
About
<
/source
>
<
translation
>
Sobre
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
i18n/ru.ts
View file @
42460ae8
...
...
@@ -115,6 +115,14 @@
<
source
>
Back
<
/source
>
<
translation
>
Назад
<
/translation
>
<
/message
>
<
message
>
<
source
>
Invite
friends
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Invitation
link
copied
to
clipboard
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Kaidan
<
/name
>
...
...
src/Kaidan.cpp
View file @
42460ae8
...
...
@@ -36,7 +36,8 @@
#include <QSettings>
#include <QString>
#include <QStandardPaths>
#include <QCoreApplication>
#include <QClipboard>
#include <QGuiApplication>
// Kaidan
#include "AvatarFileStorage.h"
#include "PresenceCache.h"
...
...
@@ -282,3 +283,9 @@ void Kaidan::addOpenUri(QByteArray uri)
openUriCache
=
QString
::
fromUtf8
(
uri
);
}
}
void
Kaidan
::
copyToClipboard
(
QString
text
)
{
QClipboard
*
clipboard
=
QGuiApplication
::
clipboard
();
clipboard
->
setText
(
text
);
}
src/Kaidan.h
View file @
42460ae8
...
...
@@ -267,6 +267,11 @@ public:
*/
void
addOpenUri
(
QByteArray
uri
);
/**
* Copy text to the clipboard
*/
Q_INVOKABLE
void
copyToClipboard
(
QString
text
);
signals:
void
rosterModelChanged
();
void
messageModelChanged
();
...
...
src/qml/GlobalDrawer.qml
View file @
42460ae8
...
...
@@ -45,20 +45,28 @@ Kirigami.GlobalDrawer {
actions
:
[
Kirigami.Action
{
text
:
qsTr
(
"
Log out
"
)
iconName
:
"
system-shutdow
n
"
text
:
qsTr
(
"
Invite friends
"
)
iconName
:
"
mail-invitatio
n
"
onTriggered
:
{
// disconnect (open log in page
)
kaidan
.
mainDisconnect
(
true
);
kaidan
.
copyToClipboard
(
"
https://i.kaidan.im/#
"
+
kaidan
.
jid
)
passiveNotification
(
qsTr
(
"
Invitation link copied to clipboard
"
))
}
},
Kirigami.Action
{
text
:
qsTr
(
"
About
"
)
iconName
:
"
help-about
"
onTriggered
:
{
// open about sheet
aboutDialog
.
open
();
}
}
Kirigami.Action
{
text
:
qsTr
(
"
Log out
"
)
iconName
:
"
system-shutdown
"
onTriggered
:
{
// disconnect (open log in page)
kaidan
.
mainDisconnect
(
true
);
}
},
Kirigami.Action
{
text
:
qsTr
(
"
About
"
)
iconName
:
"
help-about
"
onTriggered
:
{
// open about sheet
aboutDialog
.
open
();
}
}
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment