Add "Edit Account" interface skeleton
This commit is contained in:
		
							
								
								
									
										8
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								TODO.md
									
									
									
									
									
								
							@@ -1,13 +1,13 @@
 | 
				
			|||||||
 | 
					- Rename theme.bottomElementsHeight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Qt 5.12
 | 
					- Qt 5.12
 | 
				
			||||||
  - New input handlers
 | 
					  - New input handlers
 | 
				
			||||||
  - ECMAScript 7
 | 
					  - ECMAScript 7
 | 
				
			||||||
  - .mjs modules
 | 
					  - .mjs modules
 | 
				
			||||||
  - inset properties
 | 
					 | 
				
			||||||
  - `ToolTip.hide()`/`show()`
 | 
					 | 
				
			||||||
  - horizontal & vertical padding props
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Refactoring
 | 
					- Refactoring
 | 
				
			||||||
  - Don't bake in size properties for components
 | 
					  - Don't bake in size properties for components
 | 
				
			||||||
 | 
					  - Unfinished work in button-refactor branch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Bug fixes
 | 
					- Bug fixes
 | 
				
			||||||
  - Past events loading (limit 100) freezes the GUI - need to move upsert func
 | 
					  - Past events loading (limit 100) freezes the GUI - need to move upsert func
 | 
				
			||||||
