chore: cleanup, fix warning, remove dead code
This commit is contained in:
parent
2681542a98
commit
54c73b0be7
|
@ -1,15 +1,12 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.14
|
||||
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
StatusBaseText {
|
||||
id: timestampLabe;
|
||||
property alias tooltip: tooltip
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: Theme.palette.baseColor1
|
||||
font.pixelSize: 10
|
||||
visible: !!text
|
||||
|
|
|
@ -96,27 +96,19 @@ Item {
|
|||
StatusButton {
|
||||
visible: (root.panelType === CommunityMembersTabPanel.TabType.BannedMembers) && isHovered && canBeBanned
|
||||
text: qsTr("Unban")
|
||||
type: StatusBaseButton.Type.Normal
|
||||
size: StatusBaseButton.Size.Large
|
||||
onClicked: root.unbanUserClicked(model.pubKey)
|
||||
width: 95
|
||||
height: 44
|
||||
},
|
||||
|
||||
StatusButton {
|
||||
visible: (root.panelType === CommunityMembersTabPanel.TabType.PendingRequests ||
|
||||
root.panelType === CommunityMembersTabPanel.TabType.DeclinedRequests) && isHovered
|
||||
text: qsTr("Accept")
|
||||
type: StatusBaseButton.Type.Normal
|
||||
size: StatusBaseButton.Size.Large
|
||||
icon.name: "checkmark-circle"
|
||||
icon.color: Theme.palette.successColor1
|
||||
normalColor: Theme.palette.successColor2
|
||||
hoverColor: Theme.palette.successColor3
|
||||
textColor: Theme.palette.successColor1
|
||||
onClicked: root.acceptRequestToJoin(model.requestToJoinId)
|
||||
width: 124
|
||||
height: 44
|
||||
},
|
||||
|
||||
StatusButton {
|
||||
|
@ -126,8 +118,6 @@ Item {
|
|||
icon.name: "close-circle"
|
||||
icon.color: Style.current.danger
|
||||
onClicked: root.declineRequestToJoin(model.requestToJoinId)
|
||||
width: 118
|
||||
height: 44
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ StatusModal {
|
|||
property bool isEdit: false
|
||||
|
||||
readonly property int maxCategoryNameLength: 24
|
||||
readonly property var categoryNameValidator: Utils.Validate.NoEmpty
|
||||
| Utils.Validate.TextLength
|
||||
|
||||
onOpened: {
|
||||
if(isEdit){
|
||||
|
@ -138,7 +136,7 @@ StatusModal {
|
|||
components: [
|
||||
StatusCheckBox {
|
||||
id: channelItemCheckbox
|
||||
checked: root.isEdit ? model.categoryId == root.categoryId : false
|
||||
checked: root.isEdit ? model.categoryId === root.categoryId : false
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
var idx = root.channels.indexOf(model.itemId)
|
||||
|
|
|
@ -155,7 +155,7 @@ StatusPopupMenu {
|
|||
|
||||
StatusMenuItem {
|
||||
objectName: "clearHistoryMenuItem"
|
||||
text: qsTr("Clear history")
|
||||
text: qsTr("Clear History")
|
||||
icon.name: "close-circle"
|
||||
onTriggered: {
|
||||
root.clearChatHistory(root.chatId)
|
||||
|
@ -225,12 +225,11 @@ StatusPopupMenu {
|
|||
return qsTr("Leave group")
|
||||
}
|
||||
return root.chatType === Constants.chatType.oneToOne ?
|
||||
qsTr("Delete chat") :
|
||||
qsTr("Leave chat")
|
||||
qsTr("Delete Chat") :
|
||||
qsTr("Leave Chat")
|
||||
}
|
||||
icon.name: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? "delete" : "arrow-right"
|
||||
icon.name: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? "delete" : "arrow-left"
|
||||
icon.width: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? 18 : 14
|
||||
iconRotation: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? 0 : 180
|
||||
|
||||
type: StatusMenuItem.Type.Danger
|
||||
onTriggered: {
|
||||
|
|
|
@ -51,19 +51,19 @@ Item {
|
|||
Connections {
|
||||
target: root.messageStore.messageModule
|
||||
|
||||
onMessageSuccessfullySent: {
|
||||
function onMessageSuccessfullySent() {
|
||||
chatLogView.scrollToBottom(true)
|
||||
}
|
||||
|
||||
onSendingMessageFailed: {
|
||||
sendingMsgFailedPopup.open();
|
||||
function onSendingMessageFailed() {
|
||||
sendingMsgFailedPopup.open()
|
||||
}
|
||||
|
||||
onScrollMessagesUp: {
|
||||
function onScrollMessagesUp() {
|
||||
chatLogView.positionViewAtEnd()
|
||||
}
|
||||
|
||||
onScrollToMessage: {
|
||||
function onScrollToMessage(messageIndex) {
|
||||
chatLogView.positionViewAtIndex(messageIndex, ListView.Center);
|
||||
chatLogView.itemAtIndex(messageIndex).startMessageFoundAnimation();
|
||||
}
|
||||
|
|
|
@ -814,7 +814,7 @@ Item {
|
|||
|
||||
Connections {
|
||||
target: mainModule
|
||||
onActiveSectionChanged: {
|
||||
function onActiveSectionChanged() {
|
||||
Global.closeCreateChatView()
|
||||
}
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ Item {
|
|||
|
||||
Connections {
|
||||
target: rootStore.mainModuleInst
|
||||
onMailserverNotWorking: {
|
||||
function onMailserverNotWorking() {
|
||||
if (!appLayout.mailserverNotWorkingPopup) {
|
||||
appLayout.mailserverNotWorkingPopup = Global.openPopup(mailserverNotWorkingPopupComponent);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtGraphicalEffects 1.13
|
||||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
|
@ -45,7 +43,6 @@ StatusModal {
|
|||
StatusBaseText {
|
||||
id: descriptionText
|
||||
text: qsTr("Nicknames help you identify others in Status. Only you can see the nicknames you’ve added")
|
||||
font.pixelSize: 15
|
||||
wrapMode: Text.WordWrap
|
||||
color: Theme.palette.baseColor1
|
||||
width: parent.width
|
||||
|
|
|
@ -61,7 +61,7 @@ StatusPopupMenu {
|
|||
readonly property bool isContact: {
|
||||
return root.selectedUserPublicKey !== "" && !!contactDetails.isContact
|
||||
}
|
||||
readonly property bool isBlockedContact: d.contactDetails && d.contactDetails.isBlocked
|
||||
readonly property bool isBlockedContact: !!d.contactDetails && d.contactDetails.isBlocked
|
||||
|
||||
readonly property int outgoingVerificationStatus: {
|
||||
if (root.selectedUserPublicKey === "" || root.isMe || !root.isContact) {
|
||||
|
|
|
@ -278,7 +278,7 @@ Loader {
|
|||
Connections {
|
||||
enabled: d.isMessageActive
|
||||
target: root.messageContextMenu
|
||||
onClosed: {
|
||||
function onClosed() {
|
||||
d.setMessageActive(root.messageId, false)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue