- Add an hidden option to activate ephemeral on chat creation (create_ephemeral_chat_rooms=<seconds>)

- Add a placeholder in contacts for display name and resize empty box to placeholder size.
- Fix account name alignment.
- Hide records menu if option has been deactivated.
This commit is contained in:
Julien Wadel 2023-09-13 11:07:22 +02:00
parent 9bf230266e
commit 8a86536b28
21 changed files with 100 additions and 3 deletions

View file

@ -1054,6 +1054,11 @@ Adresa URL není nakonfigurována.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation>UŽIVATEL(Ů)</translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ Server url ikke konfigureret.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ Server URL ist nicht konfiguriert.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation>BENUTZERNAME(N)</translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ Server URL not configured.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation>USERNAME(S)</translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation>Display Name</translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ URL del servidor no configurada.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ URL du serveur non configurée.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation>Nom(s) d&apos;utilisateur</translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation>Nom d&apos;affichage</translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1040,6 +1040,11 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ URL del server non configurato.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1040,6 +1040,11 @@
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1054,6 +1054,11 @@ Nesukonfigūruotas serverio url.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ URL do servidor não configurado.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1054,6 +1054,11 @@
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1047,6 +1047,11 @@ Serverwebbadressen är inte konfigurerad.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1040,6 +1040,11 @@ Sunucu url&apos;si yapılandırılmadı.</translation>
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1054,6 +1054,11 @@
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -1040,6 +1040,11 @@
<extracomment>&apos;USERNAME(S)&apos; : label for sip accounts when only username is displayed n contact</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>displayName</source>
<extracomment>&apos;Display Name&apos; : placeholder for setting display name on a contact</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Contacts</name>

View file

@ -268,7 +268,6 @@ bool CallsListModel::createSecureChat (const QString& subject, const QString &pa
qInfo() << "Create secure ChatRoom: " << subject << ", from " << QString::fromStdString(localAddress->asString()) << " and with " <<participantAddress;;
std::shared_ptr<linphone::ChatRoom> chatRoom = core->createChatRoom(params, localAddress, participants);
if(chatRoom) {
int ephemeralTime = CoreManager::getInstance()->getSettingsModel()->getCreateEphemeralChatRooms();
if( ephemeralTime>0){

View file

@ -1144,6 +1144,17 @@ void SettingsModel::setContactsEnabled (bool status) {
int SettingsModel::getIncomingCallTimeout() const {
return CoreManager::getInstance()->getCore()->getIncTimeout();
}
int SettingsModel::getCreateEphemeralChatRooms() const{
return mConfig->getInt(UiSection, "create_ephemeral_chat_rooms", 0);
}
void SettingsModel::setCreateEphemeralChatRooms(int seconds) {
if(!isReadOnly(UiSection, "create_ephemeral_chat_rooms"))
mConfig->setInt(UiSection, "create_ephemeral_chat_rooms", seconds);
emit createEphemeralsChatRoomsChanged();
}
// =============================================================================
// Network.
// =============================================================================

View file

@ -501,6 +501,9 @@ public:
int getIncomingCallTimeout() const;
int getCreateEphemeralChatRooms() const;
void setCreateEphemeralChatRooms(int seconds);// <=0 deactivate
// Network. ------------------------------------------------------------------
bool getShowNetworkSettings () const;
@ -594,7 +597,7 @@ public:
void setDownloadFolder (const QString &folder);
QString getRemoteProvisioningRootUrl() const;
QString getRemoteProvisioning () const;
Q_INVOKABLE QString getRemoteProvisioning () const;
void setRemoteProvisioning (const QString &remoteProvisioning);
Q_INVOKABLE bool isQRCodeAvailable() const;
@ -804,6 +807,8 @@ signals:
void contactsEnabledChanged (bool status);
void createEphemeralsChatRoomsChanged();
// Network. ------------------------------------------------------------------
void showNetworkSettingsChanged (bool status);

View file

@ -40,7 +40,7 @@ Item {
'transparent'
height: parent.height
width: {
var width = textInput.contentWidth + parent.padding * 2
var width = Math.max(textInput.contentWidth, placeholder.contentWidth) + parent.padding * 2
return width < parent.width ? width : parent.width
}

View file

@ -133,6 +133,8 @@ ColumnLayout {
forceFocus: true
readOnly: !_edition
text: avatar.username
//: 'Display Name' : placeholder for setting display name on a contact
placeholder: qsTr('displayName')
font.family: SettingsModel.textMessageFont.family
onEditingFinished: Logic.setUsername(text)