@@ -19,7 +19,6 @@
 | 
				
			|||||||
  - "Rejoin" LeftBanner button if room is public
 | 
					  - "Rejoin" LeftBanner button if room is public
 | 
				
			||||||
  - Daybreak color
 | 
					  - Daybreak color
 | 
				
			||||||
  - Html links color
 | 
					  - Html links color
 | 
				
			||||||
  - [debug mode](https://docs.python.org/3/library/asyncio-dev.html)
 | 
					 | 
				
			||||||
  - `pyotherside.atexit()`
 | 
					  - `pyotherside.atexit()`
 | 
				
			||||||
  - Way to put sidepane back to auto-sizing (snap)
 | 
					  - Way to put sidepane back to auto-sizing (snap)
 | 
				
			||||||
  - Better look for arrows when sidepane collapsed
 | 
					  - Better look for arrows when sidepane collapsed
 | 
				
			||||||
@@ -57,6 +56,7 @@
 | 
				
			|||||||
  - Links preview
 | 
					  - Links preview
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Client improvements
 | 
					- Client improvements
 | 
				
			||||||
 | 
					  - [debug mode](https://docs.python.org/3/library/asyncio-dev.html)
 | 
				
			||||||
  - More intelligent thumbnails downloading for different sizes
 | 
					  - More intelligent thumbnails downloading for different sizes
 | 
				
			||||||
  - Filtering rooms: search more than display names?
 | 
					  - Filtering rooms: search more than display names?
 | 
				
			||||||
  - Initial sync filter and lazy load, see weechat-matrix `_handle_login()`
 | 
					  - Initial sync filter and lazy load, see weechat-matrix `_handle_login()`
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								src/qml/Pages/EditAccount/ClientSettings.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/qml/Pages/EditAccount/ClientSettings.qml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					// Copyright 2019 miruka
 | 
				
			||||||
 | 
					// This file is part of harmonyqml, licensed under LGPLv3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import QtQuick 2.12
 | 
				
			||||||
 | 
					import QtQuick.Controls 2.12
 | 
				
			||||||
 | 
					import QtQuick.Layouts 1.12
 | 
				
			||||||
 | 
					import "../../Base"
 | 
				
			||||||
 | 
					import "../../utils.js" as Utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HRectangle {
 | 
				
			||||||
 | 
					    HLabel {
 | 
				
			||||||
 | 
					        anchors.centerIn: parent
 | 
				
			||||||
 | 
					        text: "Client - TODO"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								src/qml/Pages/EditAccount/Devices.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/qml/Pages/EditAccount/Devices.qml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					// Copyright 2019 miruka
 | 
				
			||||||
 | 
					// This file is part of harmonyqml, licensed under LGPLv3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import QtQuick 2.12
 | 
				
			||||||
 | 
					import QtQuick.Controls 2.12
 | 
				
			||||||
 | 
					import QtQuick.Layouts 1.12
 | 
				
			||||||
 | 
					import "../../Base"
 | 
				
			||||||
 | 
					import "../../utils.js" as Utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HRectangle {
 | 
				
			||||||
 | 
					    HLabel {
 | 
				
			||||||
 | 
					        anchors.centerIn: parent
 | 
				
			||||||
 | 
					        text: "Devices - TODO"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										72
									
								
								src/qml/Pages/EditAccount/EditAccount.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/qml/Pages/EditAccount/EditAccount.qml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
				
			|||||||
 | 
					// Copyright 2019 miruka
 | 
				
			||||||
 | 
					// This file is part of harmonyqml, licensed under LGPLv3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import QtQuick 2.12
 | 
				
			||||||
 | 
					import QtQuick.Controls 2.12
 | 
				
			||||||
 | 
					import QtQuick.Layouts 1.12
 | 
				
			||||||
 | 
					import "../../Base"
 | 
				
			||||||
 | 
					import "../../utils.js" as Utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HRectangle {
 | 
				
			||||||
 | 
					    property string userId: ""
 | 
				
			||||||
 | 
					    readonly property var userInfo: users.find(userId)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    HColumnLayout {
 | 
				
			||||||
 | 
					        anchors.fill: parent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        HRowLayout {
 | 
				
			||||||
 | 
					            Layout.preferredHeight: theme.bottomElementsHeight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            HLabel {
 | 
				
			||||||
 | 
					                text: qsTr("Edit %1").arg(
 | 
				
			||||||
 | 
					                    Utils.coloredNameHtml(userInfo.displayName, userId)
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					                textFormat: Text.StyledText
 | 
				
			||||||
 | 
					                font.pixelSize: theme.fontSize.big
 | 
				
			||||||
 | 
					                elide: Text.ElideRight
 | 
				
			||||||
 | 
					                maximumLineCount: 1
 | 
				
			||||||
 | 
					                // visible: width > 50
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Layout.fillWidth: true
 | 
				
			||||||
 | 
					                Layout.maximumWidth: parent.width - tabBar.width
 | 
				
			||||||
 | 
					                Layout.leftMargin: 8
 | 
				
			||||||
 | 
					                Layout.rightMargin: Layout.leftMargin
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            TabBar {
 | 
				
			||||||
 | 
					                id: tabBar
 | 
				
			||||||
 | 
					                currentIndex: swipeView.currentIndex
 | 
				
			||||||
 | 
					                spacing: 0
 | 
				
			||||||
 | 
					                contentHeight: parent.height
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                TabButton {
 | 
				
			||||||
 | 
					                    text: qsTr("Profile")
 | 
				
			||||||
 | 
					                    width: implicitWidth * 1.25
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                TabButton {
 | 
				
			||||||
 | 
					                    text: qsTr("Devices")
 | 
				
			||||||
 | 
					                    width: implicitWidth * 1.25
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                TabButton {
 | 
				
			||||||
 | 
					                    text: qsTr("Harmony")
 | 
				
			||||||
 | 
					                    width: implicitWidth * 1.25
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SwipeView {
 | 
				
			||||||
 | 
					            id: swipeView
 | 
				
			||||||
 | 
					            clip: true
 | 
				
			||||||
 | 
					            currentIndex: tabBar.currentIndex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Layout.fillHeight: true
 | 
				
			||||||
 | 
					            Layout.fillWidth: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Profile {}
 | 
				
			||||||
 | 
					            Devices {}
 | 
				
			||||||
 | 
					            ClientSettings {}
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								src/qml/Pages/EditAccount/Profile.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/qml/Pages/EditAccount/Profile.qml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					// Copyright 2019 miruka
 | 
				
			||||||
 | 
					// This file is part of harmonyqml, licensed under LGPLv3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import QtQuick 2.12
 | 
				
			||||||
 | 
					import QtQuick.Controls 2.12
 | 
				
			||||||
 | 
					import QtQuick.Layouts 1.12
 | 
				
			||||||
 | 
					import "../../Base"
 | 
				
			||||||
 | 
					import "../../utils.js" as Utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HRectangle {
 | 
				
			||||||
 | 
					    HLabel {
 | 
				
			||||||
 | 
					        anchors.centerIn: parent
 | 
				
			||||||
 | 
					        text: "profile"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
// Copyright 2019 miruka
 | 
					// Copyright 2019 miruka
 | 
				
			||||||
// This file is part of harmonyqml, licensed under LGPLv3.
 | 
					// This file is part of harmonyqml, licensed under LGPLv3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import QtQuick 2.7
 | 
					import QtQuick 2.12
 | 
				
			||||||
import QtQuick.Layouts 1.3
 | 
					import QtQuick.Layouts 1.12
 | 
				
			||||||
import "../Base"
 | 
					import "../Base"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Column {
 | 
					Column {
 | 
				
			||||||
@@ -10,9 +10,14 @@ Column {
 | 
				
			|||||||
    width: parent.width
 | 
					    width: parent.width
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property var userInfo: users.find(model.userId)
 | 
					    property var userInfo: users.find(model.userId)
 | 
				
			||||||
 | 
					 | 
				
			||||||
    property bool expanded: true
 | 
					    property bool expanded: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    TapHandler {
 | 
				
			||||||
 | 
					        onTapped: pageStack.showPage(
 | 
				
			||||||
 | 
					            "EditAccount/EditAccount", { "userId": model.userId }
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    HHighlightRectangle {
 | 
					    HHighlightRectangle {
 | 
				
			||||||
        width: parent.width
 | 
					        width: parent.width
 | 
				
			||||||
        height: childrenRect.height
 | 
					        height: childrenRect.height
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ Item {
 | 
				
			|||||||
        target: py
 | 
					        target: py
 | 
				
			||||||
        onWillLoadAccounts: function(will) {
 | 
					        onWillLoadAccounts: function(will) {
 | 
				
			||||||
            pageStack.showPage(will ? "Default": "SignIn")
 | 
					            pageStack.showPage(will ? "Default": "SignIn")
 | 
				
			||||||
            // if (will) {initialRoomTimer.start()}
 | 
					            if (will) {initialRoomTimer.start()}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -86,12 +86,16 @@ Item {
 | 
				
			|||||||
            Timer {
 | 
					            Timer {
 | 
				
			||||||
                // TODO: remove this, debug
 | 
					                // TODO: remove this, debug
 | 
				
			||||||
                id: initialRoomTimer
 | 
					                id: initialRoomTimer
 | 
				
			||||||
                interval: 4000
 | 
					                interval: 2000
 | 
				
			||||||
                repeat: false
 | 
					                repeat: false
 | 
				
			||||||
                onTriggered: pageStack.showRoom(
 | 
					                // onTriggered: pageStack.showRoom(
 | 
				
			||||||
                    "@test_mary:matrix.org",
 | 
					                    // "@test_mary:matrix.org",
 | 
				
			||||||
                    "Rooms",
 | 
					                    // "Rooms",
 | 
				
			||||||
                    "!TSXGsbBbdwsdylIOJZ:matrix.org"
 | 
					                    // "!TSXGsbBbdwsdylIOJZ:matrix.org"
 | 
				
			||||||
 | 
					                // )
 | 
				
			||||||
 | 
					                onTriggered: pageStack.showPage(
 | 
				
			||||||
 | 
					                    "EditAccount/EditAccount",
 | 
				
			||||||
 | 
					                    {"userId": "@test_mary:matrix.org"}
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user