parent
b1259a83f4
commit
b6ff7b9ded
|
@ -1 +1 @@
|
|||
Subproject commit 80a9cc9b3face23df65e7630afe5339a8acf8072
|
||||
Subproject commit ecc44cfae0f3c06cad5e3f3d7c94f4d1488fdf9b
|
|
@ -7,9 +7,10 @@ import Qt.labs.settings 1.0
|
|||
import QtQuick.Controls.Styles 1.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import StatusQ.Layout 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
|
||||
import shared 1.0
|
||||
import shared.status 1.0
|
||||
import shared.popups 1.0
|
||||
|
@ -22,17 +23,13 @@ import "stores"
|
|||
|
||||
// Code based on https://code.qt.io/cgit/qt/qtwebengine.git/tree/examples/webengine/quicknanobrowser/BrowserWindow.qml?h=5.15
|
||||
// Licensed under BSD
|
||||
Rectangle {
|
||||
id: browserWindow
|
||||
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
property var globalStore
|
||||
property var sendTransactionModal
|
||||
|
||||
function openUrlInNewTab(url) {
|
||||
var tab = _internal.addNewTab()
|
||||
tab.item.url = _internal.determineRealURL(url)
|
||||
}
|
||||
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
QtObject {
|
||||
id: _internal
|
||||
|
||||
|
@ -57,9 +54,9 @@ Rectangle {
|
|||
// TODO we'll need a new dialog at one point because this one is not using the same call, but it's good for now
|
||||
property Component sendTransactionModalComponent: SignTransactionModal {
|
||||
anchors.centerIn: parent
|
||||
store: browserWindow.globalStore
|
||||
contactsStore: browserWindow.globalStore.profileSectionStore.contactsStore
|
||||
chainId: browserWindow.globalStore.getChainIdForBrowser()
|
||||
store: root.globalStore
|
||||
contactsStore: root.globalStore.profileSectionStore.contactsStore
|
||||
chainId: root.globalStore.getChainIdForBrowser()
|
||||
}
|
||||
|
||||
property Component signMessageModalComponent: SignMessageModal {}
|
||||
|
@ -139,19 +136,24 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
centerPanel: Rectangle {
|
||||
id: browserWindow
|
||||
anchors.fill: parent
|
||||
color: Style.current.inputBackground
|
||||
border.width: 0
|
||||
|
||||
|
||||
function openUrlInNewTab(url) {
|
||||
var tab = _internal.addNewTab()
|
||||
tab.item.url = _internal.determineRealURL(url)
|
||||
}
|
||||
|
||||
WebProviderObj {
|
||||
id: provider
|
||||
createAccessDialogComponent: function() {
|
||||
return _internal.accessDialogComponent.createObject(browserWindow)
|
||||
return _internal.accessDialogComponent.createObject(root)
|
||||
}
|
||||
createSendTransactionModalComponent: function(request) {
|
||||
return _internal.sendTransactionModalComponent.createObject(browserWindow, {
|
||||
return _internal.sendTransactionModalComponent.createObject(root, {
|
||||
trxData: request.payload.params[0].data || "",
|
||||
selectedAccount: {
|
||||
name: WalletStore.dappBrowserAccount.name,
|
||||
|
@ -175,7 +177,7 @@ Rectangle {
|
|||
})
|
||||
}
|
||||
createSignMessageModalComponent: function(request) {
|
||||
return _internal.signMessageModalComponent.createObject(browserWindow, {
|
||||
return _internal.signMessageModalComponent.createObject(root, {
|
||||
request,
|
||||
selectedAccount: {
|
||||
name: WalletStore.dappBrowserAccount.name,
|
||||
|
@ -318,11 +320,6 @@ Rectangle {
|
|||
z: 100
|
||||
}
|
||||
|
||||
Component {
|
||||
id: addFavoriteModal
|
||||
AddFavoriteModal {}
|
||||
}
|
||||
|
||||
FavoriteMenu {
|
||||
id: favoriteMenu
|
||||
openInNewTab: function (url) {
|
||||
|
@ -335,36 +332,6 @@ Rectangle {
|
|||
ogName: favoriteMenu.currentFavorite ? favoriteMenu.currentFavorite.name : _internal.currentWebView.title})
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
id: sslDialog
|
||||
|
||||
property var certErrors: []
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.No | StandardButton.Yes
|
||||
title: qsTr("Server's certificate not trusted")
|
||||
text: qsTr("Do you wish to continue?")
|
||||
detailedText: qsTr("If you wish so, you may continue with an unverified certificate. Accepting an unverified certificate means you may not be connected with the host you tried to connect to.\nDo you wish to override the security check and continue?")
|
||||
onYes: {
|
||||
certErrors.shift().ignoreCertificateError();
|
||||
presentError();
|
||||
}
|
||||
onNo: reject()
|
||||
onRejected: reject()
|
||||
|
||||
function reject(){
|
||||
certErrors.shift().rejectCertificate();
|
||||
presentError();
|
||||
}
|
||||
function enqueue(error){
|
||||
certErrors.push(error);
|
||||
presentError();
|
||||
}
|
||||
function presentError(){
|
||||
visible = certErrors.length > 0
|
||||
}
|
||||
}
|
||||
|
||||
DownloadBar {
|
||||
id: downloadBar
|
||||
anchors.bottom: parent.bottom
|
||||
|
@ -494,6 +461,41 @@ Rectangle {
|
|||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: addFavoriteModal
|
||||
AddFavoriteModal {}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
id: sslDialog
|
||||
|
||||
property var certErrors: []
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.No | StandardButton.Yes
|
||||
title: qsTr("Server's certificate not trusted")
|
||||
text: qsTr("Do you wish to continue?")
|
||||
detailedText: qsTr("If you wish so, you may continue with an unverified certificate. Accepting an unverified certificate means you may not be connected with the host you tried to connect to.\nDo you wish to override the security check and continue?")
|
||||
onYes: {
|
||||
certErrors.shift().ignoreCertificateError();
|
||||
presentError();
|
||||
}
|
||||
onNo: reject()
|
||||
onRejected: reject()
|
||||
|
||||
function reject(){
|
||||
certErrors.shift().rejectCertificate();
|
||||
presentError();
|
||||
}
|
||||
function enqueue(error){
|
||||
certErrors.push(error);
|
||||
presentError();
|
||||
}
|
||||
function presentError(){
|
||||
visible = certErrors.length > 0
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
id: historyMenu
|
||||
|
@ -588,7 +590,7 @@ Rectangle {
|
|||
}
|
||||
onJavaScriptDialogRequested: function(request) {
|
||||
request.accepted = true;
|
||||
var dialog = _internal.jsDialogComponent.createObject(browserWindow, {"request": request});
|
||||
var dialog = _internal.jsDialogComponent.createObject(root, {"request": request});
|
||||
dialog.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import "../../Wallet"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
|
||||
// Important: we have parent module in this context only cause qml components
|
||||
// don't follow struct we have on the backend.
|
||||
|
@ -214,8 +213,6 @@ Item {
|
|||
|
||||
sourceComponent: ChatContentView {
|
||||
visible: !root.rootStore.openCreateChat && isActiveChannel
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
clip: true
|
||||
rootStore: root.rootStore
|
||||
contactsStore: root.contactsStore
|
||||
|
@ -227,15 +224,10 @@ Item {
|
|||
stickersLoaded: root.stickersLoaded
|
||||
isBlocked: model.blocked
|
||||
isActiveChannel: categoryChatLoader.isActiveChannel
|
||||
activityCenterVisible: Global.activityCenterPopupOpened
|
||||
activityCenterNotificationsCount: root.rootStore.unreadNotificationsCount
|
||||
pinnedMessagesPopupComponent: root.pinnedMessagesListPopupComponent
|
||||
onOpenStickerPackPopup: {
|
||||
root.openStickerPackPopup(stickerPackId)
|
||||
}
|
||||
onNotificationButtonClicked: {
|
||||
Global.openActivityCenterPopup()
|
||||
}
|
||||
onOpenAppSearch: {
|
||||
root.openAppSearch();
|
||||
}
|
||||
|
@ -271,8 +263,6 @@ Item {
|
|||
|
||||
sourceComponent: ChatContentView {
|
||||
visible: !root.rootStore.openCreateChat && isActiveChannel
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
clip: true
|
||||
rootStore: root.rootStore
|
||||
contactsStore: root.contactsStore
|
||||
|
@ -284,15 +274,10 @@ Item {
|
|||
stickersLoaded: root.stickersLoaded
|
||||
isBlocked: model.blocked
|
||||
isActiveChannel: chatLoader.isActiveChannel
|
||||
activityCenterVisible: Global.activityCenterPopupOpened
|
||||
activityCenterNotificationsCount: root.rootStore.unreadNotificationsCount
|
||||
pinnedMessagesPopupComponent: root.pinnedMessagesListPopupComponent
|
||||
onOpenStickerPackPopup: {
|
||||
root.openStickerPackPopup(stickerPackId)
|
||||
}
|
||||
onNotificationButtonClicked: {
|
||||
Global.openActivityCenterPopup()
|
||||
}
|
||||
onOpenAppSearch: {
|
||||
root.openAppSearch();
|
||||
}
|
||||
|
|
|
@ -37,8 +37,6 @@ ColumnLayout {
|
|||
property bool isActiveChannel: false
|
||||
property bool isConnected: false
|
||||
property var emojiPopup
|
||||
property bool activityCenterVisible: false
|
||||
property int activityCenterNotificationsCount
|
||||
property alias textInputField: chatInput
|
||||
property UsersStore usersStore: UsersStore {}
|
||||
property Component pinnedMessagesPopupComponent
|
||||
|
@ -48,7 +46,6 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
signal openAppSearch()
|
||||
signal notificationButtonClicked()
|
||||
signal openStickerPackPopup(string stickerPackId)
|
||||
|
||||
property Component sendTransactionNoEnsModal
|
||||
|
@ -67,250 +64,6 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: { topBar.toolbarComponent = statusChatInfoButton }
|
||||
|
||||
// Chat toolbar content option 1:
|
||||
Component {
|
||||
id: statusChatInfoButton
|
||||
|
||||
StatusChatInfoButton {
|
||||
objectName: "chatInfoBtnInHeader"
|
||||
width: Math.min(implicitWidth, parent.width)
|
||||
title: chatContentModule? chatContentModule.chatDetails.name : ""
|
||||
subTitle: {
|
||||
if(!chatContentModule)
|
||||
return ""
|
||||
|
||||
// In some moment in future this should be part of the backend logic.
|
||||
// (once we add transaltion on the backend side)
|
||||
switch (chatContentModule.chatDetails.type) {
|
||||
case Constants.chatType.oneToOne:
|
||||
return (chatContentModule.isMyContact(chatContentModule.chatDetails.id) ?
|
||||
qsTr("Contact") :
|
||||
qsTr("Not a contact"))
|
||||
case Constants.chatType.publicChat:
|
||||
return qsTr("Public chat")
|
||||
case Constants.chatType.privateGroupChat:
|
||||
const cnt = root.usersStore.usersModule.model.count
|
||||
return qsTr("%n members(s)", "", cnt)
|
||||
case Constants.chatType.communityChat:
|
||||
return StatusQUtils.Utils.linkifyAndXSS(chatContentModule.chatDetails.description).trim()
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
image.source: chatContentModule? chatContentModule.chatDetails.icon : ""
|
||||
ringSettings.ringSpecModel: chatContentModule && chatContentModule.chatDetails.type === Constants.chatType.oneToOne ?
|
||||
Utils.getColorHashAsJson(chatContentModule.chatDetails.id) : ""
|
||||
icon.color: chatContentModule?
|
||||
chatContentModule.chatDetails.type === Constants.chatType.oneToOne ?
|
||||
Utils.colorForPubkey(chatContentModule.chatDetails.id)
|
||||
: chatContentModule.chatDetails.color
|
||||
: ""
|
||||
icon.emoji: chatContentModule? chatContentModule.chatDetails.emoji : ""
|
||||
icon.emojiSize: "24x24"
|
||||
type: chatContentModule? chatContentModule.chatDetails.type : Constants.chatType.unknown
|
||||
pinnedMessagesCount: chatContentModule? chatContentModule.pinnedMessagesModel.count : 0
|
||||
muted: chatContentModule? chatContentModule.chatDetails.muted : false
|
||||
|
||||
onPinnedMessagesCountClicked: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on open pinned messages - chat content module is not set")
|
||||
return
|
||||
}
|
||||
Global.openPopup(pinnedMessagesPopupComponent, {
|
||||
store: rootStore,
|
||||
messageStore: messageStore,
|
||||
pinnedMessagesModel: chatContentModule.pinnedMessagesModel,
|
||||
messageToPin: ""
|
||||
})
|
||||
}
|
||||
onUnmute: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on unmute chat - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.unmuteChat()
|
||||
}
|
||||
|
||||
sensor.enabled: {
|
||||
if(!chatContentModule)
|
||||
return false
|
||||
|
||||
return chatContentModule.chatDetails.type !== Constants.chatType.publicChat &&
|
||||
chatContentModule.chatDetails.type !== Constants.chatType.communityChat
|
||||
}
|
||||
onClicked: {
|
||||
switch (chatContentModule.chatDetails.type) {
|
||||
case Constants.chatType.privateGroupChat:
|
||||
Global.openPopup(root.rootStore.groupInfoPopupComponent, {
|
||||
chatContentModule: chatContentModule,
|
||||
chatDetails: chatContentModule.chatDetails
|
||||
})
|
||||
break;
|
||||
case Constants.chatType.oneToOne:
|
||||
Global.openProfilePopup(chatContentModule.chatDetails.id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Chat toolbar content option 2:
|
||||
Component {
|
||||
id: contactsSelector
|
||||
GroupChatPanel {
|
||||
sectionModule: root.chatSectionModule
|
||||
chatContentModule: root.chatContentModule
|
||||
rootStore: root.rootStore
|
||||
maxHeight: root.height
|
||||
|
||||
onPanelClosed: topBar.toolbarComponent = statusChatInfoButton
|
||||
}
|
||||
}
|
||||
|
||||
StatusChatToolBar {
|
||||
id: topBar
|
||||
z: parent.z + 1
|
||||
Layout.fillWidth: true
|
||||
toolbarComponent: statusChatInfoButton
|
||||
|
||||
membersButton.visible: {
|
||||
if(!chatContentModule || chatContentModule.chatDetails.type === Constants.chatType.publicChat)
|
||||
return false
|
||||
|
||||
return localAccountSensitiveSettings.showOnlineUsers &&
|
||||
chatContentModule.chatDetails.isUsersListAvailable
|
||||
}
|
||||
membersButton.highlighted: localAccountSensitiveSettings.expandUsersList
|
||||
notificationButton.tooltip.offset: localAccountSensitiveSettings.expandUsersList && membersButton.visible ? 0 : 14
|
||||
|
||||
notificationCount: root.activityCenterNotificationsCount
|
||||
|
||||
onSearchButtonClicked: root.openAppSearch()
|
||||
|
||||
onMembersButtonClicked: localAccountSensitiveSettings.expandUsersList = !localAccountSensitiveSettings.expandUsersList
|
||||
notificationButton.highlighted: root.activityCenterVisible
|
||||
onNotificationButtonClicked: root.notificationButtonClicked()
|
||||
|
||||
popupMenu: ChatContextMenuView {
|
||||
objectName: "moreOptionsContextMenu"
|
||||
emojiPopup: root.emojiPopup
|
||||
openHandler: function () {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on open chat context menu handler - chat content module is not set")
|
||||
return
|
||||
}
|
||||
currentFleet = chatContentModule.getCurrentFleet()
|
||||
isCommunityChat = chatContentModule.chatDetails.belongsToCommunity
|
||||
amIChatAdmin = chatContentModule.amIChatAdmin()
|
||||
chatId = chatContentModule.chatDetails.id
|
||||
chatName = chatContentModule.chatDetails.name
|
||||
chatDescription = chatContentModule.chatDetails.description
|
||||
chatEmoji = chatContentModule.chatDetails.emoji
|
||||
chatColor = chatContentModule.chatDetails.color
|
||||
chatIcon = chatContentModule.chatDetails.icon
|
||||
chatType = chatContentModule.chatDetails.type
|
||||
chatMuted = chatContentModule.chatDetails.muted
|
||||
channelPosition = chatContentModule.chatDetails.position
|
||||
}
|
||||
|
||||
onMuteChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on mute chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.muteChat()
|
||||
}
|
||||
|
||||
onUnmuteChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on unmute chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.unmuteChat()
|
||||
}
|
||||
|
||||
onMarkAllMessagesRead: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on mark all messages read from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.markAllMessagesRead()
|
||||
}
|
||||
|
||||
onClearChatHistory: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on clear chat history from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.clearChatHistory()
|
||||
}
|
||||
|
||||
onRequestAllHistoricMessages: {
|
||||
// Not Refactored Yet - Check in the `master` branch if this is applicable here.
|
||||
}
|
||||
|
||||
onLeaveChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on leave chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.leaveChat()
|
||||
}
|
||||
|
||||
onDeleteCommunityChat: root.rootStore.removeCommunityChat(chatId)
|
||||
|
||||
onDownloadMessages: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on leave chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.downloadMessages(file)
|
||||
}
|
||||
|
||||
onDisplayProfilePopup: {
|
||||
Global.openProfilePopup(publicKey)
|
||||
}
|
||||
|
||||
onDisplayGroupInfoPopup: {
|
||||
Global.openPopup(root.rootStore.groupInfoPopupComponent, {
|
||||
chatContentModule: chatContentModule,
|
||||
chatDetails: chatContentModule.chatDetails
|
||||
})
|
||||
}
|
||||
|
||||
onEditCommunityChannel: {
|
||||
root.rootStore.editCommunityChannel(
|
||||
chatId,
|
||||
newName,
|
||||
newDescription,
|
||||
newEmoji,
|
||||
newColor,
|
||||
newCategory,
|
||||
channelPosition // TODO change this to the signal once it is modifiable
|
||||
)
|
||||
}
|
||||
onAddRemoveGroupMember: {
|
||||
topBar.toolbarComponent = contactsSelector
|
||||
}
|
||||
onFetchMoreMessages: {
|
||||
root.rootStore.messageStore.requestMoreMessages();
|
||||
}
|
||||
onLeaveGroup: {
|
||||
chatContentModule.leaveChat();
|
||||
}
|
||||
onUpdateGroupChatDetails: {
|
||||
root.rootStore.chatCommunitySectionModule.updateGroupChatDetails(
|
||||
chatId,
|
||||
groupName,
|
||||
groupColor,
|
||||
groupImage
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: connectedStatusRect
|
||||
Layout.fillWidth: true
|
||||
|
|
|
@ -0,0 +1,339 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.13
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
import "../panels"
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
spacing: padding / 2
|
||||
|
||||
property alias menuButton: menuButton
|
||||
property alias membersButton: membersButton
|
||||
property alias searchButton: searchButton
|
||||
|
||||
property var rootStore
|
||||
property var chatContentModule: root.rootStore.currentChatContentModule()
|
||||
property int padding: 8
|
||||
|
||||
signal searchButtonClicked()
|
||||
|
||||
Loader {
|
||||
id: loader
|
||||
sourceComponent: statusChatInfoButton
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.leftMargin: padding
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: actionButtons
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.rightMargin: padding
|
||||
spacing: 8
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: searchButton
|
||||
icon.name: "search"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
onClicked: root.searchButtonClicked()
|
||||
|
||||
// initializing the tooltip
|
||||
tooltip.text: qsTr("Search")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: membersButton
|
||||
visible: {
|
||||
if(!chatContentModule || chatContentModule.chatDetails.type === Constants.chatType.publicChat)
|
||||
return false
|
||||
|
||||
return localAccountSensitiveSettings.showOnlineUsers &&
|
||||
chatContentModule.chatDetails.isUsersListAvailable
|
||||
}
|
||||
highlighted: localAccountSensitiveSettings.expandUsersList
|
||||
icon.name: "group-chat"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
onClicked: {
|
||||
localAccountSensitiveSettings.expandUsersList = !localAccountSensitiveSettings.expandUsersList;
|
||||
}
|
||||
// initializing the tooltip
|
||||
tooltip.text: qsTr("Members")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: menuButton
|
||||
objectName: "chatToolbarMoreOptionsButton"
|
||||
icon.name: "more"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
|
||||
// initializing the tooltip
|
||||
tooltip.visible: !!tooltip.text && menuButton.hovered && !contextMenu.opened
|
||||
tooltip.text: qsTr("More")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
|
||||
property bool showMoreMenu: false
|
||||
onClicked: {
|
||||
menuButton.highlighted = true
|
||||
|
||||
let originalOpenHandler = contextMenu.openHandler
|
||||
let originalCloseHandler = contextMenu.closeHandler
|
||||
|
||||
contextMenu.openHandler = function () {
|
||||
if (!!originalOpenHandler) {
|
||||
originalOpenHandler()
|
||||
}
|
||||
}
|
||||
|
||||
contextMenu.closeHandler = function () {
|
||||
menuButton.highlighted = false
|
||||
if (!!originalCloseHandler) {
|
||||
originalCloseHandler()
|
||||
}
|
||||
}
|
||||
|
||||
contextMenu.openHandler = originalOpenHandler
|
||||
contextMenu.popup(-contextMenu.width + menuButton.width, menuButton.height + 4)
|
||||
}
|
||||
|
||||
ChatContextMenuView {
|
||||
id: contextMenu
|
||||
objectName: "moreOptionsContextMenu"
|
||||
emojiPopup: root.emojiPopup
|
||||
openHandler: function () {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on open chat context menu handler - chat content module is not set")
|
||||
return
|
||||
}
|
||||
currentFleet = chatContentModule.getCurrentFleet()
|
||||
isCommunityChat = chatContentModule.chatDetails.belongsToCommunity
|
||||
amIChatAdmin = chatContentModule.amIChatAdmin()
|
||||
chatId = chatContentModule.chatDetails.id
|
||||
chatName = chatContentModule.chatDetails.name
|
||||
chatDescription = chatContentModule.chatDetails.description
|
||||
chatEmoji = chatContentModule.chatDetails.emoji
|
||||
chatColor = chatContentModule.chatDetails.color
|
||||
chatType = chatContentModule.chatDetails.type
|
||||
chatMuted = chatContentModule.chatDetails.muted
|
||||
channelPosition = chatContentModule.chatDetails.position
|
||||
}
|
||||
|
||||
onMuteChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on mute chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.muteChat()
|
||||
}
|
||||
|
||||
onUnmuteChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on unmute chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.unmuteChat()
|
||||
}
|
||||
|
||||
onMarkAllMessagesRead: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on mark all messages read from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.markAllMessagesRead()
|
||||
}
|
||||
|
||||
onClearChatHistory: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on clear chat history from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.clearChatHistory()
|
||||
}
|
||||
|
||||
onRequestAllHistoricMessages: {
|
||||
// Not Refactored Yet - Check in the `master` branch if this is applicable here.
|
||||
}
|
||||
|
||||
onLeaveChat: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on leave chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.leaveChat()
|
||||
}
|
||||
|
||||
onDeleteCommunityChat: root.rootStore.removeCommunityChat(chatId)
|
||||
|
||||
onDownloadMessages: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on leave chat from context menu - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.downloadMessages(file)
|
||||
}
|
||||
|
||||
onDisplayProfilePopup: {
|
||||
Global.openProfilePopup(publicKey)
|
||||
}
|
||||
|
||||
onDisplayGroupInfoPopup: {
|
||||
Global.openPopup(root.rootStore.groupInfoPopupComponent, {
|
||||
chatContentModule: chatContentModule,
|
||||
chatDetails: chatContentModule.chatDetails
|
||||
})
|
||||
}
|
||||
|
||||
onEditCommunityChannel: {
|
||||
root.rootStore.editCommunityChannel(
|
||||
chatId,
|
||||
newName,
|
||||
newDescription,
|
||||
newEmoji,
|
||||
newColor,
|
||||
newCategory,
|
||||
channelPosition // TODO change this to the signal once it is modifiable
|
||||
)
|
||||
}
|
||||
onAddRemoveGroupMember: {
|
||||
loader.sourceComponent = contactsSelector
|
||||
}
|
||||
onFetchMoreMessages: {
|
||||
root.rootStore.messageStore.requestMoreMessages();
|
||||
}
|
||||
onLeaveGroup: {
|
||||
chatContentModule.leaveChat();
|
||||
}
|
||||
onUpdateGroupChatDetails: {
|
||||
root.rootStore.chatCommunitySectionModule.updateGroupChatDetails(
|
||||
chatId,
|
||||
groupName,
|
||||
groupColor,
|
||||
groupImage
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
implicitWidth: 1
|
||||
implicitHeight: 24
|
||||
color: Theme.palette.directColor7
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
visible: (menuButton.visible || membersButton.visible || searchButton.visible)
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: { loader.sourceComponent = statusChatInfoButton }
|
||||
|
||||
// Chat toolbar content option 1:
|
||||
Component {
|
||||
id: statusChatInfoButton
|
||||
|
||||
StatusChatInfoButton {
|
||||
objectName: "chatInfoBtnInHeader"
|
||||
width: Math.min(implicitWidth, parent.width)
|
||||
title: chatContentModule? chatContentModule.chatDetails.name : ""
|
||||
subTitle: {
|
||||
if(!chatContentModule)
|
||||
return ""
|
||||
|
||||
// In some moment in future this should be part of the backend logic.
|
||||
// (once we add transaltion on the backend side)
|
||||
switch (chatContentModule.chatDetails.type) {
|
||||
case Constants.chatType.oneToOne:
|
||||
return (chatContentModule.isMyContact(chatContentModule.chatDetails.id) ?
|
||||
qsTr("Contact") :
|
||||
qsTr("Not a contact"))
|
||||
case Constants.chatType.publicChat:
|
||||
return qsTr("Public chat")
|
||||
case Constants.chatType.privateGroupChat:
|
||||
let cnt = root.usersStore.usersModule.model.count
|
||||
if(cnt > 1) return qsTr("%n member(s)", "", cnt);
|
||||
return qsTr("1 member");
|
||||
case Constants.chatType.communityChat:
|
||||
return Utils.linkifyAndXSS(chatContentModule.chatDetails.description).trim()
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
image.source: chatContentModule? chatContentModule.chatDetails.icon : ""
|
||||
ringSettings.ringSpecModel: chatContentModule && chatContentModule.chatDetails.type === Constants.chatType.oneToOne ?
|
||||
Utils.getColorHashAsJson(chatContentModule.chatDetails.id) : ""
|
||||
icon.color: chatContentModule?
|
||||
chatContentModule.chatDetails.type === Constants.chatType.oneToOne ?
|
||||
Utils.colorForPubkey(chatContentModule.chatDetails.id)
|
||||
: chatContentModule.chatDetails.color
|
||||
: ""
|
||||
icon.emoji: chatContentModule? chatContentModule.chatDetails.emoji : ""
|
||||
icon.emojiSize: "24x24"
|
||||
type: chatContentModule? chatContentModule.chatDetails.type : Constants.chatType.unknown
|
||||
pinnedMessagesCount: chatContentModule? chatContentModule.pinnedMessagesModel.count : 0
|
||||
muted: chatContentModule? chatContentModule.chatDetails.muted : false
|
||||
|
||||
onPinnedMessagesCountClicked: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on open pinned messages - chat content module is not set")
|
||||
return
|
||||
}
|
||||
Global.openPopup(pinnedMessagesPopupComponent, {
|
||||
store: rootStore,
|
||||
messageStore: messageStore,
|
||||
pinnedMessagesModel: chatContentModule.pinnedMessagesModel,
|
||||
messageToPin: ""
|
||||
})
|
||||
}
|
||||
onUnmute: {
|
||||
if(!chatContentModule) {
|
||||
console.debug("error on unmute chat - chat content module is not set")
|
||||
return
|
||||
}
|
||||
chatContentModule.unmuteChat()
|
||||
}
|
||||
|
||||
sensor.enabled: {
|
||||
if(!chatContentModule)
|
||||
return false
|
||||
|
||||
return chatContentModule.chatDetails.type !== Constants.chatType.publicChat &&
|
||||
chatContentModule.chatDetails.type !== Constants.chatType.communityChat
|
||||
}
|
||||
onClicked: {
|
||||
switch (chatContentModule.chatDetails.type) {
|
||||
case Constants.chatType.privateGroupChat:
|
||||
Global.openPopup(root.rootStore.groupInfoPopupComponent, {
|
||||
chatContentModule: chatContentModule,
|
||||
chatDetails: chatContentModule.chatDetails
|
||||
})
|
||||
break;
|
||||
case Constants.chatType.oneToOne:
|
||||
Global.openProfilePopup(chatContentModule.chatDetails.id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Chat toolbar content option 2:
|
||||
Component {
|
||||
id: contactsSelector
|
||||
GroupChatPanel {
|
||||
sectionModule: root.chatSectionModule
|
||||
chatContentModule: root.chatContentModule
|
||||
rootStore: root.rootStore
|
||||
maxHeight: root.height
|
||||
onPanelClosed: loader.sourceComponent = statusChatInfoButton
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ import shared.views.chat 1.0
|
|||
|
||||
import StatusQ.Layout 0.1
|
||||
import StatusQ.Popups 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
import "."
|
||||
import "../panels"
|
||||
|
@ -20,7 +21,7 @@ import "../helpers"
|
|||
import "../controls"
|
||||
import "../stores"
|
||||
|
||||
StatusAppThreePanelLayout {
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
|
||||
property var contactsStore
|
||||
|
@ -57,6 +58,18 @@ StatusAppThreePanelLayout {
|
|||
}
|
||||
}
|
||||
|
||||
notificationButton.tooltip.offset: localAccountSensitiveSettings.expandUsersList && headerContent.membersButton.visible ? 0 : 14
|
||||
notificationButton.highlighted: activityCenter.visible
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
notificationCount: root.rootStore.unreadNotificationsCount
|
||||
|
||||
headerContent: ChatHeaderContentView {
|
||||
id: headerContent
|
||||
visible: !!root.rootStore.currentChatContentModule()
|
||||
rootStore: root.rootStore
|
||||
onSearchButtonClicked: root.openAppSearch()
|
||||
}
|
||||
|
||||
leftPanel: Loader {
|
||||
id: contactColumnLoader
|
||||
sourceComponent: root.rootStore.chatCommunitySectionModule.isCommunity()?
|
||||
|
@ -66,6 +79,7 @@ StatusAppThreePanelLayout {
|
|||
|
||||
centerPanel: ChatColumnView {
|
||||
id: chatColumn
|
||||
anchors.fill: parent
|
||||
parentModule: root.rootStore.chatCommunitySectionModule
|
||||
rootStore: root.rootStore
|
||||
contactsStore: root.contactsStore
|
||||
|
@ -98,9 +112,7 @@ StatusAppThreePanelLayout {
|
|||
return chatContentModule.chatDetails.isUsersListAvailable
|
||||
}
|
||||
|
||||
rightPanel: userListComponent
|
||||
|
||||
Component {
|
||||
rightPanel: Component {
|
||||
id: userListComponent
|
||||
UserListPanel {
|
||||
rootStore: root.rootStore
|
||||
|
@ -203,4 +215,17 @@ StatusAppThreePanelLayout {
|
|||
Component.onCompleted: {
|
||||
rootStore.groupInfoPopupComponent = groupInfoPopupComponent;
|
||||
}
|
||||
|
||||
ActivityCenterPopup {
|
||||
id: activityCenter
|
||||
y: 56
|
||||
height: (root.height - 56) * 2 // TODO get screen size // Taken from old code top bar height was fixed there to 56
|
||||
store: root.rootStore
|
||||
chatSectionModule: root.rootStore.currentChatContentModule()
|
||||
messageContextMenu: MessageContextMenuView {
|
||||
id: contextmenu
|
||||
store: root.rootStore
|
||||
reactionModel: root.rootStore.emojiReactionsModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,9 +20,11 @@ import "../panels/communities"
|
|||
import "../popups/community"
|
||||
import "../layouts"
|
||||
|
||||
StatusAppTwoPanelLayout {
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
|
||||
notificationCount: root.rootStore.unreadNotificationsCount
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
// TODO: get this model from backend?
|
||||
property var settingsMenuModel: root.rootStore.communityPermissionsEnabled ? [{name: qsTr("Overview"), icon: "help"},
|
||||
{name: qsTr("Members"), icon: "group-chat"},
|
||||
|
@ -122,9 +124,14 @@ StatusAppTwoPanelLayout {
|
|||
}
|
||||
}
|
||||
|
||||
rightPanel: Loader {
|
||||
centerPanel: Loader {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 32
|
||||
//anchors.margins: 32
|
||||
anchors {
|
||||
leftMargin: 28
|
||||
rightMargin: 16
|
||||
bottomMargin: 16
|
||||
}
|
||||
active: root.community
|
||||
sourceComponent: StackLayout {
|
||||
currentIndex: d.currentIndex
|
||||
|
|
|
@ -8,6 +8,7 @@ import StatusQ.Controls 0.1
|
|||
import StatusQ.Components 0.1
|
||||
import StatusQ.Popups 0.1
|
||||
import StatusQ.Popups.Dialog 0.1
|
||||
import StatusQ.Layout 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared.popups 1.0
|
||||
|
@ -17,7 +18,7 @@ import "controls"
|
|||
import "stores"
|
||||
import "popups"
|
||||
|
||||
StatusScrollView {
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
objectName: "communitiesPortalLayout"
|
||||
|
||||
|
@ -26,6 +27,9 @@ StatusScrollView {
|
|||
property var createCommunitiesPopup: createCommunitiesPopupComponent
|
||||
property int contentPrefferedWidth: 100
|
||||
|
||||
notificationCount: root.communitiesStore.unreadNotificationsCount
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
|
@ -40,16 +44,23 @@ StatusScrollView {
|
|||
}
|
||||
}
|
||||
|
||||
centerPanel: Item {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
clip: true
|
||||
|
||||
StatusScrollView {
|
||||
contentHeight: column.height + d.layoutVMargin
|
||||
contentWidth: root.contentPrefferedWidth - d.layoutHMargin
|
||||
|
||||
ColumnLayout {
|
||||
id: column
|
||||
width: parent.width
|
||||
width: parent.availableWidth
|
||||
height: childrenRect.height
|
||||
|
||||
spacing: 18
|
||||
|
||||
StatusBaseText {
|
||||
Layout.topMargin: d.layoutVMargin
|
||||
Layout.leftMargin: d.layoutHMargin
|
||||
text: qsTr("Find community")
|
||||
font.weight: Font.Bold
|
||||
|
@ -58,8 +69,8 @@ StatusScrollView {
|
|||
}
|
||||
|
||||
RowLayout {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: 38
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 38
|
||||
spacing: Style.current.bigPadding
|
||||
|
||||
StatusInput {
|
||||
|
@ -184,6 +195,8 @@ StatusScrollView {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: importCommunitiesPopupComponent
|
||||
|
|
|
@ -17,6 +17,7 @@ QtObject {
|
|||
property var advancedModule: profileSectionModule.advancedModule
|
||||
property bool isCommunityHistoryArchiveSupportEnabled: advancedModule? advancedModule.isCommunityHistoryArchiveSupportEnabled : false
|
||||
|
||||
property int unreadNotificationsCount: activityCenterList.unreadCount
|
||||
// TODO: Could the backend provide directly 2 filtered models??
|
||||
//property var featuredCommunitiesModel: root.communitiesModuleInst.curatedFeaturedCommunities
|
||||
//property var popularCommunitiesModel: root.communitiesModuleInst.curatedPopularCommunities
|
||||
|
|
|
@ -2,6 +2,7 @@ import QtQuick 2.13
|
|||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
|
||||
import StatusQ.Layout 0.1
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
|
@ -13,14 +14,14 @@ import shared.controls 1.0
|
|||
import "stores"
|
||||
import "views"
|
||||
|
||||
Item {
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
property RootStore store: RootStore {}
|
||||
|
||||
ColumnLayout {
|
||||
notificationCount: root.store.unreadNotificationsCount
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
centerPanel: ColumnLayout {
|
||||
id: rpcColumn
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -5,6 +5,7 @@ import utils 1.0
|
|||
QtObject {
|
||||
id: root
|
||||
|
||||
property int unreadNotificationsCount: activityCenterList.unreadCount
|
||||
property var nodeModelInst: nodeModel
|
||||
// property var profileModelInst: profileModel
|
||||
|
||||
|
|
|
@ -13,14 +13,16 @@ import "views"
|
|||
import StatusQ.Layout 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
StatusAppTwoPanelLayout {
|
||||
id: profileView
|
||||
StatusSectionLayout {
|
||||
id: root
|
||||
|
||||
property ProfileSectionStore store
|
||||
property var globalStore
|
||||
property var systemPalette
|
||||
property var emojiPopup
|
||||
|
||||
notificationCount: root.store.unreadNotificationsCount
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
Component.onCompleted: {
|
||||
Global.privacyModuleInst = store.privacyStore.privacyModule
|
||||
}
|
||||
|
@ -38,7 +40,7 @@ StatusAppTwoPanelLayout {
|
|||
|
||||
leftPanel: LeftTabView {
|
||||
id: leftTab
|
||||
store: profileView.store
|
||||
store: root.store
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: d.topMargin
|
||||
onMenuItemClicked: {
|
||||
|
@ -49,16 +51,42 @@ StatusAppTwoPanelLayout {
|
|||
}
|
||||
}
|
||||
|
||||
rightPanel: Item {
|
||||
centerPanel: Item {
|
||||
anchors.fill: parent
|
||||
ModuleWarning {
|
||||
id: secureYourSeedPhrase
|
||||
width: parent.width
|
||||
visible: {
|
||||
if (profileContainer.currentIndex !== Constants.settingsSubsection.profile) {
|
||||
return false
|
||||
}
|
||||
if (root.store.profileStore.userDeclinedBackupBanner) {
|
||||
return false
|
||||
}
|
||||
return !root.store.profileStore.privacyStore.mnemonicBackedUp
|
||||
}
|
||||
color: Style.current.red
|
||||
btnWidth: 100
|
||||
text: qsTr("Secure your seed phrase")
|
||||
btnText: qsTr("Back up now")
|
||||
|
||||
onClick: function(){
|
||||
Global.openBackUpSeedPopup();
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
root.store.profileStore.userDeclinedBackupBanner = true
|
||||
}
|
||||
}
|
||||
|
||||
StatusBanner {
|
||||
id: banner
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: visible ? childrenRect.height : 0
|
||||
visible: profileContainer.currentIndex === Constants.settingsSubsection.wallet &&
|
||||
profileView.store.walletStore.areTestNetworksEnabled
|
||||
root.store.walletStore.areTestNetworksEnabled
|
||||
type: StatusBanner.Type.Danger
|
||||
statusText: qsTr("Testnet mode is enabled. All balances, transactions and dApp interactions will be on testnets.")
|
||||
}
|
||||
|
@ -72,7 +100,6 @@ StatusAppTwoPanelLayout {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: d.topMargin
|
||||
anchors.bottomMargin: d.bottomMargin
|
||||
anchors.leftMargin: d.leftMargin
|
||||
anchors.rightMargin: d.rightMargin
|
||||
|
@ -89,20 +116,20 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
walletStore: profileView.store.walletStore
|
||||
profileStore: profileView.store.profileStore
|
||||
privacyStore: profileView.store.privacyStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.profile)
|
||||
walletStore: root.store.walletStore
|
||||
profileStore: root.store.profileStore
|
||||
privacyStore: root.store.privacyStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.profile)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
ContactsView {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
contactsStore: profileView.store.contactsStore
|
||||
contactsStore: root.store.contactsStore
|
||||
sectionTitle: qsTr("Contacts")
|
||||
contentWidth: d.contentWidth
|
||||
backButtonName: profileView.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
||||
backButtonName: root.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
||||
|
||||
onBackButtonClicked: {
|
||||
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.messaging)
|
||||
|
@ -117,9 +144,9 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
ensUsernamesStore: profileView.store.ensUsernamesStore
|
||||
contactsStore: profileView.store.contactsStore
|
||||
stickersStore: profileView.store.stickersStore
|
||||
ensUsernamesStore: root.store.ensUsernamesStore
|
||||
contactsStore: root.store.contactsStore
|
||||
stickersStore: root.store.stickersStore
|
||||
|
||||
profileContentWidth: d.contentWidth
|
||||
}
|
||||
|
@ -127,11 +154,10 @@ StatusAppTwoPanelLayout {
|
|||
MessagingView {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
messagingStore: profileView.store.messagingStore
|
||||
advancedStore: profileView.store.advancedStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
||||
contactsStore: profileView.store.contactsStore
|
||||
advancedStore: root.store.advancedStore
|
||||
messagingStore: root.store.messagingStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.messaging)
|
||||
contactsStore: root.store.contactsStore
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -139,9 +165,9 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
walletStore: profileView.store.walletStore
|
||||
emojiPopup: profileView.emojiPopup
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.wallet)
|
||||
walletStore: root.store.walletStore
|
||||
emojiPopup: root.emojiPopup
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.wallet)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -149,19 +175,19 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
appearanceStore: profileView.store.appearanceStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.appearance)
|
||||
appearanceStore: root.store.appearanceStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.appearance)
|
||||
contentWidth: d.contentWidth
|
||||
systemPalette: profileView.systemPalette
|
||||
systemPalette: root.systemPalette
|
||||
}
|
||||
|
||||
LanguageView {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
languageStore: profileView.store.languageStore
|
||||
currencyStore: profileView.store.walletStore.currencyStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.language)
|
||||
languageStore: root.store.languageStore
|
||||
currencyStore: root.store.walletStore.currencyStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.language)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -169,9 +195,9 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
notificationsStore: profileView.store.notificationsStore
|
||||
devicesStore: profileView.store.devicesStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.notifications)
|
||||
notificationsStore: root.store.notificationsStore
|
||||
devicesStore: root.store.devicesStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.notifications)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -179,8 +205,8 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
devicesStore: profileView.store.devicesStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.devicesSettings)
|
||||
devicesStore: root.store.devicesStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.devicesSettings)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -188,8 +214,8 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
store: profileView.store
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.browserSettings)
|
||||
store: root.store
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.browserSettings)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -197,8 +223,8 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
advancedStore: profileView.store.advancedStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.advanced)
|
||||
advancedStore: root.store.advancedStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -206,9 +232,9 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
store: profileView.store
|
||||
globalStore: profileView.globalStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.about)
|
||||
store: root.store
|
||||
globalStore: root.globalStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.about)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -216,10 +242,10 @@ StatusAppTwoPanelLayout {
|
|||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
||||
profileSectionStore: profileView.store
|
||||
rootStore: profileView.globalStore
|
||||
contactStore: profileView.store.contactsStore
|
||||
sectionTitle: profileView.store.getNameForSubsection(Constants.settingsSubsection.communitiesSettings)
|
||||
profileSectionStore: root.store
|
||||
rootStore: root.globalStore
|
||||
contactStore: root.store.contactsStore
|
||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.communitiesSettings)
|
||||
contentWidth: d.contentWidth
|
||||
}
|
||||
|
||||
|
@ -233,30 +259,5 @@ StatusAppTwoPanelLayout {
|
|||
}
|
||||
}
|
||||
} // Item
|
||||
ModuleWarning {
|
||||
id: secureYourSeedPhrase
|
||||
width: parent.width
|
||||
visible: {
|
||||
if (profileContainer.currentIndex !== Constants.settingsSubsection.profile) {
|
||||
return false
|
||||
}
|
||||
if (profileView.store.profileStore.userDeclinedBackupBanner) {
|
||||
return false
|
||||
}
|
||||
return !profileView.store.profileStore.privacyStore.mnemonicBackedUp
|
||||
}
|
||||
color: Style.current.red
|
||||
btnWidth: 100
|
||||
text: qsTr("Secure your seed phrase")
|
||||
btnText: qsTr("Back up now")
|
||||
|
||||
onClick: function(){
|
||||
Global.openBackUpSeedPopup();
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
profileView.store.profileStore.userDeclinedBackupBanner = true
|
||||
}
|
||||
|
||||
}
|
||||
} // StatusAppTwoPanelLayout
|
||||
|
|
|
@ -5,6 +5,7 @@ import AppLayouts.Chat.stores 1.0
|
|||
|
||||
QtObject {
|
||||
id: root
|
||||
property int unreadNotificationsCount: activityCenterList.unreadCount
|
||||
|
||||
property var aboutModuleInst: aboutModule
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import "views"
|
|||
import "stores"
|
||||
|
||||
Item {
|
||||
id: walletView
|
||||
id: root
|
||||
|
||||
property bool hideSignPhraseModal: false
|
||||
property var store
|
||||
|
@ -45,25 +45,27 @@ Item {
|
|||
anchors.top: parent ? parent.top: undefined
|
||||
anchors.left: parent ? parent.left: undefined
|
||||
anchors.right: parent ? parent.right: undefined
|
||||
contactsStore: walletView.contactsStore
|
||||
sendModal: walletView.sendModal
|
||||
contactsStore: root.contactsStore
|
||||
sendModal: root.sendModal
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: walletContainer
|
||||
RightTabView {
|
||||
store: walletView.store
|
||||
sendModal: walletView.sendModal
|
||||
store: root.store
|
||||
sendModal: root.sendModal
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StatusAppTwoPanelLayout {
|
||||
StatusSectionLayout {
|
||||
anchors.top: seedPhraseWarning.bottom
|
||||
height: walletView.height - seedPhraseWarning.height
|
||||
width: walletView.width
|
||||
height: root.height - seedPhraseWarning.height
|
||||
width: root.width
|
||||
|
||||
notificationCount: RootStore.unreadNotificationsCount
|
||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||
Component.onCompleted: {
|
||||
// Read in RootStore
|
||||
// if(RootStore.firstTimeLogin){
|
||||
|
@ -96,13 +98,12 @@ Item {
|
|||
else
|
||||
rightPanelStackView.replace(walletContainer)
|
||||
}
|
||||
emojiPopup: walletView.emojiPopup
|
||||
emojiPopup: root.emojiPopup
|
||||
}
|
||||
|
||||
rightPanel: StackView {
|
||||
centerPanel: StackView {
|
||||
id: rightPanelStackView
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 49
|
||||
anchors.leftMargin: 49
|
||||
anchors.rightMargin: 49
|
||||
initialItem: walletContainer
|
||||
|
|
|
@ -10,8 +10,8 @@ import "../stores"
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
visible: !RootStore.mnemonicBackedUp
|
||||
height: visible ? 32 : 0
|
||||
visible: !RootStore.mnemonicBackedUp
|
||||
color: Style.current.red
|
||||
|
||||
Row {
|
||||
|
@ -61,8 +61,7 @@ Rectangle {
|
|||
|
||||
SVGImage {
|
||||
id: closeImg
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 18
|
||||
source: Style.svg("close-white")
|
||||
|
|
|
@ -7,6 +7,8 @@ import shared.stores 1.0 as SharedStore
|
|||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
property int unreadNotificationsCount: activityCenterList.unreadCount
|
||||
property var currentAccount: Constants.isCppApp ? walletSectionAccounts.currentAccount: walletSectionCurrent
|
||||
property var accounts: walletSectionAccounts.model
|
||||
property var generatedAccounts: walletSectionAccounts.generated
|
||||
|
|
|
@ -227,13 +227,12 @@ Item {
|
|||
height: 440
|
||||
}
|
||||
|
||||
StatusAppLayout {
|
||||
StatusMainLayout {
|
||||
id: appLayout
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
appNavBar: StatusAppNavBar {
|
||||
height: parent.height
|
||||
leftPanel: StatusAppNavBar {
|
||||
communityTypeRole: "sectionType"
|
||||
communityTypeValue: Constants.appSection.community
|
||||
sectionModel: mainModule.sectionsModel
|
||||
|
@ -396,9 +395,8 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
appView: ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
rightPanel: ColumnLayout {
|
||||
spacing: 0
|
||||
ModuleWarning {
|
||||
id: versionWarning
|
||||
width: parent.width
|
||||
|
@ -452,7 +450,6 @@ Item {
|
|||
|
||||
StackLayout {
|
||||
id: appView
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
currentIndex: {
|
||||
|
@ -520,7 +517,6 @@ Item {
|
|||
ChatLayout {
|
||||
id: chatLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
|
||||
chatView.pinnedMessagesListPopupComponent: pinnedMessagesPopupComponent
|
||||
|
@ -554,7 +550,6 @@ Item {
|
|||
CommunitiesPortalLayout {
|
||||
id: communitiesPortalLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
contentPrefferedWidth: appView.width
|
||||
}
|
||||
|
@ -562,7 +557,6 @@ Item {
|
|||
WalletLayout {
|
||||
id: walletLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
store: appMain.rootStore
|
||||
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
||||
|
@ -583,7 +577,6 @@ Item {
|
|||
sourceComponent: browserLayoutComponent
|
||||
active: false
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
// Loaders do not have access to the context, so props need to be set
|
||||
// Adding a "_" to avoid a binding loop
|
||||
|
@ -599,7 +592,6 @@ Item {
|
|||
ProfileLayout {
|
||||
id: profileLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
|
||||
store: appMain.rootStore.profileSectionStore
|
||||
|
@ -611,7 +603,6 @@ Item {
|
|||
NodeLayout {
|
||||
id: nodeLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue