2021-06-21 21:50:49 +03:00
|
|
|
import QtQml 2.12
|
2020-01-12 18:16:24 +03:00
|
|
|
import QtQml.Models 2.1
|
2021-09-09 14:33:57 +03:00
|
|
|
import QtQuick 2.15
|
2020-01-21 15:54:04 +03:00
|
|
|
import QtQuick.Window 2.3
|
2020-09-14 18:25:20 +03:00
|
|
|
import QtQuick.Controls 2.3
|
2019-12-08 13:32:22 +03:00
|
|
|
import QtQuick.Layouts 1.2
|
|
|
|
import QtGraphicalEffects 1.0
|
2021-09-09 14:33:57 +03:00
|
|
|
import "../"
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2020-01-19 22:13:12 +03:00
|
|
|
// Custom qml modules are in /theme (and included by resources.qrc)
|
|
|
|
import Style 1.0
|
|
|
|
|
2020-06-15 18:01:39 +03:00
|
|
|
import com.nextcloud.desktopclient 1.0
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Window {
|
2020-01-19 22:13:12 +03:00
|
|
|
id: trayWindow
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-06-21 14:33:22 +03:00
|
|
|
title: Systray.windowTitle
|
|
|
|
// If the main dialog is displayed as a regular window we want it to be quadratic
|
|
|
|
width: Systray.useNormalWindow ? Style.trayWindowHeight : Style.trayWindowWidth
|
2020-01-19 22:13:12 +03:00
|
|
|
height: Style.trayWindowHeight
|
|
|
|
color: "transparent"
|
2021-07-22 11:34:13 +03:00
|
|
|
flags: Systray.useNormalWindow ? Qt.Window : Qt.Dialog | Qt.FramelessWindowHint
|
2021-06-21 14:33:22 +03:00
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-08-20 16:17:06 +03:00
|
|
|
property var fileActivityDialogAbsolutePath: ""
|
2020-07-06 21:12:58 +03:00
|
|
|
readonly property int maxMenuHeight: Style.trayWindowHeight - Style.trayWindowHeaderHeight - 2 * Style.trayWindowBorderWidth
|
|
|
|
|
2021-08-20 16:17:06 +03:00
|
|
|
function openFileActivityDialog(displayPath, absolutePath) {
|
|
|
|
fileActivityDialogLoader.displayPath = displayPath
|
|
|
|
fileActivityDialogLoader.absolutePath = absolutePath
|
|
|
|
fileActivityDialogLoader.refresh()
|
|
|
|
}
|
|
|
|
|
2020-10-22 13:39:40 +03:00
|
|
|
Component.onCompleted: Systray.forceWindowInit(trayWindow)
|
|
|
|
|
2020-01-19 22:13:12 +03:00
|
|
|
// Close tray window when focus is lost (e.g. click somewhere else on the screen)
|
2019-12-30 13:39:21 +03:00
|
|
|
onActiveChanged: {
|
2021-06-21 14:33:22 +03:00
|
|
|
if (!Systray.useNormalWindow && !active) {
|
|
|
|
hide();
|
2021-07-20 13:56:00 +03:00
|
|
|
Systray.setClosed();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
2021-06-21 14:33:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
onClosing: {
|
|
|
|
Systray.setClosed()
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
|
|
|
|
2020-01-03 15:09:29 +03:00
|
|
|
onVisibleChanged: {
|
2020-01-19 22:13:12 +03:00
|
|
|
// HACK: reload account Instantiator immediately by restting it - could be done better I guess
|
|
|
|
// see also id:accountMenu below
|
2020-01-11 17:05:37 +03:00
|
|
|
userLineInstantiator.active = false;
|
|
|
|
userLineInstantiator.active = true;
|
2021-09-14 14:17:03 +03:00
|
|
|
syncStatus.model.load();
|
2020-01-03 15:09:29 +03:00
|
|
|
}
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Connections {
|
2020-06-15 18:01:39 +03:00
|
|
|
target: UserModel
|
2021-08-20 19:27:25 +03:00
|
|
|
function onNewUserSelected() {
|
2020-01-03 15:09:29 +03:00
|
|
|
accountMenu.close();
|
2021-09-14 14:17:03 +03:00
|
|
|
syncStatus.model.load();
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2019-12-30 13:52:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Connections {
|
2020-06-15 18:01:39 +03:00
|
|
|
target: Systray
|
2021-08-20 19:27:25 +03:00
|
|
|
function onShowWindow() {
|
2020-01-05 18:25:32 +03:00
|
|
|
accountMenu.close();
|
2020-06-15 20:01:04 +03:00
|
|
|
appsMenu.close();
|
2021-07-13 11:11:32 +03:00
|
|
|
Systray.positionWindow(trayWindow);
|
2020-05-20 20:36:57 +03:00
|
|
|
|
|
|
|
trayWindow.show();
|
|
|
|
trayWindow.raise();
|
|
|
|
trayWindow.requestActivate();
|
|
|
|
|
2020-06-15 18:01:39 +03:00
|
|
|
Systray.setOpened();
|
|
|
|
UserModel.fetchCurrentActivityModel();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
2021-08-20 19:27:25 +03:00
|
|
|
function onHideWindow() {
|
2019-12-30 13:39:21 +03:00
|
|
|
trayWindow.hide();
|
2020-06-15 18:01:39 +03:00
|
|
|
Systray.setClosed();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
2021-08-20 16:17:06 +03:00
|
|
|
|
|
|
|
function onShowFileActivityDialog(displayPath, absolutePath) {
|
|
|
|
openFileActivityDialog(displayPath, absolutePath)
|
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
2020-07-27 18:27:23 +03:00
|
|
|
OpacityMask {
|
|
|
|
anchors.fill: parent
|
|
|
|
source: ShaderEffectSource {
|
|
|
|
sourceItem: trayWindowBackground
|
|
|
|
hideSource: true
|
|
|
|
}
|
|
|
|
maskSource: Rectangle {
|
|
|
|
width: trayWindowBackground.width
|
|
|
|
height: trayWindowBackground.height
|
2021-06-21 14:33:22 +03:00
|
|
|
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
|
2020-07-27 18:27:23 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Rectangle {
|
|
|
|
id: trayWindowBackground
|
2020-01-19 22:13:12 +03:00
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
property bool isUnifiedSearchActive: unifiedSearchResultsListViewSkeleton.visible
|
|
|
|
|| unifiedSearchResultNothingFound.visible
|
|
|
|
|| unifiedSearchResultsErrorLabel.visible
|
|
|
|
|| unifiedSearchResultsListView.visible
|
|
|
|
|
2020-01-19 22:13:12 +03:00
|
|
|
anchors.fill: parent
|
2021-06-21 14:33:22 +03:00
|
|
|
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
|
2020-01-19 22:13:12 +03:00
|
|
|
border.width: Style.trayWindowBorderWidth
|
2020-06-15 20:06:59 +03:00
|
|
|
border.color: Style.menuBorder
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2020-08-25 14:16:42 +03:00
|
|
|
Accessible.role: Accessible.Grouping
|
2020-08-25 17:52:05 +03:00
|
|
|
Accessible.name: qsTr("Nextcloud desktop main dialog")
|
2020-08-25 14:16:42 +03:00
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Rectangle {
|
|
|
|
id: trayWindowHeaderBackground
|
|
|
|
|
2020-01-19 22:13:12 +03:00
|
|
|
anchors.left: trayWindowBackground.left
|
2020-11-18 18:42:37 +03:00
|
|
|
anchors.right: trayWindowBackground.right
|
2020-01-19 22:13:12 +03:00
|
|
|
anchors.top: trayWindowBackground.top
|
|
|
|
height: Style.trayWindowHeaderHeight
|
|
|
|
color: Style.ncBlue
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
RowLayout {
|
|
|
|
id: trayWindowHeaderLayout
|
2020-01-19 22:13:12 +03:00
|
|
|
|
|
|
|
spacing: 0
|
|
|
|
anchors.fill: parent
|
2019-12-08 13:32:22 +03:00
|
|
|
|
|
|
|
Button {
|
|
|
|
id: currentAccountButton
|
2020-01-19 22:13:12 +03:00
|
|
|
|
|
|
|
Layout.preferredWidth: Style.currentAccountButtonWidth
|
|
|
|
Layout.preferredHeight: Style.trayWindowHeaderHeight
|
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
flat: true
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2020-08-25 13:54:56 +03:00
|
|
|
Accessible.role: Accessible.ButtonMenu
|
2020-08-25 15:59:10 +03:00
|
|
|
Accessible.name: qsTr("Current account")
|
2020-09-15 17:45:22 +03:00
|
|
|
Accessible.onPressAction: currentAccountButton.clicked()
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
// We call open() instead of popup() because we want to position it
|
|
|
|
// exactly below the dropdown button, not the mouse
|
|
|
|
onClicked: {
|
|
|
|
syncPauseButton.text = Systray.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
|
|
|
|
if (accountMenu.visible) {
|
|
|
|
accountMenu.close()
|
|
|
|
} else {
|
|
|
|
accountMenu.open()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
Loader {
|
|
|
|
id: userStatusSelectorDialogLoader
|
|
|
|
}
|
2021-09-09 12:18:22 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
Menu {
|
|
|
|
id: accountMenu
|
2020-01-19 22:13:12 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
// x coordinate grows towards the right
|
|
|
|
// y coordinate grows towards the bottom
|
|
|
|
x: (currentAccountButton.x + 2)
|
|
|
|
y: (currentAccountButton.y + Style.trayWindowHeaderHeight + 2)
|
2020-01-19 22:13:12 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
width: (Style.currentAccountButtonWidth - 2)
|
|
|
|
height: Math.min(implicitHeight, maxMenuHeight)
|
|
|
|
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
background: Rectangle {
|
|
|
|
border.color: Style.menuBorder
|
|
|
|
radius: Style.currentAccountButtonRadius
|
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
onClosed: {
|
|
|
|
// HACK: reload account Instantiator immediately by restting it - could be done better I guess
|
|
|
|
// see also onVisibleChanged above
|
|
|
|
userLineInstantiator.active = false;
|
|
|
|
userLineInstantiator.active = true;
|
|
|
|
}
|
2020-01-12 13:06:48 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
Instantiator {
|
|
|
|
id: userLineInstantiator
|
|
|
|
model: UserModel
|
|
|
|
delegate: UserLine {
|
|
|
|
onShowUserStatusSelectorDialog: {
|
|
|
|
userStatusSelectorDialogLoader.source = "qrc:/qml/src/gui/UserStatusSelectorDialog.qml"
|
|
|
|
userStatusSelectorDialogLoader.item.title = qsTr("Set user status")
|
|
|
|
userStatusSelectorDialogLoader.item.model.load(index)
|
|
|
|
userStatusSelectorDialogLoader.item.show()
|
2021-09-09 12:18:22 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
onObjectAdded: accountMenu.insertItem(index, object)
|
|
|
|
onObjectRemoved: accountMenu.removeItem(object)
|
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
MenuItem {
|
|
|
|
id: addAccountButton
|
|
|
|
height: Style.addAccountButtonHeight
|
|
|
|
hoverEnabled: true
|
2020-01-11 22:28:00 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
background: Item {
|
|
|
|
height: parent.height
|
|
|
|
width: parent.menu.width
|
|
|
|
Rectangle {
|
2020-01-19 22:13:12 +03:00
|
|
|
anchors.fill: parent
|
2021-11-12 20:59:33 +03:00
|
|
|
anchors.margins: 1
|
|
|
|
color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"
|
2020-01-11 22:28:00 +03:00
|
|
|
}
|
2020-01-04 19:22:56 +03:00
|
|
|
}
|
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
RowLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
Image {
|
|
|
|
Layout.leftMargin: 12
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
|
|
|
source: "qrc:///client/theme/black/add.svg"
|
|
|
|
sourceSize.width: Style.headerButtonIconSize
|
|
|
|
sourceSize.height: Style.headerButtonIconSize
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
Layout.leftMargin: 14
|
|
|
|
text: qsTr("Add account")
|
|
|
|
color: "black"
|
|
|
|
font.pixelSize: Style.topLinePixelSize
|
|
|
|
}
|
|
|
|
// Filler on the right
|
|
|
|
Item {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2020-06-22 01:49:06 +03:00
|
|
|
}
|
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
onClicked: UserModel.addAccount()
|
2020-01-04 19:22:56 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
Accessible.role: Accessible.MenuItem
|
|
|
|
Accessible.name: qsTr("Add new account")
|
|
|
|
Accessible.onPressAction: addAccountButton.clicked()
|
|
|
|
}
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
MenuSeparator {
|
|
|
|
contentItem: Rectangle {
|
|
|
|
implicitHeight: 1
|
|
|
|
color: Style.menuBorder
|
2020-01-05 18:25:32 +03:00
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
}
|
2020-01-05 18:25:32 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
MenuItem {
|
|
|
|
id: syncPauseButton
|
|
|
|
font.pixelSize: Style.topLinePixelSize
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked: Systray.pauseResumeSync()
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
background: Item {
|
|
|
|
height: parent.height
|
|
|
|
width: parent.menu.width
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 1
|
|
|
|
color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"
|
|
|
|
}
|
2020-01-04 19:22:56 +03:00
|
|
|
}
|
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
Accessible.role: Accessible.MenuItem
|
|
|
|
Accessible.name: Systray.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
|
|
|
|
Accessible.onPressAction: syncPauseButton.clicked()
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
id: settingsButton
|
|
|
|
text: qsTr("Settings")
|
|
|
|
font.pixelSize: Style.topLinePixelSize
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked: Systray.openSettings()
|
|
|
|
|
|
|
|
background: Item {
|
|
|
|
height: parent.height
|
|
|
|
width: parent.menu.width
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 1
|
|
|
|
color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"
|
2020-07-06 14:55:14 +03:00
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Accessible.role: Accessible.MenuItem
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.onPressAction: settingsButton.clicked()
|
|
|
|
}
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2021-11-12 20:59:33 +03:00
|
|
|
MenuItem {
|
|
|
|
id: exitButton
|
|
|
|
text: qsTr("Exit");
|
|
|
|
font.pixelSize: Style.topLinePixelSize
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked: Systray.shutdown()
|
|
|
|
|
|
|
|
background: Item {
|
|
|
|
height: parent.height
|
|
|
|
width: parent.menu.width
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 1
|
|
|
|
color: parent.parent.hovered || parent.parent.visualFocus ? Style.lightHover : "transparent"
|
|
|
|
}
|
2020-01-04 19:22:56 +03:00
|
|
|
}
|
2021-11-12 20:59:33 +03:00
|
|
|
|
|
|
|
Accessible.role: Accessible.MenuItem
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.onPressAction: exitButton.clicked()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-27 18:27:23 +03:00
|
|
|
background: Rectangle {
|
2021-11-12 20:59:33 +03:00
|
|
|
color: parent.hovered || parent.visualFocus ? "white" : "transparent"
|
2020-07-27 18:27:23 +03:00
|
|
|
opacity: 0.2
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: accountControlRowLayout
|
2020-01-19 22:13:12 +03:00
|
|
|
|
|
|
|
height: Style.trayWindowHeaderHeight
|
|
|
|
width: Style.currentAccountButtonWidth
|
2019-12-08 13:32:22 +03:00
|
|
|
spacing: 0
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Image {
|
|
|
|
id: currentAccountAvatar
|
2020-01-19 22:13:12 +03:00
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Layout.leftMargin: 8
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
2020-01-03 15:09:29 +03:00
|
|
|
cache: false
|
2020-07-21 14:24:59 +03:00
|
|
|
source: UserModel.currentUser.avatar != "" ? UserModel.currentUser.avatar : "image://avatars/fallbackWhite"
|
2020-01-19 22:13:12 +03:00
|
|
|
Layout.preferredHeight: Style.accountAvatarSize
|
|
|
|
Layout.preferredWidth: Style.accountAvatarSize
|
|
|
|
|
2020-08-25 13:54:56 +03:00
|
|
|
Accessible.role: Accessible.Graphic
|
|
|
|
Accessible.name: qsTr("Current user avatar")
|
|
|
|
|
2020-01-15 22:11:50 +03:00
|
|
|
Rectangle {
|
2021-03-16 22:24:11 +03:00
|
|
|
id: currentAccountStatusIndicatorBackground
|
2021-05-17 22:34:22 +03:00
|
|
|
visible: UserModel.currentUser.isConnected
|
|
|
|
&& UserModel.currentUser.serverHasUserStatus
|
2020-01-19 22:13:12 +03:00
|
|
|
width: Style.accountAvatarStateIndicatorSize + 2
|
2020-01-15 22:11:50 +03:00
|
|
|
height: width
|
|
|
|
anchors.bottom: currentAccountAvatar.bottom
|
|
|
|
anchors.right: currentAccountAvatar.right
|
2020-01-19 22:13:12 +03:00
|
|
|
color: Style.ncBlue
|
2020-01-15 22:11:50 +03:00
|
|
|
radius: width*0.5
|
|
|
|
}
|
2020-01-19 22:13:12 +03:00
|
|
|
|
2020-10-21 12:24:06 +03:00
|
|
|
Rectangle {
|
2021-04-19 18:19:04 +03:00
|
|
|
id: currentAccountStatusIndicatorMouseHover
|
2021-05-17 22:34:22 +03:00
|
|
|
visible: UserModel.currentUser.isConnected
|
|
|
|
&& UserModel.currentUser.serverHasUserStatus
|
2020-10-21 12:24:06 +03:00
|
|
|
width: Style.accountAvatarStateIndicatorSize + 2
|
|
|
|
height: width
|
|
|
|
anchors.bottom: currentAccountAvatar.bottom
|
|
|
|
anchors.right: currentAccountAvatar.right
|
|
|
|
color: accountBtnMouseArea.containsMouse ? "white" : "transparent"
|
|
|
|
opacity: 0.2
|
|
|
|
radius: width*0.5
|
|
|
|
}
|
|
|
|
|
2020-01-12 11:10:06 +03:00
|
|
|
Image {
|
2021-03-16 22:24:11 +03:00
|
|
|
id: currentAccountStatusIndicator
|
2021-05-17 22:34:22 +03:00
|
|
|
visible: UserModel.currentUser.isConnected
|
2021-05-18 21:45:34 +03:00
|
|
|
&& UserModel.currentUser.serverHasUserStatus
|
2021-03-16 22:24:11 +03:00
|
|
|
source: UserModel.currentUser.statusIcon
|
2020-01-12 11:10:06 +03:00
|
|
|
cache: false
|
2021-03-16 22:24:11 +03:00
|
|
|
x: currentAccountStatusIndicatorBackground.x + 1
|
|
|
|
y: currentAccountStatusIndicatorBackground.y + 1
|
2020-01-19 22:13:12 +03:00
|
|
|
sourceSize.width: Style.accountAvatarStateIndicatorSize
|
|
|
|
sourceSize.height: Style.accountAvatarStateIndicatorSize
|
2020-08-25 13:54:56 +03:00
|
|
|
|
|
|
|
Accessible.role: Accessible.Indicator
|
2021-04-26 21:40:38 +03:00
|
|
|
Accessible.name: UserModel.desktopNotificationsAllowed ? qsTr("Current user status is online") : qsTr("Current user status is do not disturb")
|
2020-01-12 11:10:06 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
id: accountLabels
|
2021-05-25 23:17:33 +03:00
|
|
|
spacing: 0
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
2021-05-18 23:28:59 +03:00
|
|
|
Layout.leftMargin: Style.userStatusSpacing
|
2021-07-15 14:06:04 +03:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.maximumWidth: parent.width
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Label {
|
|
|
|
id: currentAccountUser
|
2021-05-25 23:17:33 +03:00
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
|
2020-01-19 22:13:12 +03:00
|
|
|
width: Style.currentAccountLabelWidth
|
2020-06-16 15:06:30 +03:00
|
|
|
text: UserModel.currentUser.name
|
2020-01-05 23:06:42 +03:00
|
|
|
elide: Text.ElideRight
|
2020-10-21 14:40:42 +03:00
|
|
|
color: Style.ncTextColor
|
2020-01-19 22:13:12 +03:00
|
|
|
font.pixelSize: Style.topLinePixelSize
|
2019-12-08 13:32:22 +03:00
|
|
|
font.bold: true
|
|
|
|
}
|
2021-07-15 14:06:04 +03:00
|
|
|
|
2021-05-25 23:17:33 +03:00
|
|
|
RowLayout {
|
2020-10-03 18:12:16 +03:00
|
|
|
id: currentUserStatus
|
2021-05-17 22:34:22 +03:00
|
|
|
visible: UserModel.currentUser.isConnected &&
|
2021-05-18 21:45:34 +03:00
|
|
|
UserModel.currentUser.serverHasUserStatus
|
2021-05-25 23:17:33 +03:00
|
|
|
spacing: Style.accountLabelsSpacing
|
2021-07-15 14:06:04 +03:00
|
|
|
width: parent.width
|
|
|
|
|
2021-05-18 21:45:34 +03:00
|
|
|
Label {
|
|
|
|
id: emoji
|
|
|
|
visible: UserModel.currentUser.statusEmoji !== ""
|
|
|
|
width: Style.userStatusEmojiSize
|
|
|
|
text: UserModel.currentUser.statusEmoji
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: message
|
2021-05-25 23:17:33 +03:00
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
|
2021-07-15 14:06:04 +03:00
|
|
|
Layout.fillWidth: true
|
2021-05-18 21:45:34 +03:00
|
|
|
visible: UserModel.currentUser.statusMessage !== ""
|
|
|
|
width: Style.currentAccountLabelWidth
|
|
|
|
text: UserModel.currentUser.statusMessage !== ""
|
2021-09-09 14:33:57 +03:00
|
|
|
? UserModel.currentUser.statusMessage
|
2021-05-18 21:45:34 +03:00
|
|
|
: UserModel.currentUser.server
|
|
|
|
elide: Text.ElideRight
|
|
|
|
color: Style.ncTextColor
|
|
|
|
font.pixelSize: Style.subLinePixelSize
|
|
|
|
}
|
2021-04-19 18:19:04 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
2020-12-10 19:43:45 +03:00
|
|
|
ColorOverlay {
|
|
|
|
cached: true
|
|
|
|
color: Style.ncTextColor
|
|
|
|
width: source.width
|
|
|
|
height: source.height
|
|
|
|
source: Image {
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
|
|
|
Layout.margins: Style.accountDropDownCaretMargin
|
|
|
|
source: "qrc:///client/theme/white/caret-down.svg"
|
|
|
|
sourceSize.width: Style.accountDropDownCaretSize
|
|
|
|
sourceSize.height: Style.accountDropDownCaretSize
|
2021-06-08 22:04:53 +03:00
|
|
|
Accessible.role: Accessible.PopupMenu
|
2021-05-25 16:07:21 +03:00
|
|
|
Accessible.name: qsTr("Account switcher and settings menu")
|
2020-12-10 19:43:45 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-21 14:33:22 +03:00
|
|
|
// Add space between items
|
|
|
|
Item {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-04-06 23:52:32 +03:00
|
|
|
RowLayout {
|
|
|
|
id: openLocalFolderRowLayout
|
|
|
|
spacing: 0
|
|
|
|
Layout.preferredWidth: Style.trayWindowHeaderHeight
|
|
|
|
Layout.preferredHeight: Style.trayWindowHeaderHeight
|
2021-05-25 22:12:41 +03:00
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-04-06 23:52:32 +03:00
|
|
|
HeaderButton {
|
|
|
|
id: openLocalFolderButton
|
|
|
|
visible: UserModel.currentUser.hasLocalFolder
|
|
|
|
icon.source: "qrc:///client/theme/white/folder.svg"
|
|
|
|
onClicked: UserModel.openCurrentAccountLocalFolder()
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-04-07 14:29:22 +03:00
|
|
|
Rectangle {
|
|
|
|
id: folderStateIndicatorBackground
|
|
|
|
width: Style.folderStateIndicatorSize
|
|
|
|
height: width
|
|
|
|
anchors.top: openLocalFolderButton.verticalCenter
|
|
|
|
anchors.left: openLocalFolderButton.horizontalCenter
|
|
|
|
color: Style.ncBlue
|
|
|
|
radius: width*0.5
|
|
|
|
z: 1
|
|
|
|
}
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-05-25 22:12:41 +03:00
|
|
|
Image {
|
|
|
|
id: folderStateIndicator
|
|
|
|
visible: UserModel.currentUser.hasLocalFolder
|
|
|
|
source: UserModel.currentUser.isConnected
|
|
|
|
? Style.stateOnlineImageSource
|
|
|
|
: Style.stateOfflineImageSource
|
|
|
|
cache: false
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-05-25 22:12:41 +03:00
|
|
|
anchors.top: openLocalFolderButton.verticalCenter
|
2021-09-09 14:33:57 +03:00
|
|
|
anchors.left: openLocalFolderButton.horizontalCenter
|
2021-05-25 22:12:41 +03:00
|
|
|
sourceSize.width: Style.folderStateIndicatorSize
|
|
|
|
sourceSize.height: Style.folderStateIndicatorSize
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-05-25 22:12:41 +03:00
|
|
|
Accessible.role: Accessible.Indicator
|
|
|
|
Accessible.name: UserModel.currentUser.isConnected ? qsTr("Connected") : qsTr("Disconnected")
|
|
|
|
z: 2
|
|
|
|
}
|
2021-04-06 23:52:32 +03:00
|
|
|
}
|
2020-08-25 13:54:56 +03:00
|
|
|
|
|
|
|
Accessible.role: Accessible.Button
|
2020-08-25 17:52:05 +03:00
|
|
|
Accessible.name: qsTr("Open local folder of current account")
|
2021-03-16 22:24:11 +03:00
|
|
|
}
|
|
|
|
|
2020-06-15 16:35:34 +03:00
|
|
|
HeaderButton {
|
2019-12-08 13:32:22 +03:00
|
|
|
id: trayWindowTalkButton
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2020-06-16 15:06:30 +03:00
|
|
|
visible: UserModel.currentUser.serverHasTalk
|
2019-12-08 13:32:22 +03:00
|
|
|
icon.source: "qrc:///client/theme/white/talk-app.svg"
|
2020-06-15 18:01:39 +03:00
|
|
|
onClicked: UserModel.openCurrentAccountTalk()
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2020-08-25 13:54:56 +03:00
|
|
|
Accessible.role: Accessible.Button
|
2020-08-25 17:52:05 +03:00
|
|
|
Accessible.name: qsTr("Open Nextcloud Talk in browser")
|
2020-09-15 17:45:22 +03:00
|
|
|
Accessible.onPressAction: trayWindowTalkButton.clicked()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
2020-06-15 16:35:34 +03:00
|
|
|
HeaderButton {
|
2019-12-08 13:32:22 +03:00
|
|
|
id: trayWindowAppsButton
|
|
|
|
icon.source: "qrc:///client/theme/white/more-apps.svg"
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2020-06-15 16:35:34 +03:00
|
|
|
onClicked: {
|
2020-09-14 19:03:57 +03:00
|
|
|
if(appsMenu.count <= 0) {
|
2020-09-14 18:25:20 +03:00
|
|
|
UserModel.openCurrentAccountServer()
|
2020-09-14 19:03:57 +03:00
|
|
|
} else if (appsMenu.visible) {
|
|
|
|
appsMenu.close()
|
|
|
|
} else {
|
|
|
|
appsMenu.open()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2020-06-15 16:35:34 +03:00
|
|
|
}
|
2020-01-15 18:42:06 +03:00
|
|
|
|
2020-08-25 13:54:56 +03:00
|
|
|
Accessible.role: Accessible.ButtonMenu
|
2020-08-25 17:52:05 +03:00
|
|
|
Accessible.name: qsTr("More apps")
|
2020-09-15 17:45:22 +03:00
|
|
|
Accessible.onPressAction: trayWindowAppsButton.clicked()
|
2020-08-25 13:54:56 +03:00
|
|
|
|
2021-08-21 01:26:48 +03:00
|
|
|
AutoSizingMenu {
|
2020-06-15 16:35:34 +03:00
|
|
|
id: appsMenu
|
|
|
|
y: (trayWindowAppsButton.y + trayWindowAppsButton.height + 2)
|
2020-07-06 15:44:23 +03:00
|
|
|
readonly property Item listContentItem: contentItem.contentItem
|
2020-09-14 19:03:57 +03:00
|
|
|
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape
|
2020-01-15 18:42:06 +03:00
|
|
|
|
2020-06-15 16:35:34 +03:00
|
|
|
background: Rectangle {
|
2020-06-15 20:06:59 +03:00
|
|
|
border.color: Style.menuBorder
|
2020-06-15 16:35:34 +03:00
|
|
|
radius: 2
|
2020-01-15 18:42:06 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2020-06-15 16:35:34 +03:00
|
|
|
Instantiator {
|
|
|
|
id: appsMenuInstantiator
|
2020-06-15 18:01:39 +03:00
|
|
|
model: UserAppsModel
|
2020-06-15 16:35:34 +03:00
|
|
|
onObjectAdded: appsMenu.insertItem(index, object)
|
|
|
|
onObjectRemoved: appsMenu.removeItem(object)
|
|
|
|
delegate: MenuItem {
|
2020-06-17 20:39:12 +03:00
|
|
|
id: appEntry
|
2020-06-15 16:35:34 +03:00
|
|
|
text: appName
|
|
|
|
font.pixelSize: Style.topLinePixelSize
|
|
|
|
icon.source: appIconUrl
|
2020-06-15 18:01:39 +03:00
|
|
|
onTriggered: UserAppsModel.openAppUrl(appUrl)
|
2020-06-17 20:39:12 +03:00
|
|
|
hoverEnabled: true
|
|
|
|
|
2020-08-25 13:54:56 +03:00
|
|
|
Accessible.role: Accessible.MenuItem
|
2020-10-10 01:26:18 +03:00
|
|
|
Accessible.name: qsTr("Open %1 in browser").arg(appName)
|
2020-09-15 17:45:22 +03:00
|
|
|
Accessible.onPressAction: appEntry.triggered()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // Rectangle trayWindowHeaderBackground
|
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
UnifiedSearchInputContainer {
|
|
|
|
id: trayWindowUnifiedSearchInputContainer
|
|
|
|
height: Style.trayWindowHeaderHeight * 0.65
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
top: trayWindowHeaderBackground.bottom
|
|
|
|
left: trayWindowBackground.left
|
|
|
|
right: trayWindowBackground.right
|
|
|
|
|
|
|
|
margins: {
|
|
|
|
top: 10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
text: UserModel.currentUser.unifiedSearchResultsListModel.searchTerm
|
|
|
|
readOnly: !UserModel.currentUser.isConnected || UserModel.currentUser.unifiedSearchResultsListModel.currentFetchMoreInProgressProviderId
|
|
|
|
isSearchInProgress: UserModel.currentUser.unifiedSearchResultsListModel.isSearchInProgress
|
|
|
|
onTextEdited: { UserModel.currentUser.unifiedSearchResultsListModel.searchTerm = trayWindowUnifiedSearchInputContainer.text }
|
2021-11-03 11:00:33 +03:00
|
|
|
onClearText: { UserModel.currentUser.unifiedSearchResultsListModel.searchTerm = "" }
|
2021-09-09 14:33:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
ErrorBox {
|
|
|
|
id: unifiedSearchResultsErrorLabel
|
|
|
|
visible: UserModel.currentUser.unifiedSearchResultsListModel.errorString && !unifiedSearchResultsListView.visible && ! UserModel.currentUser.unifiedSearchResultsListModel.isSearchInProgress && ! UserModel.currentUser.unifiedSearchResultsListModel.currentFetchMoreInProgressProviderId
|
|
|
|
text: UserModel.currentUser.unifiedSearchResultsListModel.errorString
|
|
|
|
color: Style.errorBoxBackgroundColor
|
|
|
|
backgroundColor: Style.errorBoxTextColor
|
|
|
|
borderColor: "transparent"
|
|
|
|
anchors.top: trayWindowUnifiedSearchInputContainer.bottom
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
anchors.margins: 10
|
|
|
|
}
|
|
|
|
|
|
|
|
UnifiedSearchResultNothingFound {
|
|
|
|
id: unifiedSearchResultNothingFound
|
|
|
|
visible: false
|
|
|
|
anchors.top: trayWindowUnifiedSearchInputContainer.bottom
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
anchors.topMargin: 10
|
|
|
|
|
|
|
|
text: UserModel.currentUser.unifiedSearchResultsListModel.searchTerm
|
|
|
|
|
|
|
|
property bool isSearchRunning: UserModel.currentUser.unifiedSearchResultsListModel.isSearchInProgress
|
|
|
|
property bool isSearchResultsEmpty: unifiedSearchResultsListView.count === 0
|
|
|
|
property bool nothingFound: text && isSearchResultsEmpty && !UserModel.currentUser.unifiedSearchResultsListModel.errorString
|
|
|
|
|
|
|
|
onIsSearchRunningChanged: {
|
|
|
|
if (unifiedSearchResultNothingFound.isSearchRunning) {
|
|
|
|
visible = false;
|
|
|
|
} else {
|
|
|
|
if (nothingFound) {
|
|
|
|
visible = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onTextChanged: {
|
|
|
|
visible = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
onIsSearchResultsEmptyChanged: {
|
|
|
|
if (!unifiedSearchResultNothingFound.isSearchResultsEmpty) {
|
|
|
|
visible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
UnifiedSearchResultItemSkeletonContainer {
|
|
|
|
id: unifiedSearchResultsListViewSkeleton
|
|
|
|
visible: !unifiedSearchResultNothingFound.visible && !unifiedSearchResultsListView.visible && ! UserModel.currentUser.unifiedSearchResultsListModel.errorString && UserModel.currentUser.unifiedSearchResultsListModel.searchTerm
|
|
|
|
anchors.top: trayWindowUnifiedSearchInputContainer.bottom
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
anchors.bottom: trayWindowBackground.bottom
|
|
|
|
textLeftMargin: trayWindowBackground.Style.unifiedSearchResultTextLeftMargin
|
|
|
|
textRightMargin: trayWindowBackground.Style.unifiedSearchResultTextRightMargin
|
|
|
|
iconWidth: trayWindowBackground.Style.unifiedSearchResulIconWidth
|
|
|
|
iconLeftMargin: trayWindowBackground.Style.unifiedSearchResulIconLeftMargin
|
|
|
|
itemHeight: trayWindowBackground.Style.unifiedSearchItemHeight
|
|
|
|
titleFontSize: trayWindowBackground.Style.unifiedSearchResulTitleFontSize
|
|
|
|
sublineFontSize: trayWindowBackground.Style.unifiedSearchResulSublineFontSize
|
|
|
|
titleColor: trayWindowBackground.Style.unifiedSearchResulTitleColor
|
|
|
|
sublineColor: trayWindowBackground.Style.unifiedSearchResulSublineColor
|
|
|
|
iconColor: "#afafaf"
|
|
|
|
}
|
|
|
|
|
2021-11-12 23:02:58 +03:00
|
|
|
ScrollView {
|
|
|
|
id: controlRoot
|
|
|
|
padding: 1
|
|
|
|
contentWidth: availableWidth
|
|
|
|
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
|
|
|
|
data: WheelHandler {
|
|
|
|
target: controlRoot.contentItem
|
|
|
|
}
|
|
|
|
visible: unifiedSearchResultsListView.count > 0
|
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
anchors.top: trayWindowUnifiedSearchInputContainer.bottom
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
anchors.bottom: trayWindowBackground.bottom
|
|
|
|
|
2021-11-12 23:02:58 +03:00
|
|
|
ListView {
|
|
|
|
id: unifiedSearchResultsListView
|
|
|
|
spacing: 4
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
keyNavigationEnabled: true
|
|
|
|
|
|
|
|
reuseItems: true
|
|
|
|
|
|
|
|
Accessible.role: Accessible.List
|
|
|
|
Accessible.name: qsTr("Unified search results list")
|
|
|
|
|
|
|
|
model: UserModel.currentUser.unifiedSearchResultsListModel
|
|
|
|
|
|
|
|
delegate: UnifiedSearchResultListItem {
|
|
|
|
width: unifiedSearchResultsListView.width
|
|
|
|
height: trayWindowBackground.Style.unifiedSearchItemHeight
|
|
|
|
isSearchInProgress: unifiedSearchResultsListView.model.isSearchInProgress
|
|
|
|
textLeftMargin: trayWindowBackground.Style.unifiedSearchResultTextLeftMargin
|
|
|
|
textRightMargin: trayWindowBackground.Style.unifiedSearchResultTextRightMargin
|
|
|
|
iconWidth: trayWindowBackground.Style.unifiedSearchResulIconWidth
|
|
|
|
iconLeftMargin: trayWindowBackground.Style.unifiedSearchResulIconLeftMargin
|
|
|
|
titleFontSize: trayWindowBackground.Style.unifiedSearchResulTitleFontSize
|
|
|
|
sublineFontSize: trayWindowBackground.Style.unifiedSearchResulSublineFontSize
|
|
|
|
titleColor: trayWindowBackground.Style.unifiedSearchResulTitleColor
|
|
|
|
sublineColor: trayWindowBackground.Style.unifiedSearchResulSublineColor
|
|
|
|
currentFetchMoreInProgressProviderId: unifiedSearchResultsListView.model.currentFetchMoreInProgressProviderId
|
|
|
|
fetchMoreTriggerClicked: unifiedSearchResultsListView.model.fetchMoreTriggerClicked
|
|
|
|
resultClicked: unifiedSearchResultsListView.model.resultClicked
|
|
|
|
ListView.onPooled: isPooled = true
|
|
|
|
ListView.onReused: isPooled = false
|
|
|
|
}
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-11-12 23:02:58 +03:00
|
|
|
section.property: "providerName"
|
|
|
|
section.criteria: ViewSection.FullString
|
|
|
|
section.delegate: UnifiedSearchResultSectionItem {
|
|
|
|
width: unifiedSearchResultsListView.width
|
|
|
|
}
|
2021-09-09 14:33:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:17:03 +03:00
|
|
|
SyncStatus {
|
|
|
|
id: syncStatus
|
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
visible: !trayWindowBackground.isUnifiedSearchActive
|
|
|
|
|
|
|
|
anchors.top: trayWindowUnifiedSearchInputContainer.bottom
|
2021-09-14 14:17:03 +03:00
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
}
|
|
|
|
|
|
|
|
ActivityList {
|
2021-09-09 14:33:57 +03:00
|
|
|
visible: !trayWindowBackground.isUnifiedSearchActive
|
2021-09-14 14:17:03 +03:00
|
|
|
anchors.top: syncStatus.bottom
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.right: trayWindowBackground.right
|
|
|
|
anchors.bottom: trayWindowBackground.bottom
|
2021-09-09 14:33:57 +03:00
|
|
|
|
2021-11-12 22:17:15 +03:00
|
|
|
activeFocusOnTab: true
|
2021-09-14 14:17:03 +03:00
|
|
|
model: activityModel
|
|
|
|
onShowFileActivity: {
|
|
|
|
openFileActivityDialog(displayPath, absolutePath)
|
|
|
|
}
|
|
|
|
onActivityItemClicked: {
|
|
|
|
model.triggerDefaultAction(index)
|
|
|
|
}
|
|
|
|
}
|
2021-08-20 16:17:06 +03:00
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: fileActivityDialogLoader
|
|
|
|
|
|
|
|
property string displayPath: ""
|
|
|
|
property string absolutePath: ""
|
|
|
|
|
|
|
|
function refresh() {
|
|
|
|
active = true
|
|
|
|
item.model.load(activityModel.accountState, absolutePath)
|
2021-09-09 14:33:57 +03:00
|
|
|
item.show()
|
2020-01-13 11:59:34 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
|
2021-08-20 16:17:06 +03:00
|
|
|
active: false
|
|
|
|
sourceComponent: FileActivityDialog {
|
|
|
|
title: qsTr("%1 - File activity").arg(fileActivityDialogLoader.displayPath)
|
|
|
|
onClosing: fileActivityDialogLoader.active = false
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2021-08-20 16:17:06 +03:00
|
|
|
|
|
|
|
onLoaded: refresh()
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2021-08-20 16:17:06 +03:00
|
|
|
} // Rectangle trayWindowBackground
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|