Reorder QML files to follow coding conventions
https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
@@ -7,7 +7,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId: ""
|
||||
property string roomId: ""
|
||||
property var preClearCallback: null
|
||||
|
@@ -8,14 +8,12 @@ import "../PythonBridge"
|
||||
PasswordPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId
|
||||
property var deviceIds // array
|
||||
property var deletedCallback: null
|
||||
|
||||
property Future deleteFuture: null
|
||||
|
||||
|
||||
function verifyPassword(pass, callback) {
|
||||
deleteFuture = py.callClientCoro(
|
||||
userId,
|
||||
@@ -35,6 +33,7 @@ PasswordPopup {
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
summary.text:
|
||||
qsTr("Enter your account's password to continue:")
|
||||
|
||||
|
@@ -7,14 +7,12 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId: ""
|
||||
property string roomId: ""
|
||||
property string roomName: ""
|
||||
|
||||
property bool canDestroy: false
|
||||
|
||||
|
||||
function forget() {
|
||||
py.callClientCoro(userId, "room_forget", [roomId], () => {
|
||||
if (window.uiState.page === "Pages/Chat/Chat.qml" &&
|
||||
@@ -49,7 +47,6 @@ HFlickableColumnPopup {
|
||||
onOpened: forgetButton.forceActiveFocus()
|
||||
onClosed: if (canDestroy) Qt.callLater(popup.destroy)
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text: qsTr("Leave <i>%1</i> and lose the history?").arg(roomName)
|
||||
textFormat: Text.StyledText
|
||||
|
@@ -6,8 +6,8 @@ import "../Base"
|
||||
HPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
default property alias pageData: page.columnData
|
||||
|
||||
readonly property alias page: page
|
||||
|
||||
signal keyboardAccept()
|
||||
|
@@ -6,8 +6,8 @@ import "../Base"
|
||||
HPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
default property alias pageData: page.columnData
|
||||
|
||||
readonly property alias page: page
|
||||
|
||||
signal keyboardAccept()
|
||||
|
@@ -9,7 +9,6 @@ import "../Base/Buttons"
|
||||
HColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId
|
||||
property string roomId
|
||||
property string roomName
|
||||
@@ -19,7 +18,6 @@ HColumnPopup {
|
||||
property var successfulInvites: []
|
||||
property var failedInvites: []
|
||||
|
||||
|
||||
function invite() {
|
||||
inviteButton.loading = true
|
||||
|
||||
@@ -67,7 +65,6 @@ HColumnPopup {
|
||||
onInvitingAllowedChanged:
|
||||
if (! invitingAllowed && inviteFuture) inviteFuture.cancel()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text: qsTr("Invite members to <i>%1</i>").arg(roomName)
|
||||
textFormat: Text.StyledText
|
||||
@@ -89,16 +86,6 @@ HColumnPopup {
|
||||
|
||||
HLabel {
|
||||
id: errorMessage
|
||||
visible: Layout.maximumHeight > 0
|
||||
wrapMode: Text.Wrap
|
||||
color: theme.colors.errorText
|
||||
text:
|
||||
invitingAllowed ?
|
||||
allErrors :
|
||||
qsTr("You do not have permission to invite members to this room")
|
||||
|
||||
Layout.maximumHeight: text ? implicitHeight : 0
|
||||
Layout.fillWidth: true
|
||||
|
||||
readonly property string allErrors: {
|
||||
// TODO: handle these: real user not found
|
||||
@@ -142,6 +129,17 @@ HColumnPopup {
|
||||
return lines.join("\n\n")
|
||||
}
|
||||
|
||||
visible: Layout.maximumHeight > 0
|
||||
wrapMode: Text.Wrap
|
||||
color: theme.colors.errorText
|
||||
text:
|
||||
invitingAllowed ?
|
||||
allErrors :
|
||||
qsTr("You do not have permission to invite members to this room")
|
||||
|
||||
Layout.maximumHeight: text ? implicitHeight : 0
|
||||
Layout.fillWidth: true
|
||||
|
||||
Behavior on Layout.maximumHeight { HNumberAnimation {} }
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string deviceOwner
|
||||
property string deviceId
|
||||
property string deviceName
|
||||
@@ -76,6 +75,8 @@ HFlickableColumnPopup {
|
||||
}
|
||||
|
||||
HTextArea {
|
||||
id: infoArea
|
||||
|
||||
function formatInfo(info, value) {
|
||||
return (
|
||||
`<p style="line-height: 115%">` +
|
||||
@@ -86,7 +87,6 @@ HFlickableColumnPopup {
|
||||
)
|
||||
}
|
||||
|
||||
id: infoArea
|
||||
readOnly: true
|
||||
wrapMode: HSelectableLabel.Wrap
|
||||
textFormat: Qt.RichText
|
||||
|
@@ -7,7 +7,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId: ""
|
||||
property string roomId: ""
|
||||
property string roomName: ""
|
||||
@@ -33,7 +32,6 @@ HFlickableColumnPopup {
|
||||
|
||||
onOpened: leaveButton.forceActiveFocus()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text: qsTr("Leave <i>%1</i>?").arg(roomName)
|
||||
textFormat: Text.StyledText
|
||||
|
@@ -8,7 +8,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property bool validateWhileTyping: false
|
||||
|
||||
property string acceptedPassword: ""
|
||||
@@ -21,7 +20,6 @@ HFlickableColumnPopup {
|
||||
|
||||
signal cancelled()
|
||||
|
||||
|
||||
function verifyPassword(pass, callback) {
|
||||
// Can be reimplemented when using this component.
|
||||
// Pass to the callback true on success, false on invalid password,
|
||||
@@ -77,7 +75,6 @@ HFlickableColumnPopup {
|
||||
onOpened: passwordField.forceActiveFocus()
|
||||
onKeyboardAccept: popup.validate()
|
||||
|
||||
|
||||
SummaryLabel { id: summary }
|
||||
|
||||
DetailsLabel { id: details }
|
||||
|
@@ -8,7 +8,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string preferUserId: ""
|
||||
property string roomId: ""
|
||||
|
||||
@@ -16,7 +15,6 @@ HFlickableColumnPopup {
|
||||
property bool onlyOwnMessageWarning: false
|
||||
property bool isLast: false
|
||||
|
||||
|
||||
function remove() {
|
||||
const idsForSender = {} // {senderId: [event.id, ...]}
|
||||
|
||||
@@ -53,7 +51,6 @@ HFlickableColumnPopup {
|
||||
onOpened: reasonField.item.forceActiveFocus()
|
||||
onKeyboardAccept: popup.remove()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text:
|
||||
isLast ?
|
||||
|
@@ -8,7 +8,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId
|
||||
property string roomId
|
||||
property string targetUserId
|
||||
@@ -50,7 +49,6 @@ HFlickableColumnPopup {
|
||||
onOpened: reasonField.item.forceActiveFocus()
|
||||
onKeyboardAccept: popup.remove()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
textFormat: Text.StyledText
|
||||
text:
|
||||
|
@@ -8,7 +8,6 @@ import "../Base/Buttons"
|
||||
HFlickableColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string userId: ""
|
||||
|
||||
|
||||
@@ -54,7 +53,6 @@ HFlickableColumnPopup {
|
||||
|
||||
onOpened: exportButton.forceActiveFocus()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text: qsTr("Backup your decryption keys before signing out?")
|
||||
}
|
||||
|
@@ -9,7 +9,6 @@ import "../Base/Buttons"
|
||||
HColumnPopup {
|
||||
id: popup
|
||||
|
||||
|
||||
property string errorType
|
||||
property string message: ""
|
||||
property string traceback: ""
|
||||
@@ -31,7 +30,6 @@ HColumnPopup {
|
||||
|
||||
onOpened: cancelButton.forceActiveFocus()
|
||||
|
||||
|
||||
SummaryLabel {
|
||||
text: qsTr("Unexpected error occured: <i>%1</i>").arg(errorType)
|
||||
textFormat: Text.StyledText
|
||||
|
Reference in New Issue
Block a user