parent
2b0af81139
commit
ce525890eb
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.13
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
import StatusQ.Core.Theme 0.1
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.14
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.14
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
@ -31,6 +31,11 @@ StatusMenu {
|
||||||
onTriggered: muteTriggered(Constants.MutingVariations.For8hr)
|
onTriggered: muteTriggered(Constants.MutingVariations.For8hr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusAction {
|
||||||
|
text: qsTr("For 24 hours")
|
||||||
|
onTriggered: muteTriggered(Constants.MutingVariations.For24hr)
|
||||||
|
}
|
||||||
|
|
||||||
StatusAction {
|
StatusAction {
|
||||||
text: qsTr("For 7 days")
|
text: qsTr("For 7 days")
|
||||||
onTriggered: muteTriggered(Constants.MutingVariations.For1week)
|
onTriggered: muteTriggered(Constants.MutingVariations.For1week)
|
||||||
|
|
|
@ -54,6 +54,15 @@ StatusMenu {
|
||||||
onTriggered: root.displayProfilePopup(root.chatId)
|
onTriggered: root.displayProfilePopup(root.chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusAction {
|
||||||
|
text: qsTr("View Members")
|
||||||
|
icon.name: "group-chat"
|
||||||
|
enabled: root.chatType === Constants.chatType.privateGroupChat
|
||||||
|
onTriggered: {
|
||||||
|
localAccountSensitiveSettings.expandUsersList = !localAccountSensitiveSettings.expandUsersList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StatusAction {
|
StatusAction {
|
||||||
text: root.amIChatAdmin ? qsTr("Add / remove from group") : qsTr("Add to group")
|
text: root.amIChatAdmin ? qsTr("Add / remove from group") : qsTr("Add to group")
|
||||||
icon.name: "add-to-dm"
|
icon.name: "add-to-dm"
|
||||||
|
@ -92,6 +101,7 @@ StatusMenu {
|
||||||
Component {
|
Component {
|
||||||
id: renameGroupPopupComponent
|
id: renameGroupPopupComponent
|
||||||
RenameGroupPopup {
|
RenameGroupPopup {
|
||||||
|
destroyOnClose: true
|
||||||
onUpdateGroupChatDetails: {
|
onUpdateGroupChatDetails: {
|
||||||
root.updateGroupChatDetails(root.chatId, groupName, groupColor, groupImage)
|
root.updateGroupChatDetails(root.chatId, groupName, groupColor, groupImage)
|
||||||
close()
|
close()
|
||||||
|
@ -126,7 +136,16 @@ StatusMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusAction {
|
||||||
|
objectName: "editChannelMenuItem"
|
||||||
|
text: qsTr("Edit Channel")
|
||||||
|
icon.name: "edit"
|
||||||
|
enabled: root.isCommunityChat && root.amIChatAdmin
|
||||||
|
onTriggered: {
|
||||||
|
root.displayEditChannelPopup(root.chatId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StatusMenu {
|
StatusMenu {
|
||||||
title: qsTr("Debug actions")
|
title: qsTr("Debug actions")
|
||||||
enabled: root.showDebugOptions
|
enabled: root.showDebugOptions
|
||||||
|
@ -147,16 +166,6 @@ StatusMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusAction {
|
|
||||||
objectName: "editChannelMenuItem"
|
|
||||||
text: qsTr("Edit Channel")
|
|
||||||
icon.name: "edit"
|
|
||||||
enabled: root.isCommunityChat && root.amIChatAdmin
|
|
||||||
onTriggered: {
|
|
||||||
root.displayEditChannelPopup(root.chatId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusAction {
|
StatusAction {
|
||||||
text: qsTr("Download")
|
text: qsTr("Download")
|
||||||
enabled: localAccountSensitiveSettings.downloadChannelMessagesEnabled
|
enabled: localAccountSensitiveSettings.downloadChannelMessagesEnabled
|
||||||
|
@ -165,15 +174,16 @@ StatusMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusMenuSeparator {
|
StatusMenuSeparator {
|
||||||
visible: clearHistoryMenuItem.enabled || deleteOrLeaveMenuItem.enabled
|
visible: clearHistoryGroupMenuItem.enabled || deleteOrLeaveMenuItem.enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusAction {
|
StatusAction {
|
||||||
id: clearHistoryMenuItem
|
id: clearHistoryGroupMenuItem
|
||||||
objectName: "clearHistoryMenuItem"
|
objectName: "clearHistoryGroupMenuItem"
|
||||||
|
enabled: (root.chatType !== Constants.chatType.oneToOne)
|
||||||
text: qsTr("Clear History")
|
text: qsTr("Clear History")
|
||||||
icon.name: "close-circle"
|
icon.name: "delete"
|
||||||
type: deleteOrLeaveMenuItem.enabled ? StatusAction.Type.Normal : StatusAction.Type.Danger
|
type: StatusAction.Type.Danger
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Global.openPopup(clearChatConfirmationDialogComponent);
|
Global.openPopup(clearChatConfirmationDialogComponent);
|
||||||
}
|
}
|
||||||
|
@ -193,7 +203,7 @@ StatusMenu {
|
||||||
qsTr("Close Chat") :
|
qsTr("Close Chat") :
|
||||||
qsTr("Leave Chat")
|
qsTr("Leave Chat")
|
||||||
}
|
}
|
||||||
icon.name: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? "delete" : "arrow-left"
|
icon.name: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? "close-circle" : "arrow-left"
|
||||||
icon.width: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? 18 : 14
|
icon.width: root.chatType === Constants.chatType.oneToOne || root.isCommunityChat ? 18 : 14
|
||||||
|
|
||||||
type: StatusAction.Type.Danger
|
type: StatusAction.Type.Danger
|
||||||
|
@ -208,6 +218,18 @@ StatusMenu {
|
||||||
enabled: !root.isCommunityChat || root.amIChatAdmin
|
enabled: !root.isCommunityChat || root.amIChatAdmin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatusAction {
|
||||||
|
id: clearHistoryMenuItem
|
||||||
|
objectName: "clearHistoryMenuItem"
|
||||||
|
enabled: (root.chatType === Constants.chatType.oneToOne)
|
||||||
|
text: qsTr("Clear History")
|
||||||
|
icon.name: "delete"
|
||||||
|
type: StatusAction.Type.Danger
|
||||||
|
onTriggered: {
|
||||||
|
Global.openPopup(clearChatConfirmationDialogComponent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: downloadDialog
|
id: downloadDialog
|
||||||
acceptLabel: qsTr("Save")
|
acceptLabel: qsTr("Save")
|
||||||
|
@ -226,8 +248,8 @@ StatusMenu {
|
||||||
ConfirmationDialog {
|
ConfirmationDialog {
|
||||||
confirmButtonObjectName: "clearChatConfirmationDialogClearButton"
|
confirmButtonObjectName: "clearChatConfirmationDialogClearButton"
|
||||||
headerSettings.title: qsTr("Clear chat history")
|
headerSettings.title: qsTr("Clear chat history")
|
||||||
confirmationText: qsTr("Are you sure you want to clear chat history for <b>%1</b>?").arg(root.chatName)
|
confirmationText: qsTr("Are you sure you want to clear your chat history with <b>%1</b>? All messages will be deleted on your side and will be unrecoverable.").arg(root.chatName)
|
||||||
confirmButtonLabel: qsTr("Clear")
|
confirmButtonLabel: qsTr("Clear chat history")
|
||||||
showCancelButton: true
|
showCancelButton: true
|
||||||
cancelBtnType: "normal"
|
cancelBtnType: "normal"
|
||||||
|
|
||||||
|
@ -278,7 +300,7 @@ StatusMenu {
|
||||||
confirmButtonLabel: root.isCommunityChat ? qsTr("Delete") : headerSettings.title
|
confirmButtonLabel: root.isCommunityChat ? qsTr("Delete") : headerSettings.title
|
||||||
confirmationText: root.isCommunityChat ? qsTr("Are you sure you want to delete #%1 channel?").arg(root.chatName) :
|
confirmationText: root.isCommunityChat ? qsTr("Are you sure you want to delete #%1 channel?").arg(root.chatName) :
|
||||||
root.chatType === Constants.chatType.oneToOne ?
|
root.chatType === Constants.chatType.oneToOne ?
|
||||||
qsTr("Are you sure you want to close this chat?"):
|
qsTr("Are you sure you want to close this chat? This will remove the chat from the list. Your chat history will be retained and shown the next time you message each other."):
|
||||||
qsTr("Are you sure you want to leave this chat?")
|
qsTr("Are you sure you want to leave this chat?")
|
||||||
showCancelButton: true
|
showCancelButton: true
|
||||||
cancelBtnType: "normal"
|
cancelBtnType: "normal"
|
||||||
|
|
|
@ -1385,7 +1385,8 @@ QtObject {
|
||||||
For1week = 4,
|
For1week = 4,
|
||||||
TillUnmuted = 5,
|
TillUnmuted = 5,
|
||||||
For1min = 6,
|
For1min = 6,
|
||||||
Unmuted = 7
|
Unmuted = 7,
|
||||||
|
For24hr = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
enum LinkPreviewType {
|
enum LinkPreviewType {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 970119af7812d24e67d046871eefba7eb60e9db4
|
Subproject commit 45c6a80c0a659e5c2ee004ea418fb7fce34d99e6
|
Loading…
Reference in New Issue