meeting creation/ sip login page margins, typography
This commit is contained in:
gaelle.braud 2025-09-17 11:17:31 +02:00 committed by Gaelle Braud
parent 4541ee3079
commit 77da7183f4
6 changed files with 1357 additions and 1307 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -79,7 +79,7 @@ LoginLayout {
Component {
id: firstItem
Flickable {
width: parent.width
width: Math.round(361 * DefaultStyle.dp)
contentWidth: content.implicitWidth
contentHeight: content.implicitHeight
clip: true
@ -107,28 +107,7 @@ LoginLayout {
}
text: qsTr("Certaines fonctionnalités telles que les conversations de groupe, les vidéo-conférences, etc… nécessitent un compte %1.\n\nCes fonctionnalités seront masquées si vous utilisez un compte SIP tiers.\n\nPour les activer dans un projet commercial, merci de nous contacter.").arg(applicationName)
}
// Text {
// Layout.fillWidth: true
// Layout.preferredWidth: rootStackView.width
// wrapMode: Text.WordWrap
// color: DefaultStyle.main2_900
// font {
// pixelSize: Typography.p1.pixelSize
// weight: Typography.p1.weight
// }
// text:"Ces fonctionnalités sont cachées lorsque vous vous enregistrez avec un compte SIP tiers."
// }
// Text {
// Layout.fillWidth: true
// Layout.preferredWidth: rootStackView.width
// wrapMode: Text.WordWrap
// color: DefaultStyle.main2_900
// font {
// pixelSize: Typography.p1.pixelSize
// weight: Typography.p1.weight
// }
// text: "Pour les activer dans un projet commercial, veuillez nous contacter. "
// }
}
SmallButton {
id: openLinkButton
@ -180,7 +159,7 @@ LoginLayout {
id: secondItem
Flickable {
id: formFlickable
width: parent.width
width: Math.round(770 * DefaultStyle.dp)
contentWidth: content.implicitWidth
contentHeight: content.implicitHeight
clip: true
@ -188,212 +167,252 @@ LoginLayout {
Control.ScrollBar.vertical: scrollbar
ColumnLayout {
RowLayout {
id: content
spacing: Math.round(2 * DefaultStyle.dp)
width: formFlickable.width - scrollbar.width*2
width: formFlickable.width - scrollbar.width*2
ColumnLayout {
spacing: Math.round(8 * DefaultStyle.dp)
FormItemLayout {
id: username
//: "Nom d'utilisateur"
label: qsTr("username")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: usernameEdit
isError: username.errorTextVisible || errorText.isVisible
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.down: passwordEdit
spacing: Math.round(2 * DefaultStyle.dp)
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
Layout.fillHeight: true
ColumnLayout {
spacing: Math.round(8 * DefaultStyle.dp)
FormItemLayout {
id: username
//: "Nom d'utilisateur"
label: qsTr("username")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: usernameEdit
isError: username.errorTextVisible || errorText.isVisible
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.down: passwordEdit
}
}
}
FormItemLayout {
id: password
label: qsTr("password")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: passwordEdit
isError: password.errorTextVisible || errorText.isVisible
hidden: true
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: usernameEdit
KeyNavigation.down: domainEdit
FormItemLayout {
id: password
label: qsTr("password")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: passwordEdit
isError: password.errorTextVisible || errorText.isVisible
hidden: true
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: usernameEdit
KeyNavigation.down: domainEdit
}
}
}
FormItemLayout {
id: domain
//: "Domaine"
label: qsTr("sip_address_domain")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: domainEdit
isError: domain.errorTextVisible
initialText: SettingsCpp.assistantThirdPartySipAccountDomain
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: passwordEdit
KeyNavigation.down: displayName
FormItemLayout {
id: domain
//: "Domaine"
label: qsTr("sip_address_domain")
mandatory: true
enableErrorText: true
Layout.fillWidth: true
contentItem: TextField {
id: domainEdit
isError: domain.errorTextVisible
initialText: SettingsCpp.assistantThirdPartySipAccountDomain
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: passwordEdit
KeyNavigation.down: displayName
}
Connections {
target: SettingsCpp
function onAssistantThirdPartySipAccountDomainChanged() {
domainEdit.resetText()
}
}
}
Connections {
target: SettingsCpp
function onAssistantThirdPartySipAccountDomainChanged() {
domainEdit.resetText()
FormItemLayout {
//: Nom d'affichage
label: qsTr("sip_address_display_name")
Layout.fillWidth: true
contentItem: TextField {
id: displayName
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: domainEdit
KeyNavigation.down: transportCbox
}
}
FormItemLayout {
//: "Transport"
label: qsTr("transport")
Layout.fillWidth: true
contentItem: ComboBox {
id: transportCbox
height: Math.round(49 * DefaultStyle.dp)
width: Math.round(360 * DefaultStyle.dp)
textRole: "text"
valueRole: "value"
model: [
{text: "TCP", value: LinphoneEnums.TransportType.Tcp},
{text: "UDP", value: LinphoneEnums.TransportType.Udp},
{text: "TLS", value: LinphoneEnums.TransportType.Tls},
{text: "DTLS", value: LinphoneEnums.TransportType.Dtls}
]
currentIndex: Utils.findIndex(model, function (entry) {
return entry.text === SettingsCpp.assistantThirdPartySipAccountTransport.toUpperCase()
})
}
}
}
FormItemLayout {
//: Nom d'affichage
label: qsTr("sip_address_display_name")
TemporaryText {
id: errorText
Layout.fillWidth: true
contentItem: TextField {
id: displayName
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: domainEdit
KeyNavigation.down: transportCbox
}
}
FormItemLayout {
//: "Transport"
label: qsTr("transport")
Layout.fillWidth: true
contentItem: ComboBox {
id: transportCbox
height: Math.round(49 * DefaultStyle.dp)
width: Math.round(360 * DefaultStyle.dp)
textRole: "text"
valueRole: "value"
model: [
{text: "TCP", value: LinphoneEnums.TransportType.Tcp},
{text: "UDP", value: LinphoneEnums.TransportType.Udp},
{text: "TLS", value: LinphoneEnums.TransportType.Tls},
{text: "DTLS", value: LinphoneEnums.TransportType.Dtls}
]
currentIndex: Utils.findIndex(model, function (entry) {
return entry.text === SettingsCpp.assistantThirdPartySipAccountTransport.toUpperCase()
})
}
}
}
TemporaryText {
id: errorText
Layout.fillWidth: true
Connections {
target: LoginPageCpp
function onErrorMessageChanged(error) {
errorText.setText(error)
}
}
}
BigButton {
id: connectionButton
Layout.topMargin: Math.round(15 * DefaultStyle.dp)
style: ButtonStyle.main
contentItem: StackLayout {
id: connectionButtonContent
currentIndex: 0
Text {
text: qsTr("assistant_account_login")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font {
pixelSize: Typography.b1.pixelSize
weight: Typography.b1.weight
}
color: DefaultStyle.grey_0
}
BusyIndicator {
implicitWidth: parent.height
implicitHeight: parent.height
Layout.alignment: Qt.AlignCenter
indicatorColor: DefaultStyle.grey_0
}
Connections {
target: LoginPageCpp
function onRegistrationStateChanged() {
if (LoginPageCpp.registrationState != LinphoneEnums.RegistrationState.Progress) {
connectionButton.enabled = true
connectionButtonContent.currentIndex = 0
}
}
function onErrorMessageChanged(error) {
if (error.length != 0) {
connectionButton.enabled = true
connectionButtonContent.currentIndex = 0
errorText.setText(error)
}
}
}
BigButton {
id: connectionButton
Layout.topMargin: Math.round(15 * DefaultStyle.dp)
style: ButtonStyle.main
contentItem: StackLayout {
id: connectionButtonContent
currentIndex: 0
Text {
text: qsTr("assistant_account_login")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font {
pixelSize: Typography.b1.pixelSize
weight: Typography.b1.weight
}
color: DefaultStyle.grey_0
}
BusyIndicator {
implicitWidth: parent.height
implicitHeight: parent.height
Layout.alignment: Qt.AlignCenter
indicatorColor: DefaultStyle.grey_0
}
Connections {
target: LoginPageCpp
function onRegistrationStateChanged() {
if (LoginPageCpp.registrationState != LinphoneEnums.RegistrationState.Progress) {
connectionButton.enabled = true
connectionButtonContent.currentIndex = 0
}
}
function onErrorMessageChanged(error) {
if (error.length != 0) {
connectionButton.enabled = true
connectionButtonContent.currentIndex = 0
}
}
}
}
}
function trigger() {
username.errorMessage = ""
password.errorMessage = ""
domain.errorMessage = ""
errorText.clear()
function trigger() {
username.errorMessage = ""
password.errorMessage = ""
domain.errorMessage = ""
errorText.clear()
loginDelay.restart()
}
onPressed: trigger()
KeyNavigation.up: transportCbox
Timer{
id: loginDelay
interval: 200
onTriggered: {
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0 || domainEdit.text.length == 0) {
if (usernameEdit.text.length == 0)
username.errorMessage = qsTr("assistant_account_login_missing_username")
if (passwordEdit.text.length == 0)
password.errorMessage = qsTr("assistant_account_login_missing_password")
if (domainEdit.text.length == 0)
//: "Veuillez saisir un nom de domaine
domain.errorMessage = qsTr("assistant_account_login_missing_domain")
return
}
console.debug("[SIPLoginPage] User: Log in")
LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, transportCbox.currentValue);
connectionButton.enabled = false
connectionButtonContent.currentIndex = 1
loginDelay.restart()
}
onPressed: trigger()
KeyNavigation.up: transportCbox
Timer{
id: loginDelay
interval: 200
onTriggered: {
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0 || domainEdit.text.length == 0) {
if (usernameEdit.text.length == 0)
username.errorMessage = qsTr("assistant_account_login_missing_username")
if (passwordEdit.text.length == 0)
password.errorMessage = qsTr("assistant_account_login_missing_password")
if (domainEdit.text.length == 0)
//: "Veuillez saisir un nom de domaine
domain.errorMessage = qsTr("assistant_account_login_missing_domain")
return
}
console.debug("[SIPLoginPage] User: Log in")
LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, transportCbox.currentValue);
connectionButton.enabled = false
connectionButtonContent.currentIndex = 1
}
}
}
Item {
Layout.fillHeight: true
}
}
Item {
ColumnLayout {
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
Layout.fillHeight: true
spacing: Math.round(8 * DefaultStyle.dp)
FormItemLayout {
id: serverAddress
//: "URL du serveur mandataire"
label: qsTr("login_server_address")
Layout.fillWidth: true
contentItem: TextField {
id: serverAddressEdit
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.down: connectionIdEdit
}
}
FormItemLayout {
id: connectionId
//: "Identifiant de connexion (si différent)"
label: qsTr("login_server_address")
Layout.fillWidth: true
contentItem: TextField {
id: connectionIdEdit
Layout.preferredWidth: Math.round(360 * DefaultStyle.dp)
KeyNavigation.up: serverAddressEdit
}
}
Item{Layout.fillHeight: true}
}
}
}
}
centerContent: [
Item {
anchors.fill: parent
Control.StackView {
id: rootStackView
initialItem: SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin ? secondItem : firstItem
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
width: Math.round(361 * DefaultStyle.dp)
}
ScrollBar {
id: scrollbar
z: 1
active: true
interactive: true
parent: rootStackView.currentItem
visible: parent.contentHeight > parent.height
policy: Control.ScrollBar.AsNeeded
anchors.rightMargin: -8 * DefaultStyle.dp
}
},
ScrollBar {
id: scrollbar
z: 1
active: true
interactive: true
parent: rootStackView.currentItem
// visible: parent.contentHeight > parent.height
policy: Control.ScrollBar.AsNeeded
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
// Layout.leftMargin: Math.round(119 * DefaultStyle.dp)
// anchors.leftMargin: Math.round(119 * DefaultStyle.dp)
// anchors.rightMargin: -8 * DefaultStyle.dp
},
Control.StackView {
id: rootStackView
initialItem: SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin ? secondItem : firstItem
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
width: currentItem ? currentItem.width : 0
},
// Item {
// id: sipItem
// // spacing: Math.round(8 * Defaultstyle.dp)
// anchors.fill: parent
// anchors.rightMargin: Math.round(50 * DefaultStyle.dp) + image.width
// },
Image {
id: image
z: -1
anchors.top: parent.top
anchors.right: parent.right

View file

@ -53,8 +53,8 @@ ColumnLayout {
Layout.fillWidth: true
Layout.preferredWidth: implicitWidth
model: mainItem.tabbarModel
pixelSize: Typography.h3m.pixelSize
textWeight: Typography.h3m.weight
pixelSize: Typography.h4.pixelSize
textWeight: Typography.h4.weight
spacing: Math.round(10 * DefaultStyle.dp)
}

View file

@ -287,8 +287,8 @@ AbstractMainPage {
spacing: Math.round(33 * DefaultStyle.dp)
anchors.fill: parent
RowLayout {
Layout.rightMargin: Math.round(35 * DefaultStyle.dp)
spacing: Math.round(5 * DefaultStyle.dp)
Layout.rightMargin: Math.round(35 * DefaultStyle.dp)
Button {
id: backButton
style: ButtonStyle.noBackground
@ -345,15 +345,19 @@ AbstractMainPage {
Layout.fillWidth: true
contentHeight: meetingSetup.height
Control.ScrollBar.vertical: ScrollBar {
id: meetingScrollBar
visible: parent.contentHeight > parent.height
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: Math.round(8 * DefaultStyle.dp)
}
contentChildren: MeetingForm {
MeetingForm {
id: meetingSetup
conferenceInfoGui: createConfLayout.conferenceInfoGui
isCreation: true
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: Math.round(35 * DefaultStyle.dp)
Connections {
target: meetingSetup.conferenceInfoGui ? meetingSetup.conferenceInfoGui.core : null