Commit 25425041 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Assistant/AssistantFetchRemoteConfiguration): view done

parent c4a65c84
......@@ -28,6 +28,28 @@
<translation>Start in the system tray, do not show the main interface.</translation>
</message>
</context>
<context>
<name>AssistantAbstractView</name>
<message>
<source>back</source>
<translation>BACK</translation>
</message>
</context>
<context>
<name>AssistantFetchRemoteConfiguration</name>
<message>
<source>fetchRemoteConfigurationTitle</source>
<translation>Fetch remote configuration</translation>
</message>
<message>
<source>urlLabel</source>
<translation>URL</translation>
</message>
<message>
<source>confirmAction</source>
<translation>DOWNLOAD</translation>
</message>
</context>
<context>
<name>AssistantHome</name>
<message>
......
......@@ -28,6 +28,28 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AssistantAbstractView</name>
<message>
<source>back</source>
<translation>RETOUR</translation>
</message>
</context>
<context>
<name>AssistantFetchRemoteConfiguration</name>
<message>
<source>fetchRemoteConfigurationTitle</source>
<translation>Télécharger une configuration</translation>
</message>
<message>
<source>urlLabel</source>
<translation>URL</translation>
</message>
<message>
<source>confirmAction</source>
<translation>TÉLÉCHARGER</translation>
</message>
</context>
<context>
<name>AssistantHome</name>
<message>
......
......@@ -309,6 +309,8 @@
<file>ui/scripts/Utils/qmldir</file>
<file>ui/scripts/Utils/uri-tools.js</file>
<file>ui/scripts/Utils/utils.js</file>
<file>ui/views/App/Assistant/AssistantAbstractView.qml</file>
<file>ui/views/App/Assistant/AssistantFetchRemoteConfiguration.qml</file>
<file>ui/views/App/Assistant/AssistantHome.qml</file>
<file>ui/views/App/AssistantWindow.qml</file>
<file>ui/views/App/Calls/AbstractStartingCall.qml</file>
......@@ -333,6 +335,7 @@
<file>ui/views/App/Settings/SettingsUi.qml</file>
<file>ui/views/App/Settings/SettingsVideo.qml</file>
<file>ui/views/App/Settings/SettingsWindow.qml</file>
<file>ui/views/App/Styles/Assistant/AssistantAbstractViewStyle.qml</file>
<file>ui/views/App/Styles/Assistant/AssistantHomeStyle.qml</file>
<file>ui/views/App/Styles/AssistantWindowStyle.qml</file>
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import App.Styles 1.0
// =============================================================================
ColumnLayout {
id: view
// ---------------------------------------------------------------------------
property alias mainActionEnabled: mainActionButton.enabled
property alias mainActionLabel: mainActionButton.text
property var mainAction
default property alias _content: content.data
// ---------------------------------------------------------------------------
Item {
id: content
Layout.fillHeight: true
Layout.fillWidth: true
}
Row {
Layout.alignment: Qt.AlignHCenter
spacing: AssistantAbstractViewStyle.buttons.spacing
TextButtonA {
text: qsTr('back')
onClicked: window.popView()
}
TextButtonB {
id: mainActionButton
onClicked: view.mainAction()
}
}
}
import Common 1.0
// =============================================================================
AssistantAbstractView {
mainAction: (function () {
console.log('TODO')
})
mainActionEnabled: url.text.length > 0
mainActionLabel: qsTr('confirmAction')
Form {
anchors.fill: parent
orientation: Qt.Vertical
title: qsTr('fetchRemoteConfigurationTitle')
FormLine {
FormGroup {
label: qsTr('urlLabel')
TextField {
id: url
}
}
}
}
}
......@@ -67,5 +67,43 @@ Window {
}
initialItem: window.viewsPath + 'AssistantHome.qml'
// -------------------------------------------------------------------------
popEnter: Transition {
XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration
easing.type: Easing.OutBack
from: -stack.width - AssistantWindowStyle.leftMargin
to: 0
}
}
popExit: Transition {
XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration
easing.type: Easing.OutBack
from: 0
to: stack.width + AssistantWindowStyle.rightMargin
}
}
pushEnter: Transition {
XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration
easing.type: Easing.OutBack
from: stack.width + AssistantWindowStyle.rightMargin
to: 0
}
}
pushExit: Transition {
XAnimator {
duration: AssistantWindowStyle.stackAnimation.duration
easing.type: Easing.OutBack
from: 0
to: -stack.width - AssistantWindowStyle.leftMargin
}
}
}
}
pragma Singleton
import QtQuick 2.7
// =============================================================================
QtObject {
property QtObject buttons: QtObject {
property int spacing: 10
}
}
......@@ -13,4 +13,8 @@ QtObject {
property int topMargin: 35
property int height: 480
property int width: 700
property QtObject stackAnimation: QtObject {
property int duration: 400
}
}
......@@ -4,20 +4,21 @@ module App.Styles
# Views styles -----------------------------------------------------------------
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
singleton AssistantHomeStyle 1.0 Assistant/AssistantHomeStyle.qml
singleton AssistantHomeStyle 1.0 Assistant/AssistantHomeStyle.qml
singleton AssistantAbstractViewStyle 1.0 Assistant/AssistantAbstractViewStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment