Widgets support is incredibly useful and so is this button, but it has a few problems. The most obvious is that it's still enabled even if you don't actually have the permission to start Jitsi meetings, so I fixed that. I also made sure it's hidden when viewing spaces too. Another problem is that you can't easily tell if a meeting is currently in progress either, nor do we have a good icon for that in Breeze. So I changed the tooltip and colored the icon in this case. The final problem I fixed is something not exclusive to NeoChat, but generally all chat applications with this feature - there's no confirmation! To stop "butt-dialing" random people or rooms, I added a prompt before starting or joining a meeting.
23 lines
878 B
QML
23 lines
878 B
QML
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
import QtQuick
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
Kirigami.PromptDialog {
|
|
id: root
|
|
|
|
required property bool hasExistingMeeting
|
|
|
|
title: hasExistingMeeting ? i18nc("@title", "Join Meeting") : i18nc("@title", "Start Meeting")
|
|
subtitle: hasExistingMeeting ? i18nc("@info:label", "You are about to join a Jitsi meeting in your web browser.") : i18nc("@info:label", "You are about to start a new Jitsi meeting in your web browser.")
|
|
standardButtons: Kirigami.Dialog.Cancel
|
|
|
|
customFooterActions: Kirigami.Action {
|
|
icon.name: "camera-video-symbolic"
|
|
text: hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start")
|
|
onTriggered: root.accept()
|
|
}
|
|
}
|