Disable some account settings while offline

This commit is contained in:
miruka
2020-07-10 13:04:40 -04:00
parent e34bfd48a7
commit 9caaf41eae
2 changed files with 11 additions and 6 deletions

View File

@@ -115,9 +115,11 @@ HFlickableColumnPage {
(
(! avatar.mxc && ! avatar.changed) ||
avatar.hovered ||
! ready
! ready ||
account.presence === "offline"
) ?
1 : 0
1 :
0
color: utils.hsluv(
0, 0, 0, (! avatar.mxc && overlayHover.hovered) ? 0.8 : 0.7,
@@ -130,7 +132,7 @@ HFlickableColumnPage {
MouseArea {
anchors.fill: parent
enabled: ready
enabled: ready && account.presence !== "offline"
acceptedButtons: Qt.NoButton
cursorShape:
overlayHover.hovered ?
@@ -154,7 +156,7 @@ HFlickableColumnPage {
anchors.centerIn: parent
spacing: currentSpacing
width: parent.width
opacity: ready ? 1 : 0
opacity: ready && account.presence !== "offline" ? 1 : 0
visible: opacity > 0
Behavior on opacity { HNumberAnimation {} }
@@ -219,7 +221,7 @@ HFlickableColumnPage {
HTextField {
width: parent.width
enabled: ready
enabled: ready && account.presence !== "offline"
defaultText: ready ? account.display_name : ""
maximumLength: 255