Compare commits
1 Commits
master
...
work/redst
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f3c542d04 |
@@ -8,13 +8,31 @@ import org.kde.kirigami as Kirigami
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
|
import Quotient
|
||||||
|
|
||||||
Kirigami.PromptDialog {
|
Kirigami.PromptDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property NeoChatRoom room
|
required property NeoChatRoom room
|
||||||
|
|
||||||
title: root.room.isSpace ? i18nc("@title:dialog", "Confirm Leaving Space") : i18nc("@title:dialog", "Confirm Leaving Room")
|
title: root.room.isSpace ? i18nc("@title:dialog", "Confirm Leaving Space") : i18nc("@title:dialog", "Confirm Leaving Room")
|
||||||
subtitle: root.room ? i18nc("Do you really want to leave <room name>?", "Do you really want to leave %1?", root.room.displayNameForHtml) : ""
|
subtitle: {
|
||||||
|
if (root.room) {
|
||||||
|
let message = xi18nc("@info Do you really want to leave <room name>?", "Do you really want to leave %1?", root.room.displayNameForHtml)
|
||||||
|
|
||||||
|
// List any possible side-effects the user needs to be made aware of.
|
||||||
|
if (root.room.historyVisibility !== "world_readable" && root.room.historyVisibility !== "shared") {
|
||||||
|
message += xi18nc("@info", "<br><strong>This room's history is limited to when you rejoin the room.</strong>")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (root.room.joinRule === JoinRule.JoinRule.Invite) {
|
||||||
|
message += xi18nc("@info", "<br><strong>This room can only be rejoined with an invite.</strong>");
|
||||||
|
}
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
dialogType: Kirigami.PromptDialog.Warning
|
dialogType: Kirigami.PromptDialog.Warning
|
||||||
|
|
||||||
onRejected: {
|
onRejected: {
|
||||||
@@ -28,7 +46,7 @@ Kirigami.PromptDialog {
|
|||||||
text: i18nc("@action:button", "Leave Room")
|
text: i18nc("@action:button", "Leave Room")
|
||||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
icon.name: "arrow-left-symbolic"
|
icon.name: "arrow-left-symbolic"
|
||||||
onClicked: root.room.forget();
|
//onClicked: root.room.forget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user