2020-09-23 19:57:54 -04:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2020-09-04 11:21:36 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import "../Base"
|
|
|
|
import "../Base/Buttons"
|
|
|
|
|
|
|
|
HFlickableColumnPopup {
|
|
|
|
id: popup
|
|
|
|
|
|
|
|
property string userId
|
|
|
|
|
2020-09-04 14:05:07 -04:00
|
|
|
function addAccount() {
|
|
|
|
window.mainUI.pageLoader.show("Pages/AddAccount/AddAccount.qml")
|
|
|
|
}
|
|
|
|
|
2020-09-04 11:21:36 -04:00
|
|
|
page.footer: AutoDirectionLayout {
|
|
|
|
ApplyButton {
|
|
|
|
id: signBackButton
|
|
|
|
text: qsTr("Sign back in")
|
|
|
|
icon.name: "sign-back-in"
|
|
|
|
onClicked: {
|
2020-09-04 14:05:07 -04:00
|
|
|
addAccount()
|
2020-09-04 11:21:36 -04:00
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CancelButton {
|
|
|
|
text: qsTr("Close")
|
|
|
|
onClicked: popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-13 12:47:25 -04:00
|
|
|
onClosed: if (
|
|
|
|
window.uiState.pageProperties.userId === userId ||
|
|
|
|
(window.uiState.pageProperties.userRoomId || [])[0] === userId
|
|
|
|
) addAccount()
|
2020-09-04 14:05:07 -04:00
|
|
|
|
2020-09-04 11:21:36 -04:00
|
|
|
SummaryLabel {
|
|
|
|
text: qsTr("Signed out from %1").arg(coloredNameHtml("", userId))
|
|
|
|
textFormat: SummaryLabel.StyledText
|
|
|
|
}
|
|
|
|
|
|
|
|
DetailsLabel {
|
|
|
|
text: qsTr(
|
|
|
|
"You have been disconnected from another session, " +
|
|
|
|
"by the server for security reasons, or the access token in " +
|
|
|
|
"your configuration file is invalid."
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
onOpened: signBackButton.forceActiveFocus()
|
|
|
|
}
|