Adding stub server list and using responsive pane #324
|
@ -453,6 +453,18 @@
|
|||
<extracomment>0 profiles loaded with that password</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="120"/>
|
||||
<source>your-profiles</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="147"/>
|
||||
<source>your-servers</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="65"/>
|
||||
<source>unlock</source>
|
||||
|
|
Binary file not shown.
|
@ -545,6 +545,18 @@ Right-click to reset.</translation>
|
|||
<extracomment>0 profiles loaded with that password</extracomment>
|
||||
<translation>0 profiles loaded with that password</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="120"/>
|
||||
<source>your-profiles</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation>Your Profiles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="147"/>
|
||||
<source>your-servers</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation>Your Servers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="65"/>
|
||||
<source>unlock</source>
|
||||
|
|
|
@ -453,6 +453,18 @@
|
|||
<extracomment>0 profiles loaded with that password</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="120"/>
|
||||
<source>your-profiles</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="147"/>
|
||||
<source>your-servers</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="65"/>
|
||||
<source>unlock</source>
|
||||
|
|
|
@ -453,6 +453,18 @@
|
|||
<extracomment>0 profiles loaded with that password</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="120"/>
|
||||
<source>your-profiles</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="147"/>
|
||||
<source>your-servers</source>
|
||||
<extracomment>Your Profiles</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/panes/ProfileManagerPane.qml" line="65"/>
|
||||
<source>unlock</source>
|
||||
|
|
|
@ -95,19 +95,62 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
|
||||
Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS
|
||||
color: Theme.backgroundMainColor
|
||||
width: thecol.width
|
||||
|
||||
Opaque.ResponsiveContainer {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: Layout.maximumWidth
|
||||
//Layout.maximumWidth: theStack.pane == theStack.emptyPane ? parent.width : 450
|
||||
|
||||
ProfileList {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: Theme.backgroundMainColor
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Opaque.ScalingLabel {
|
||||
id: profileLabel
|
||||
size: Theme.primaryTextSize
|
||||
font.family: Fonts.applicationFontRegular.name
|
||||
font.styleName: "Bold"
|
||||
|
||||
//: Your Profiles
|
||||
text: qsTr("your-profiles")
|
||||
}
|
||||
|
||||
ProfileList {
|
||||
anchors.top: profileLabel.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: Theme.backgroundMainColor
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Opaque.ScalingLabel {
|
||||
id: serverLabel
|
||||
size: Theme.primaryTextSize
|
||||
font.family: Fonts.applicationFontRegular.name
|
||||
font.styleName: "Bold"
|
||||
|
||||
//: Your Profiles
|
||||
text: qsTr("your-servers")
|
||||
}
|
||||
|
||||
ServerList {
|
||||
anchors.top: serverLabel.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
import QtGraphicalEffects 1.0
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Controls.Material 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import "../opaque" as Opaque
|
||||
import "../opaque/theme"
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: {
|
||||
forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
Opaque.Flickable { // Profile List
|
||||
id: sv
|
||||
Layout.minimumHeight: 100
|
||||
Layout.fillHeight: true
|
||||
Layout.minimumWidth: parent.width
|
||||
Layout.maximumWidth: parent.width
|
||||
contentWidth: colContacts.width
|
||||
contentHeight: colContacts.height
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
id: colContacts
|
||||
width: sv.width
|
||||
spacing: 0
|
||||
|
||||
Connections { // ADD/REMOVE CONTACT ENTRIES
|
||||
target: gcd
|
||||
|
||||
onAddProfile: function(handle, displayName, image, tag) {
|
||||
|
||||
// don't add duplicates
|
||||
for (var i = 0; i < profilesModel.count; i++) {
|
||||
if (profilesModel.get(i)["_handle"] == handle) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// find index for insert (sort by onion)
|
||||
var index = profilesModel.count
|
||||
for (var i = 0; i < profilesModel.count; i++) {
|
||||
if (profilesModel.get(i)["_handle"] > handle) {
|
||||
index = i
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
profilesModel.insert(index,
|
||||
{
|
||||
_handle: handle,
|
||||
_displayName: displayName,
|
||||
_image: image,
|
||||
_tag: tag,
|
||||
_status: 4,
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
onRemoveProfile: function(handle) {
|
||||
for(var i = 0; i < profilesModel.count; i++){
|
||||
if(profilesModel.get(i)["_handle"] == handle) {
|
||||
console.log("deleting contact " + profilesModel.get(i)["_handle"])
|
||||
profilesModel.remove(i)
|
||||
return
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
onResetProfileList: function() {
|
||||
profilesModel.clear()
|
||||
}
|
||||
}
|
||||
|
||||
ListModel { // Profile OBJECTS ARE STORED HERE ...
|
||||
id: profilesModel
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: profileList
|
||||
model: profilesModel // ... AND DISPLAYED HERE
|
||||
delegate: ProfileRow {
|
||||
handle: _handle
|
||||
displayName: _displayName
|
||||
image: _image
|
||||
tag: _tag
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
Opaque.PortraitRow {
|
||||
Layout.fillWidth: true
|
||||
handle: ""
|
||||
displayName: qsTr("add-new-profile-btn")
|
||||
nameColor: Theme.mainTextColor
|
||||
image: "/fontawesome/regular/user.svg"
|
||||
tag: ""
|
||||
portraitBorderColor: Theme.portraitOnlineBorderColor
|
||||
portraitColor: Theme.portraitOnlineBackgroundColor
|
||||
badgeVisible: true
|
||||
badgeContent: Image {
|
||||
source: gcd.assetPath + "/fontawesome/solid/plus.svg"
|
||||
height: Theme.badgeTextSize * gcd.themeScale
|
||||
width: height
|
||||
}
|
||||
badgeColor: Theme.defaultButtonColor
|
||||
|
||||
onClicked: function(handle) { profileAddEditPane.reset(); parentStack.pane = parentStack.addEditProfilePane }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue