mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-31 19:09:25 +00:00
feat(ui/views/App/Main/InviteFriends): set default subject/message
This commit is contained in:
parent
13bea18e5e
commit
5c564b1f85
5 changed files with 36 additions and 8 deletions
|
|
@ -814,11 +814,11 @@ Server url not configured.</translation>
|
|||
<name>InviteFriends</name>
|
||||
<message>
|
||||
<source>enterEmailLabel</source>
|
||||
<translation>Enter your friend's email address</translation>
|
||||
<translation>Friend's email address</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>messageLabel</source>
|
||||
<translation>You can modify the invitation that will be sent</translation>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
|
|
@ -834,11 +834,18 @@ Server url not configured.</translation>
|
|||
</message>
|
||||
<message>
|
||||
<source>defaultMessage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>%1 wants to invite you on Linphone !</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultSubject</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Linphone invitation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>forcedMessage</source>
|
||||
<translation>Download the application on your computer and start calling and chatting with Linphone users for free.
|
||||
|
||||
Click here: <a href="%1">%1</a>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
|||
|
|
@ -834,11 +834,18 @@ Url du serveur non configurée.</translation>
|
|||
</message>
|
||||
<message>
|
||||
<source>defaultMessage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>%1 souhaite vous inviter sur Linphone !</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultSubject</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Invitation Linphone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>forcedMessage</source>
|
||||
<translation>Téléchargez l’application sur votre ordinateur et appelez vos amis ou envoyez-leur un message sur Linphone gratuitement.
|
||||
|
||||
Cliquez ici : <a href="%1">%1</a>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
#define CBS_CALL_INTERVAL 20
|
||||
|
||||
#define DOWNLOAD_URL "https://www.linphone.org/technical-corner/linphone/downloads"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -164,3 +166,9 @@ void CoreManager::iterate () {
|
|||
mCore->iterate();
|
||||
mInstance->unlockVideoRender();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString CoreManager::getDownloadUrl () {
|
||||
return QStringLiteral(DOWNLOAD_URL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class CoreManager : public QObject {
|
|||
Q_OBJECT;
|
||||
|
||||
Q_PROPERTY(QString version READ getVersion CONSTANT);
|
||||
Q_PROPERTY(QString downloadUrl READ getDownloadUrl CONSTANT);
|
||||
|
||||
public:
|
||||
~CoreManager () = default;
|
||||
|
|
@ -134,6 +135,8 @@ private:
|
|||
|
||||
void iterate ();
|
||||
|
||||
static QString getDownloadUrl ();
|
||||
|
||||
std::shared_ptr<linphone::Core> mCore;
|
||||
std::shared_ptr<CoreHandlers> mHandlers;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Common 1.0
|
||||
import Linphone 1.0
|
||||
|
||||
import App.Styles 1.0
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ Rectangle {
|
|||
id: message
|
||||
|
||||
height: InviteFriendsStyle.message.height
|
||||
text: qsTr('defaultMessage')
|
||||
text: qsTr('defaultMessage').replace('%1', AccountSettingsModel.username)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,7 +81,9 @@ Rectangle {
|
|||
Qt.openUrlExternally(
|
||||
'mailto:' + encodeURIComponent(email.text) +
|
||||
'?subject=' + encodeURIComponent(qsTr('defaultSubject')) +
|
||||
'&body=' + encodeURIComponent(message.text)
|
||||
'&body=' + encodeURIComponent(
|
||||
message.text + '\n\n' + qsTr('forcedMessage').replace(/%1/g, CoreManager.downloadUrl)
|
||||
)
|
||||
)
|
||||
|
||||
window.setView('Home')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue