Compare commits
3 commits
a73458dfb6
...
db7ce5ef4a
| Author | SHA1 | Date | |
|---|---|---|---|
| db7ce5ef4a | |||
| b19d96f82c | |||
| fdee074dc9 |
12 changed files with 382 additions and 64 deletions
|
|
@ -58,6 +58,8 @@ void CarddavCore::save() {
|
||||||
auto realm = Utils::appStringToCoreString(mRealm);
|
auto realm = Utils::appStringToCoreString(mRealm);
|
||||||
auto storeNewFriendsInIt = mStoreNewFriendsInIt;
|
auto storeNewFriendsInIt = mStoreNewFriendsInIt;
|
||||||
|
|
||||||
|
lInfo() << log().arg("CarddavCore::save() called") << " mUsername=" << mUsername << " mRealm=" << mRealm;
|
||||||
|
|
||||||
mCarddavModelConnection->invokeToModel([this, displayName, uri, username, password, realm, storeNewFriendsInIt]() {
|
mCarddavModelConnection->invokeToModel([this, displayName, uri, username, password, realm, storeNewFriendsInIt]() {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
mCarddavModel->save(displayName, uri, username, password, realm, storeNewFriendsInIt);
|
mCarddavModel->save(displayName, uri, username, password, realm, storeNewFriendsInIt);
|
||||||
|
|
|
||||||
|
|
@ -930,46 +930,46 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="68"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="68"/>
|
||||||
<source>settings_call_forward_to_voicemail</source>
|
<source>settings_call_forward_to_voicemail</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zur Voicemail</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="26"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="26"/>
|
||||||
<source>settings_call_forward_address_cannot_be_empty</source>
|
<source>settings_call_forward_address_cannot_be_empty</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Adresse darf nicht leer sein</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="42"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="42"/>
|
||||||
<source>settings_call_forward_activate_title</source>
|
<source>settings_call_forward_activate_title</source>
|
||||||
<extracomment>"Forward calls"</extracomment>
|
<extracomment>"Forward calls"</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Anrufe weiterleiten</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="44"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="44"/>
|
||||||
<source>settings_call_forward_activate_subtitle</source>
|
<source>settings_call_forward_activate_subtitle</source>
|
||||||
<extracomment>"Enable call forwarding to voicemail or sip address"</extracomment>
|
<extracomment>"Enable call forwarding to voicemail or sip address"</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Anrufweiterleitung zur Voicemail oder SIP-Adresse aktivieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="56"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="56"/>
|
||||||
<source>settings_call_forward_destination_choose</source>
|
<source>settings_call_forward_destination_choose</source>
|
||||||
<extracomment>Forward to destination</extracomment>
|
<extracomment>Forward to destination</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Weiterleiten an</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="69"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="69"/>
|
||||||
<source>settings_call_forward_to_sipaddress</source>
|
<source>settings_call_forward_to_sipaddress</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zur SIP-Adresse</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="106"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="106"/>
|
||||||
<source>settings_call_forward_sipaddress_title</source>
|
<source>settings_call_forward_sipaddress_title</source>
|
||||||
<extracomment>SIP Address</extracomment>
|
<extracomment>SIP Address</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>SIP-Adresse</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="107"/>
|
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="107"/>
|
||||||
<source>settings_call_forward_sipaddress_placeholder</source>
|
<source>settings_call_forward_sipaddress_placeholder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>sip:benutzer@domain.de</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
@ -2694,7 +2694,7 @@ Error</extracomment>
|
||||||
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="21"/>
|
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="21"/>
|
||||||
<source>settings_chat_notifications_title</source>
|
<source>settings_chat_notifications_title</source>
|
||||||
<extracomment>Notifications</extracomment>
|
<extracomment>Notifications</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Benachrichtigungen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="32"/>
|
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="32"/>
|
||||||
|
|
@ -6027,7 +6027,13 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
||||||
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="17"/>
|
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="17"/>
|
||||||
<source>settings_call_forward</source>
|
<source>settings_call_forward</source>
|
||||||
<extracomment>"Transfert d'appel"</extracomment>
|
<extracomment>"Transfert d'appel"</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Anrufweiterleitung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="25"/>
|
||||||
|
<source>settings_user_interface_title</source>
|
||||||
|
<extracomment>Display settings</extracomment>
|
||||||
|
<translation>Anzeige</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="19"/>
|
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="19"/>
|
||||||
|
|
@ -7838,4 +7844,62 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
||||||
<translation>Ok</translation>
|
<translation>Ok</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>DisplaySettingsLayout</name>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_title</source>
|
||||||
|
<extracomment>Language</extracomment>
|
||||||
|
<translation>Sprache</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_appearance_title</source>
|
||||||
|
<extracomment>Appearance</extracomment>
|
||||||
|
<translation>Erscheinungsbild</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_select</source>
|
||||||
|
<extracomment>Language</extracomment>
|
||||||
|
<translation>Sprache</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_subtitle</source>
|
||||||
|
<extracomment>Select your preferred language</extracomment>
|
||||||
|
<translation>Wählen Sie Ihre bevorzugte Sprache</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_restart_hint</source>
|
||||||
|
<extracomment>Restart required for language change</extracomment>
|
||||||
|
<translation>Neustart erforderlich für Sprachwechsel</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_dark_mode_title</source>
|
||||||
|
<extracomment>Dark mode</extracomment>
|
||||||
|
<translation>Dunkelmodus</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_dark_mode_subtitle</source>
|
||||||
|
<extracomment>Enable dark mode (or follows system theme like Breeze Dark)</extracomment>
|
||||||
|
<translation>Dunkelmodus aktivieren (oder System-Theme wie Breeze Dark folgen)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_system_dark_detected</source>
|
||||||
|
<extracomment>System dark theme is detected automatically</extracomment>
|
||||||
|
<translation>System-Dunkelmodus erkannt (z.B. Breeze Dark)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_system_light_detected</source>
|
||||||
|
<extracomment>System light theme is detected</extracomment>
|
||||||
|
<translation>System-Hellmodus erkannt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_theme_color_title</source>
|
||||||
|
<extracomment>Accent color</extracomment>
|
||||||
|
<translation>Akzentfarbe</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_theme_color_subtitle</source>
|
||||||
|
<extracomment>Choose the accent color for buttons and highlights</extracomment>
|
||||||
|
<translation>Wählen Sie die Akzentfarbe für Schaltflächen und Hervorhebungen</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
||||||
|
|
@ -7737,4 +7737,62 @@ To enable them in a commercial project, please contact us.</translation>
|
||||||
<translation>Ok</translation>
|
<translation>Ok</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>DisplaySettingsLayout</name>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_title</source>
|
||||||
|
<extracomment>Language</extracomment>
|
||||||
|
<translation>Language</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_appearance_title</source>
|
||||||
|
<extracomment>Appearance</extracomment>
|
||||||
|
<translation>Appearance</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_select</source>
|
||||||
|
<extracomment>Language</extracomment>
|
||||||
|
<translation>Language</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_subtitle</source>
|
||||||
|
<extracomment>Select your preferred language</extracomment>
|
||||||
|
<translation>Select your preferred language</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_language_restart_hint</source>
|
||||||
|
<extracomment>Restart required for language change</extracomment>
|
||||||
|
<translation>Restart required for language change</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_dark_mode_title</source>
|
||||||
|
<extracomment>Dark mode</extracomment>
|
||||||
|
<translation>Dark mode</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_dark_mode_subtitle</source>
|
||||||
|
<extracomment>Enable dark mode (or follows system theme like Breeze Dark)</extracomment>
|
||||||
|
<translation>Enable dark mode (or follows system theme like Breeze Dark)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_system_dark_detected</source>
|
||||||
|
<extracomment>System dark theme is detected automatically</extracomment>
|
||||||
|
<translation>System dark theme detected (e.g. Breeze Dark)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_system_light_detected</source>
|
||||||
|
<extracomment>System light theme is detected</extracomment>
|
||||||
|
<translation>System light theme detected</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_theme_color_title</source>
|
||||||
|
<extracomment>Accent color</extracomment>
|
||||||
|
<translation>Accent color</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>settings_display_theme_color_subtitle</source>
|
||||||
|
<extracomment>Choose the accent color for buttons and highlights</extracomment>
|
||||||
|
<translation>Choose the accent color for buttons and highlights</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include "model/core/CoreModel.hpp"
|
#include "model/core/CoreModel.hpp"
|
||||||
#include "model/setting/SettingsModel.hpp"
|
#include "model/setting/SettingsModel.hpp"
|
||||||
#include "tool/Utils.hpp"
|
#include "tool/Utils.hpp"
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
DEFINE_ABSTRACT_OBJECT(CarddavModel)
|
DEFINE_ABSTRACT_OBJECT(CarddavModel)
|
||||||
|
|
||||||
|
|
@ -59,16 +60,32 @@ void CarddavModel::save(
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
auto core = CoreModel::getInstance()->getCore();
|
auto core = CoreModel::getInstance()->getCore();
|
||||||
|
|
||||||
|
// Extract domain from URI for auth info lookup
|
||||||
|
string domain;
|
||||||
|
QUrl url(QString::fromStdString(uri));
|
||||||
|
if (url.isValid()) {
|
||||||
|
domain = url.host().toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// If realm is empty, use domain as default realm
|
||||||
|
if (realm.empty() && !domain.empty()) {
|
||||||
|
realm = domain;
|
||||||
|
lInfo() << log().arg("Using host as default realm:") << realm;
|
||||||
|
}
|
||||||
|
|
||||||
|
lInfo() << log().arg("CardDAV save called with:") << " displayName=" << displayName << " uri=" << uri
|
||||||
|
<< " username=" << username << " realm=" << realm << " domain=" << domain << " (password hidden)";
|
||||||
|
|
||||||
// Auth info handled in lazy mode, if provided handle otherwise ignore.
|
// Auth info handled in lazy mode, if provided handle otherwise ignore.
|
||||||
// TODO: add dialog to ask user before removing existing auth info if existing already - (comment from Android)
|
// TODO: add dialog to ask user before removing existing auth info if existing already - (comment from Android)
|
||||||
if (!username.empty() && !realm.empty()) {
|
if (!username.empty() && !realm.empty()) {
|
||||||
mRemovedAuthInfo = core->findAuthInfo(realm, username, "");
|
mRemovedAuthInfo = core->findAuthInfo(realm, username, domain);
|
||||||
if (mRemovedAuthInfo != nullptr) {
|
if (mRemovedAuthInfo != nullptr) {
|
||||||
lWarning() << log().arg("Auth info with username ") << username << " already exists, removing it first.";
|
lWarning() << log().arg("Auth info with username ") << username << " already exists, removing it first.";
|
||||||
core->removeAuthInfo(mRemovedAuthInfo);
|
core->removeAuthInfo(mRemovedAuthInfo);
|
||||||
}
|
}
|
||||||
lInfo() << log().arg("Adding auth info with username") << username;
|
lInfo() << log().arg("Adding auth info with username ") << username << " and domain " << domain;
|
||||||
mCreatedAuthInfo = linphone::Factory::get()->createAuthInfo(username, "", password, "", realm, "");
|
mCreatedAuthInfo = linphone::Factory::get()->createAuthInfo(username, "", password, "", realm, domain);
|
||||||
core->addAuthInfo(mCreatedAuthInfo);
|
core->addAuthInfo(mCreatedAuthInfo);
|
||||||
} else {
|
} else {
|
||||||
lInfo() << log().arg("No auth info provided upon saving.");
|
lInfo() << log().arg("No auth info provided upon saving.");
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Page/Layout/Settings/CallSettingsLayout.qml
|
view/Page/Layout/Settings/CallSettingsLayout.qml
|
||||||
view/Page/Layout/Settings/CallForwardSettingsLayout.qml
|
view/Page/Layout/Settings/CallForwardSettingsLayout.qml
|
||||||
view/Page/Layout/Settings/ContactsSettingsLayout.qml
|
view/Page/Layout/Settings/ContactsSettingsLayout.qml
|
||||||
|
view/Page/Layout/Settings/DisplaySettingsLayout.qml
|
||||||
view/Page/Layout/Settings/MeetingsSettingsLayout.qml
|
view/Page/Layout/Settings/MeetingsSettingsLayout.qml
|
||||||
view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml
|
view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml
|
||||||
view/Page/Layout/Settings/DebugSettingsLayout.qml
|
view/Page/Layout/Settings/DebugSettingsLayout.qml
|
||||||
|
|
|
||||||
|
|
@ -4,33 +4,70 @@ import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
|
import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
|
||||||
|
|
||||||
ComboBox {
|
RowLayout {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
property string titleText
|
||||||
|
property string subTitleText
|
||||||
property string propertyName
|
property string propertyName
|
||||||
|
|
||||||
property var propertyOwner
|
property var propertyOwner
|
||||||
property var propertyOwnerGui
|
property var propertyOwnerGui
|
||||||
property alias entries: mainItem.model
|
property alias entries: comboBox.model
|
||||||
oneLine: true
|
property alias model: comboBox.model
|
||||||
currentIndex: Utils.findIndex(model, function (entry) {
|
property alias textRole: comboBox.textRole
|
||||||
if(propertyOwnerGui)
|
property alias flagRole: comboBox.flagRole
|
||||||
return Utils.equalObject(entry,propertyOwnerGui.core[propertyName])
|
property alias currentIndex: comboBox.currentIndex
|
||||||
else
|
property alias currentValue: comboBox.currentValue
|
||||||
return Utils.equalObject(entry,propertyOwner[propertyName])
|
property alias listView: comboBox.listView
|
||||||
})
|
spacing: Utils.getSizeWithScreenRatio(20)
|
||||||
onCurrentValueChanged: {
|
|
||||||
if(propertyOwnerGui) {
|
ColumnLayout {
|
||||||
binding.when = !Utils.equalObject(currentValue,propertyOwnerGui.core[propertyName])
|
Layout.minimumHeight: Utils.getSizeWithScreenRatio(32)
|
||||||
}else{
|
Layout.fillWidth: true
|
||||||
binding.when = !Utils.equalObject(currentValue,propertyOwner[propertyName])
|
spacing: Utils.getSizeWithScreenRatio(4)
|
||||||
|
visible: titleText.length > 0
|
||||||
|
Text {
|
||||||
|
text: titleText
|
||||||
|
font: Typography.p2l
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: subTitleText
|
||||||
|
font: Typography.p1
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
visible: subTitleText.length > 0
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binding {
|
|
||||||
id: binding
|
ComboBox {
|
||||||
target: propertyOwnerGui ? propertyOwnerGui.core : propertyOwner
|
id: comboBox
|
||||||
property: propertyName
|
Layout.alignment: titleText.length > 0 ? (Qt.AlignRight | Qt.AlignVCenter) : Qt.AlignLeft
|
||||||
value: mainItem.currentValue
|
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
||||||
when: false
|
Layout.preferredWidth: titleText.length > 0 ? Utils.getSizeWithScreenRatio(200) : undefined
|
||||||
|
Layout.fillWidth: titleText.length === 0
|
||||||
|
oneLine: true
|
||||||
|
currentIndex: Utils.findIndex(model, function (entry) {
|
||||||
|
if(propertyOwnerGui)
|
||||||
|
return Utils.equalObject(entry, propertyOwnerGui.core[mainItem.propertyName])
|
||||||
|
else
|
||||||
|
return Utils.equalObject(entry, propertyOwner[mainItem.propertyName])
|
||||||
|
})
|
||||||
|
onCurrentValueChanged: {
|
||||||
|
if(propertyOwnerGui) {
|
||||||
|
binding.when = !Utils.equalObject(currentValue, propertyOwnerGui.core[mainItem.propertyName])
|
||||||
|
} else {
|
||||||
|
binding.when = !Utils.equalObject(currentValue, propertyOwner[mainItem.propertyName])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Binding {
|
||||||
|
id: binding
|
||||||
|
target: propertyOwnerGui ? propertyOwnerGui.core : propertyOwner
|
||||||
|
property: mainItem.propertyName
|
||||||
|
value: comboBox.currentValue
|
||||||
|
when: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ RowLayout {
|
||||||
signal toggled()
|
signal toggled()
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: Utils.getSizeWithScreenRatio(32)
|
Layout.minimumHeight: Utils.getSizeWithScreenRatio(32)
|
||||||
spacing: Utils.getSizeWithScreenRatio(4)
|
spacing: Utils.getSizeWithScreenRatio(4)
|
||||||
Text {
|
Text {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ AbstractSettingsMenu {
|
||||||
//: "Réunions"
|
//: "Réunions"
|
||||||
{title: qsTr("settings_meetings_title"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature},
|
{title: qsTr("settings_meetings_title"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature},
|
||||||
//: "Affichage"
|
//: "Affichage"
|
||||||
//{title: qsTr("settings_user_interface_title"), layout: "DisplaySettingsLayout"},
|
{title: qsTr("settings_user_interface_title"), layout: "DisplaySettingsLayout"},
|
||||||
//: "Security"
|
//: "Security"
|
||||||
// {title: qsTr("settings_security_title"), layout: "SecuritySettingsLayout"},
|
// {title: qsTr("settings_security_title"), layout: "SecuritySettingsLayout"},
|
||||||
//: "Réseau"
|
//: "Réseau"
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,8 @@ AbstractSettingsLayout {
|
||||||
accessibleUseButtonText: qsTr("use_cardav_server_accessible_name")
|
accessibleUseButtonText: qsTr("use_cardav_server_accessible_name")
|
||||||
proxyModel: CarddavProxy {
|
proxyModel: CarddavProxy {
|
||||||
onModelReset: {
|
onModelReset: {
|
||||||
carddavProvider.showAddButton = carddavProvider.proxyModel.count == 0
|
// Allow multiple CardDAV accounts
|
||||||
|
carddavProvider.showAddButton = true
|
||||||
carddavProvider.newItemGui = createGuiObject('Carddav')
|
carddavProvider.newItemGui = createGuiObject('Carddav')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
129
Linphone/view/Page/Layout/Settings/DisplaySettingsLayout.qml
Normal file
129
Linphone/view/Page/Layout/Settings/DisplaySettingsLayout.qml
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls.Basic as Control
|
||||||
|
import Linphone
|
||||||
|
import SettingsCpp 1.0
|
||||||
|
import UtilsCpp
|
||||||
|
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
||||||
|
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
||||||
|
|
||||||
|
AbstractSettingsLayout {
|
||||||
|
id: mainItem
|
||||||
|
width: parent?.width
|
||||||
|
contentModel: [
|
||||||
|
{
|
||||||
|
//: Language
|
||||||
|
title: qsTr("settings_display_language_title"),
|
||||||
|
subTitle: "",
|
||||||
|
contentComponent: languageComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//: Appearance
|
||||||
|
title: qsTr("settings_display_appearance_title"),
|
||||||
|
subTitle: "",
|
||||||
|
contentComponent: appearanceComponent
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
onSave: {
|
||||||
|
SettingsCpp.save()
|
||||||
|
}
|
||||||
|
onUndo: SettingsCpp.undo()
|
||||||
|
|
||||||
|
// Language settings
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: languageComponent
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: Utils.getSizeWithScreenRatio(20)
|
||||||
|
|
||||||
|
ComboSetting {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
//: Language
|
||||||
|
titleText: qsTr("settings_display_language_select")
|
||||||
|
//: Select your preferred language
|
||||||
|
subTitleText: qsTr("settings_display_language_subtitle")
|
||||||
|
propertyName: "configLocale"
|
||||||
|
propertyOwner: SettingsCpp
|
||||||
|
model: [
|
||||||
|
{text: "English", value: "en"},
|
||||||
|
{text: "Deutsch", value: "de"},
|
||||||
|
{text: "Francais", value: "fr"},
|
||||||
|
{text: "Espanol", value: "es"},
|
||||||
|
{text: "Portugues", value: "pt"},
|
||||||
|
{text: "Italiano", value: "it"},
|
||||||
|
{text: "Nederlands", value: "nl"},
|
||||||
|
{text: "Polski", value: "pl"},
|
||||||
|
{text: "Cesky", value: "cs"},
|
||||||
|
{text: "Slovensky", value: "sk"},
|
||||||
|
{text: "Magyar", value: "hu"},
|
||||||
|
{text: "Suomi", value: "fi"},
|
||||||
|
{text: "Russkiy", value: "ru"},
|
||||||
|
{text: "Ukrayinska", value: "uk"},
|
||||||
|
{text: "Zhongwen", value: "zh_Hans"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
//: Restart required for language change
|
||||||
|
text: qsTr("settings_display_language_restart_hint")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
font.pixelSize: Typography.p2.pixelSize
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Appearance settings
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: appearanceComponent
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: Utils.getSizeWithScreenRatio(20)
|
||||||
|
|
||||||
|
SwitchSetting {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
//: Dark mode
|
||||||
|
titleText: qsTr("settings_display_dark_mode_title")
|
||||||
|
//: Enable dark mode (or follows system theme like Breeze Dark)
|
||||||
|
subTitleText: qsTr("settings_display_dark_mode_subtitle")
|
||||||
|
propertyName: "darkModeAllowed"
|
||||||
|
propertyOwner: SettingsCpp
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
//: System dark theme is detected automatically
|
||||||
|
text: DefaultStyle.systemDarkMode
|
||||||
|
? qsTr("settings_display_system_dark_detected")
|
||||||
|
: qsTr("settings_display_system_light_detected")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
font.pixelSize: Typography.p2.pixelSize
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboSetting {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
//: Accent color
|
||||||
|
titleText: qsTr("settings_display_theme_color_title")
|
||||||
|
//: Choose the accent color for buttons and highlights
|
||||||
|
subTitleText: qsTr("settings_display_theme_color_subtitle")
|
||||||
|
propertyName: "themeMainColor"
|
||||||
|
propertyOwner: SettingsCpp
|
||||||
|
model: [
|
||||||
|
{text: "Orange", value: "orange"},
|
||||||
|
{text: "Green", value: "green"},
|
||||||
|
{text: "Blue", value: "blue"},
|
||||||
|
{text: "Red", value: "red"},
|
||||||
|
{text: "Purple", value: "purple"},
|
||||||
|
{text: "Pink", value: "pink"},
|
||||||
|
{text: "Yellow", value: "yellow"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,10 +4,15 @@ import Linphone
|
||||||
import SettingsCpp
|
import SettingsCpp
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
|
// Dark mode detection: use setting or auto-detect from system
|
||||||
|
property bool isDarkMode: SettingsCpp.darkModeAllowed || systemDarkMode
|
||||||
|
property bool systemDarkMode: Qt.styleHints.colorScheme === Qt.Dark
|
||||||
|
|
||||||
property var currentTheme: Themes.themes.hasOwnProperty(SettingsCpp.themeMainColor)
|
property var currentTheme: Themes.themes.hasOwnProperty(SettingsCpp.themeMainColor)
|
||||||
? Themes.themes[SettingsCpp.themeMainColor]
|
? Themes.themes[SettingsCpp.themeMainColor]
|
||||||
: Themes.themes["orange"]
|
: Themes.themes["orange"]
|
||||||
|
|
||||||
|
// Main accent colors (from theme)
|
||||||
property var main1_100: currentTheme.main100
|
property var main1_100: currentTheme.main100
|
||||||
property var main1_200: currentTheme.main200
|
property var main1_200: currentTheme.main200
|
||||||
property var main1_300: currentTheme.main300
|
property var main1_300: currentTheme.main300
|
||||||
|
|
@ -15,37 +20,40 @@ QtObject {
|
||||||
property var main1_600: currentTheme.main600
|
property var main1_600: currentTheme.main600
|
||||||
property var main1_700: currentTheme.main700
|
property var main1_700: currentTheme.main700
|
||||||
|
|
||||||
property var main2_0: "#FAFEFF"
|
// Main UI colors - switch based on dark mode
|
||||||
property var main2_100: "#EEF6F8"
|
property var main2_0: isDarkMode ? "#1a1a1a" : "#FAFEFF"
|
||||||
property var main2_200: "#DFECF2"
|
property var main2_100: isDarkMode ? "#252525" : "#EEF6F8"
|
||||||
property var main2_300: "#C0D1D9"
|
property var main2_200: isDarkMode ? "#2d2d2d" : "#DFECF2"
|
||||||
property var main2_400: "#9AABB5"
|
property var main2_300: isDarkMode ? "#3d3d3d" : "#C0D1D9"
|
||||||
property var main2_500_main: "#6C7A87"
|
property var main2_400: isDarkMode ? "#5a5a5a" : "#9AABB5"
|
||||||
property var main2_600: "#4E6074"
|
property var main2_500_main: isDarkMode ? "#8a8a8a" : "#6C7A87"
|
||||||
property var main2_700: "#364860"
|
property var main2_600: isDarkMode ? "#b0b0b0" : "#4E6074"
|
||||||
property var main2_800: "#22334D"
|
property var main2_700: isDarkMode ? "#c8c8c8" : "#364860"
|
||||||
property var main2_900: "#2D3648"
|
property var main2_800: isDarkMode ? "#e0e0e0" : "#22334D"
|
||||||
|
property var main2_900: isDarkMode ? "#f0f0f0" : "#2D3648"
|
||||||
|
|
||||||
property var grey_0: "#FFFFFF"
|
// Grey colors - inverted for dark mode
|
||||||
property var grey_100: "#F9F9F9"
|
property var grey_0: isDarkMode ? "#1a1a1a" : "#FFFFFF"
|
||||||
property var grey_200: "#EDEDED"
|
property var grey_100: isDarkMode ? "#252525" : "#F9F9F9"
|
||||||
property var grey_300: "#C9C9C9"
|
property var grey_200: isDarkMode ? "#333333" : "#EDEDED"
|
||||||
property var grey_400: "#949494"
|
property var grey_300: isDarkMode ? "#4a4a4a" : "#C9C9C9"
|
||||||
property var grey_500: "#4E4E4E"
|
property var grey_400: isDarkMode ? "#6b6b6b" : "#949494"
|
||||||
property var grey_600: "#2E3030"
|
property var grey_500: isDarkMode ? "#b1b1b1" : "#4E4E4E"
|
||||||
property var grey_850: "#D9D9D9"
|
property var grey_600: isDarkMode ? "#d1d1d1" : "#2E3030"
|
||||||
property var grey_900: "#070707"
|
property var grey_850: isDarkMode ? "#404040" : "#D9D9D9"
|
||||||
property var grey_1000: "#000000"
|
property var grey_900: isDarkMode ? "#f8f8f8" : "#070707"
|
||||||
|
property var grey_1000: isDarkMode ? "#ffffff" : "#000000"
|
||||||
|
|
||||||
|
// Status colors - keep similar but adjust for dark mode visibility
|
||||||
property var warning_600: "#DBB820"
|
property var warning_600: "#DBB820"
|
||||||
property var warning_700: "#AF9308"
|
property var warning_700: "#AF9308"
|
||||||
property var danger_500_main: "#DD5F5F"
|
property var danger_500_main: "#DD5F5F"
|
||||||
property var warning_500_main: "#FFDC2E"
|
property var warning_500_main: "#FFDC2E"
|
||||||
property var danger_700: "#9E3548"
|
property var danger_700: "#9E3548"
|
||||||
property var danger_900: "#723333"
|
property var danger_900: isDarkMode ? "#ff6666" : "#723333"
|
||||||
property var success_500_main: "#4FAE80"
|
property var success_500_main: "#4FAE80"
|
||||||
property var success_700: "#377d71"
|
property var success_700: "#377d71"
|
||||||
property var success_900: "#1E4C53"
|
property var success_900: isDarkMode ? "#5fd9a8" : "#1E4C53"
|
||||||
property var info_500_main: "#4AA8FF"
|
property var info_500_main: "#4AA8FF"
|
||||||
property var info_800_main: "#02528D"
|
property var info_800_main: "#02528D"
|
||||||
|
|
||||||
|
|
@ -67,10 +75,10 @@ QtObject {
|
||||||
property string flagFont: "Noto Color Emoji"
|
property string flagFont: "Noto Color Emoji"
|
||||||
property string defaultFont: "Noto Sans"
|
property string defaultFont: "Noto Sans"
|
||||||
|
|
||||||
property var numericPadPressedButtonColor: "#EEF7F8"
|
property var numericPadPressedButtonColor: isDarkMode ? "#2a3a3d" : "#EEF7F8"
|
||||||
|
|
||||||
property var groupCallButtonColor: "#EEF7F8"
|
property var groupCallButtonColor: isDarkMode ? "#2a3a3d" : "#EEF7F8"
|
||||||
|
|
||||||
property var placeholders: '#CACACA' // No name in design
|
property var placeholders: isDarkMode ? '#555555' : '#CACACA'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
external/linphone-sdk
vendored
2
external/linphone-sdk
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2e6e6b927ce202f6948da02ea33081a52b89bf48
|
Subproject commit 4193a9481e6d8530bec6f6af26efb59285a53e0e
|
||||||
Loading…
Reference in a new issue