Move Chat/ dir under Pages/

This commit is contained in:
miruka 2019-12-18 04:53:08 -04:00
parent 2bdf21d528
commit f4d7636df6
30 changed files with 38 additions and 38 deletions

View File

@ -182,7 +182,7 @@ Item {
// Chat // Chat
HShortcut { HShortcut {
enabled: window.uiState.page === "Chat/Chat.qml" enabled: window.uiState.page === "Pages/Chat/Chat.qml"
sequences: settings.keys.clearRoomMessages sequences: settings.keys.clearRoomMessages
onActivated: utils.makePopup( onActivated: utils.makePopup(
"Popups/ClearMessagesPopup.qml", "Popups/ClearMessagesPopup.qml",
@ -195,7 +195,7 @@ Item {
} }
HShortcut { HShortcut {
enabled: window.uiState.page === "Chat/Chat.qml" enabled: window.uiState.page === "Pages/Chat/Chat.qml"
sequences: settings.keys.sendFile sequences: settings.keys.sendFile
onActivated: utils.makeObject( onActivated: utils.makeObject(
"Dialogs/SendFilePicker.qml", "Dialogs/SendFilePicker.qml",
@ -210,7 +210,7 @@ Item {
} }
HShortcut { HShortcut {
enabled: window.uiState.page === "Chat/Chat.qml" enabled: window.uiState.page === "Pages/Chat/Chat.qml"
sequences: settings.keys.sendFileFromPathInClipboard sequences: settings.keys.sendFileFromPathInClipboard
onActivated: utils.sendFile( onActivated: utils.sendFile(
window.uiState.pageProperties.userId, window.uiState.pageProperties.userId,

View File

@ -9,7 +9,7 @@ HTileDelegate {
opacity: model.data.left ? theme.mainPane.room.leftRoomOpacity : 1 opacity: model.data.left ? theme.mainPane.room.leftRoomOpacity : 1
shouldBeCurrent: shouldBeCurrent:
window.uiState.page === "Chat/Chat.qml" && window.uiState.page === "Pages/Chat/Chat.qml" &&
window.uiState.pageProperties.userId === model.user_id && window.uiState.pageProperties.userId === model.user_id &&
window.uiState.pageProperties.roomId === model.data.room_id window.uiState.pageProperties.roomId === model.data.room_id

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
Rectangle { Rectangle {
id: banner id: banner

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
Banner { Banner {
property string inviterId: chat.roomInfo.inviter property string inviterId: chat.roomInfo.inviter

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
Banner { Banner {
color: theme.chat.leftBanner.background color: theme.chat.leftBanner.background

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
Banner { Banner {
color: theme.chat.unknownDevices.background color: theme.chat.unknownDevices.background

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
import "RoomPane" import "RoomPane"
Item { Item {
@ -41,7 +41,7 @@ Item {
width: 96 * theme.uiScale width: 96 * theme.uiScale
height: width height: width
source: opacity > 0 ? "../Base/HBusyIndicator.qml" : "" source: opacity > 0 ? "../../Base/HBusyIndicator.qml" : ""
opacity: ready ? 0 : 1 opacity: ready ? 0 : 1
Behavior on opacity { HNumberAnimation { factor: 2 } } Behavior on opacity { HNumberAnimation { factor: 2 } }

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
import "Banners" import "Banners"
import "Timeline" import "Timeline"
import "FileTransfer" import "FileTransfer"

View File

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
import "../Dialogs" import "../../Dialogs"
Rectangle { Rectangle {
property string indent: " " property string indent: " "

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HColumnLayout { HColumnLayout {
id: transfer id: transfer

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
Rectangle { Rectangle {
implicitWidth: 800 implicitWidth: 800

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
HProgressBar { HProgressBar {
indeterminate: true indeterminate: true

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
Rectangle { Rectangle {
implicitHeight: theme.baseElementsHeight implicitHeight: theme.baseElementsHeight

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
HTileDelegate { HTileDelegate {
id: memberDelegate id: memberDelegate

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HColumnLayout { HColumnLayout {
HListView { HListView {

View File

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HDrawer { HDrawer {
id: roomPane id: roomPane

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HBox { HBox {
color: "transparent" color: "transparent"

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
HNoticePage { HNoticePage {
text: model.date.toLocaleDateString() text: model.date.toLocaleDateString()

View File

@ -1,8 +1,8 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtAV 1.7 import QtAV 1.7
import "../../Base" import "../../../Base"
import "../../Base/MediaPlayer" import "../../../Base/MediaPlayer"
AudioPlayer { AudioPlayer {
id: audio id: audio

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HRowLayout { HRowLayout {
id: eventContent id: eventContent

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HColumnLayout { HColumnLayout {
id: eventDelegate id: eventDelegate

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../../Base"
HTile { HTile {
id: file id: file

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
HMxcImage { HMxcImage {
id: image id: image

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
HLabel { HLabel {
id: bubble id: bubble

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
Rectangle { Rectangle {
property alias selectableLabelContainer: selectableLabelContainer property alias selectableLabelContainer: selectableLabelContainer

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../../Base" import "../../../Base"
HLoader { HLoader {
id: loader id: loader

View File

@ -1,8 +1,8 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtAV 1.7 import QtAV 1.7
import "../../Base" import "../../../Base"
import "../../Base/MediaPlayer" import "../../../Base/MediaPlayer"
VideoPlayer { VideoPlayer {
id: video id: video

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../../Base"
Rectangle { Rectangle {
id: typingMembersBar id: typingMembersBar

View File

@ -15,7 +15,7 @@ BoxPopup {
box.focusButton: "ok" box.focusButton: "ok"
onOk: py.callClientCoro(userId, "room_forget", [roomId], () => { onOk: py.callClientCoro(userId, "room_forget", [roomId], () => {
if (window.uiState.page === "Chat/Chat.qml" && if (window.uiState.page === "Pages/Chat/Chat.qml" &&
window.uiState.pageProperties.userId === userId && window.uiState.pageProperties.userId === userId &&
window.uiState.pageProperties.roomId === roomId) window.uiState.pageProperties.roomId === roomId)
{ {

View File

@ -86,7 +86,7 @@ Item {
let page = window.uiState.page let page = window.uiState.page
let props = window.uiState.pageProperties let props = window.uiState.pageProperties
if (page === "Chat/Chat.qml") { if (page === "Pages/Chat/Chat.qml") {
pageLoader.showRoom(props.userId, props.roomId) pageLoader.showRoom(props.userId, props.roomId)
} else { } else {
pageLoader._show(page, props) pageLoader._show(page, props)
@ -110,9 +110,9 @@ Item {
} }
function showRoom(userId, roomId) { function showRoom(userId, roomId) {
_show("Chat/Chat.qml", {userId, roomId}) _show("Pages/Chat/Chat.qml", {userId, roomId})
window.uiState.page = "Chat/Chat.qml" window.uiState.page = "Pages/Chat/Chat.qml"
window.uiState.pageProperties = {userId, roomId} window.uiState.pageProperties = {userId, roomId}
window.uiStateChanged() window.uiStateChanged()
} }