Compare commits

..

4 Commits

Author SHA1 Message Date
Tobias Fella
8e906bb043 Import libQuotient QML module where necessary 2026-02-09 21:08:08 -05:00
Joshua Goins
15019d79fc Port to the new libquotient QML module
This removes our weird hacky QML thing for accessing JoinRule, and
switches to the much more elaborate QML module in libQuotient.
2026-02-09 21:08:08 -05:00
Joshua Goins
806e24c370 Bump libQuotient requirement to 0.10.0
Needed for the new QML module.
2026-02-09 21:08:08 -05:00
l10n daemon script
44f78353ab GIT_SILENT Sync po/docbooks with svn 2026-02-10 01:45:39 +00:00
9 changed files with 346 additions and 344 deletions

View File

@@ -106,7 +106,7 @@ if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU)
find_package(KF6DBusAddons ${KF_MIN_VERSION} REQUIRED)
endif()
find_package(QuotientQt6 0.9.3)
find_package(QuotientQt6 0.10.0)
set_package_properties(QuotientQt6 PROPERTIES
TYPE REQUIRED
DESCRIPTION "Qt wrapper around Matrix API"

View File

@@ -9,15 +9,15 @@ msgstr ""
"Project-Id-Version: neochat\n"
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
"POT-Creation-Date: 2026-02-07 00:43+0000\n"
"PO-Revision-Date: 2026-02-01 14:06+0300\n"
"Last-Translator: Emir SARI <emir_sari@îcloud.com>\n"
"Language-Team: Turkish <kde-l10n-tr@kde.org>\n"
"PO-Revision-Date: 2026-02-09 20:01+0300\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: Turkish <kde-i18n-doc@kde.org>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 25.12.1\n"
"X-Generator: Lokalize 25.07.70\n"
#: src/app/controller.cpp:172
#, kde-format
@@ -1003,10 +1003,7 @@ msgid "Explore"
msgstr "Keşfet"
#: src/app/qml/ReasonDialog.qml:33
#, fuzzy, kde-kuit-format
#| msgid ""
#| "This report will <strong>only</strong> be sent to the administrators of "
#| "<link>%1</link> (your server)."
#, kde-kuit-format
msgctxt "@info"
msgid ""
"This report will <strong>only</strong> be sent to the administrators of "

View File

@@ -227,7 +227,6 @@ int main(int argc, char *argv[])
Registration::instance().setAccountManager(accountManager.get());
qml_register_types_org_kde_neochat();
qmlRegisterUncreatableMetaObject(Quotient::staticMetaObject, "Quotient", 1, 0, "JoinRule", u"Access to JoinRule enum only"_s);
QQmlApplicationEngine engine;

View File

@@ -11,6 +11,7 @@ import QtQml
import org.kde.kirigami as Kirigami
import org.kde.neochat
import io.github.quotient_im.libquotient
Kirigami.Page {
id: root

View File

@@ -5,6 +5,7 @@ import QtQuick
import QtQml
import org.kde.neochat
import io.github.quotient_im.libquotient
VerificationMessage {
id: root

View File

@@ -9,7 +9,7 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.components as KirigamiComponents
import Quotient
import io.github.quotient_im.libquotient
import org.kde.neochat
import org.kde.neochat.settings
@@ -126,7 +126,7 @@ KirigamiComponents.ConvergentContextMenu {
Kirigami.Action {
text: i18nc("@action:inmenu", "Copy Room Link")
icon.name: "edit-copy"
visible: !root.room.isDirectChat() && root.room.joinRule !== JoinRule.Invite
visible: !root.room.isDirectChat() && root.room.joinRule !== Quotient.JoinRule.Invite
onTriggered: {
// The canonical alias (if it exists) otherwise the first available alias
const firstAlias = root.room.aliases[0];

View File

@@ -12,344 +12,348 @@ import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.neochat
import org.kde.neochat.devtools
Kirigami.ScrollablePage {
FormCard.FormCardPage {
id: root
required property NeoChatConnection connection
title: i18nc("@title:window", "General")
Kirigami.Form {
Kirigami.FormGroup {
title: Qt.platform.os === "android" ? "" : i18nc("@title:group", "General Settings")
Kirigami.FormEntry {
visible: Controller.supportSystemTray
contentItem: QQC2.CheckBox {
text: i18n("Show in System Tray")
checked: NeoChatConfig.systemTray
enabled: !NeoChatConfig.isSystemTrayImmutable
onToggled: {
NeoChatConfig.systemTray = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: minimizeDelegate
visible: Controller.supportSystemTray && !Kirigami.Settings.isMobile && NeoChatConfig.systemTray
contentItem: QQC2.CheckBox {
text: i18n("Minimize to system tray on startup")
checked: NeoChatConfig.minimizeToSystemTrayOnStartup
enabled: NeoChatConfig.systemTray && !NeoChatConfig.isMinimizeToSystemTrayOnStartupImmutable
onToggled: {
NeoChatConfig.minimizeToSystemTrayOnStartup = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {
visible: minimizeDelegate.visible
}
Kirigami.FormEntry {
id: automaticallyDelegate
visible: Qt.platform.os !== "android"
contentItem: QQC2.CheckBox {
text: i18n("Automatically hide/unhide the room information when resizing the window")
checked: NeoChatConfig.autoRoomInfoDrawer
enabled: !NeoChatConfig.isAutoRoomInfoDrawerImmutable
onToggled: {
NeoChatConfig.autoRoomInfoDrawer = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: categorizeDelegate
contentItem: QQC2.CheckBox {
text: i18n("Show all rooms in \"Home\" tab")
checked: NeoChatConfig.allRoomsInHome
enabled: !NeoChatConfig.isAllRoomsInHomeImmutable
onToggled: {
NeoChatConfig.allRoomsInHome = checked;
NeoChatConfig.save();
}
}
FormCard.FormHeader {
title: i18nc("@title:group", "General Settings")
visible: Qt.platform.os !== "android"
}
FormCard.FormCard {
FormCard.FormCheckDelegate {
id: closeDelegate
text: i18n("Show in System Tray")
checked: NeoChatConfig.systemTray
visible: Controller.supportSystemTray
enabled: !NeoChatConfig.isSystemTrayImmutable
onToggled: {
NeoChatConfig.systemTray = checked;
NeoChatConfig.save();
}
}
Kirigami.FormGroup {
title: i18nc("@title:group", "Room List Sort Order")
Kirigami.FormEntry {
title: i18nc("@info:label", "Hidden events are not considered as recent activity when sorting rooms.")
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
subtitle: i18nc("@info", "Rooms with unread notifications will be shown first.")
contentItem: QQC2.RadioButton {
text: i18nc("As in 'sort something based on last activity'", "Importance")
checked: NeoChatConfig.sortOrder === 1
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 1
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
}
Kirigami.FormEntry {
contentItem: QQC2.RadioButton {
text: i18nc("As in 'sort something alphabetically'", "Alphabetical")
checked: NeoChatConfig.sortOrder === 0
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 0
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
}
Kirigami.FormEntry {
subtitle: i18nc("@info", "Rooms with the newest events will be shown first.")
contentItem: QQC2.RadioButton {
text: i18nc("As in 'sort something based on the last event'", "Newest Events")
checked: NeoChatConfig.sortOrder === 2
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 2
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
}
Kirigami.FormEntry {
id: openCustomRoomSortButton
contentItem: QQC2.RadioButton {
text: i18nc("@option:radio", "Custom")
checked: NeoChatConfig.sortOrder === 3
enabled: !NeoChatConfig.isSortOrderImmutable
onClicked: {
Qt.createComponent('org.kde.neochat.settings', 'RoomSortParameterDialog').createObject(root).open();
}
}
FormCard.FormDelegateSeparator {
above: closeDelegate
below: minimizeDelegate
}
FormCard.FormCheckDelegate {
id: minimizeDelegate
text: i18n("Minimize to system tray on startup")
checked: NeoChatConfig.minimizeToSystemTrayOnStartup
visible: Controller.supportSystemTray && !Kirigami.Settings.isMobile && NeoChatConfig.systemTray
enabled: NeoChatConfig.systemTray && !NeoChatConfig.isMinimizeToSystemTrayOnStartupImmutable
onToggled: {
NeoChatConfig.minimizeToSystemTrayOnStartup = checked;
NeoChatConfig.save();
}
}
Kirigami.FormGroup {
title: i18nc("@title", "Timeline")
Kirigami.FormEntry {
id: markAsReadCombo
title: i18n("Mark messages as read when:")
contentItem: QQC2.ComboBox {
textRole: "name"
valueRole: "value"
model: [
{
name: i18n("Never"),
value: 0
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when entering the room", "Entering the room"),
value: 1
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when entering the room and all messages are visible on screen", "Entering the room and all unread messages are visible"),
value: 2
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when exiting the room", "Exiting the room"),
value: 3
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when exiting the room and all messages are visible on screen", "Exiting the room and all unread messages are visible"),
value: 4
}
]
Component.onCompleted: currentIndex = NeoChatConfig.markReadCondition
onCurrentValueChanged: NeoChatConfig.markReadCondition = currentValue
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: showDeletedMessages
contentItem: QQC2.CheckBox {
text: i18n("Show deleted messages")
checked: NeoChatConfig.showDeletedMessages
enabled: !NeoChatConfig.isShowDeletedMessagesImmutable
onToggled: {
NeoChatConfig.showDeletedMessages = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: showStateEvents
contentItem: QQC2.CheckBox {
text: i18n("Show state events")
checked: NeoChatConfig.showStateEvent
enabled: !NeoChatConfig.isShowStateEventImmutable
onToggled: {
NeoChatConfig.showStateEvent = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {
visible: NeoChatConfig.showStateEvent
}
Kirigami.FormEntry {
id: showLeaveJoinEventDelegate
visible: NeoChatConfig.showStateEvent
contentItem: QQC2.CheckBox {
text: i18n("Show leave and join events")
checked: NeoChatConfig.showLeaveJoinEvent
enabled: !NeoChatConfig.isShowLeaveJoinEventImmutable
onToggled: {
NeoChatConfig.showLeaveJoinEvent = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {
visible: NeoChatConfig.showStateEvent
}
Kirigami.FormEntry {
id: showNameDelegate
visible: NeoChatConfig.showStateEvent
contentItem: QQC2.CheckBox {
text: i18n("Show name change events")
checked: NeoChatConfig.showRename
enabled: !NeoChatConfig.isShowRenameImmutable
onToggled: {
NeoChatConfig.showRename = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {
visible: NeoChatConfig.showStateEvent
}
Kirigami.FormEntry {
id: showAvatarChangeDelegate
visible: NeoChatConfig.showStateEvent
contentItem: QQC2.CheckBox {
text: i18n("Show name change events")
checked: NeoChatConfig.showAvatarUpdate
enabled: !NeoChatConfig.isShowAvatarUpdateImmutable
onToggled: {
NeoChatConfig.showAvatarUpdate = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
above: minimizeDelegate
below: automaticallyDelegate
visible: minimizeDelegate.visible
}
FormCard.FormCheckDelegate {
id: automaticallyDelegate
text: i18n("Automatically hide/unhide the room information when resizing the window")
checked: NeoChatConfig.autoRoomInfoDrawer
enabled: !NeoChatConfig.isAutoRoomInfoDrawerImmutable
visible: Qt.platform.os !== "android"
onToggled: {
NeoChatConfig.autoRoomInfoDrawer = checked;
NeoChatConfig.save();
}
}
Kirigami.FormGroup {
title: i18nc("Chat Editor", "Editor")
Kirigami.FormEntry {
visible: !Kirigami.Settings.isMobile
contentItem: QQC2.RadioButton {
text: i18nc("@option:radio", "Send messages with Enter")
checked: NeoChatConfig.sendMessageWith === 0
enabled: !NeoChatConfig.isSendMessageWithImmutable
onToggled: {
NeoChatConfig.sendMessageWith = 0
NeoChatConfig.save()
}
}
}
Kirigami.FormEntry {
visible: !Kirigami.Settings.isMobile
contentItem: QQC2.RadioButton {
text: i18nc("@option:radio", "Send messages with Ctrl+Enter")
checked: NeoChatConfig.sendMessageWith === 1
enabled: !NeoChatConfig.isSendMessageWithImmutable
onToggled: {
NeoChatConfig.sendMessageWith = 1
NeoChatConfig.save()
}
}
}
Kirigami.FormSeparator {
visible: !Kirigami.Settings.isMobile
}
Kirigami.FormEntry {
id: quickEditCheckbox
contentItem: QQC2.CheckBox {
text: i18n("Use s/text/replacement syntax to edit your last message")
checked: NeoChatConfig.allowQuickEdit
enabled: !NeoChatConfig.isAllowQuickEditImmutable
onToggled: {
NeoChatConfig.allowQuickEdit = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: typingNotificationsDelegate
contentItem: QQC2.CheckBox {
text: i18n("Send typing notifications")
checked: NeoChatConfig.typingNotifications
enabled: !NeoChatConfig.isTypingNotificationsImmutable
onToggled: {
NeoChatConfig.typingNotifications = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
above: automaticallyDelegate
below: categorizeDelegate
}
FormCard.FormCheckDelegate {
id: categorizeDelegate
text: i18n("Show all rooms in \"Home\" tab")
checked: NeoChatConfig.allRoomsInHome
enabled: !NeoChatConfig.isAllRoomsInHomeImmutable
onToggled: {
NeoChatConfig.allRoomsInHome = checked;
NeoChatConfig.save();
}
}
Kirigami.FormGroup {
title: i18n("Developer Settings")
Kirigami.FormEntry {
id: enableDeveloperToolsDelegate
contentItem: QQC2.CheckBox {
text: i18n("Enable developer tools")
checked: NeoChatConfig.developerTools
enabled: !NeoChatConfig.isDeveloperToolsImmutable
onToggled: {
NeoChatConfig.developerTools = checked;
NeoChatConfig.save();
}
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
id: openDeveloperToolsDelegate
visible: NeoChatConfig.developerTools
leadingItems: Kirigami.Icon {
implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: Kirigami.Units.iconSizes.smallMedium
source: "tools"
}
contentItem: QQC2.Label {
text: i18n("Enable developer tools")
}
onClicked: root.QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), {
connection: root.connection
}, {
title: i18n("Developer Tools")
});
}
FormCard.FormHeader {
title: i18nc("@title:group", "Room List Sort Order")
}
FormCard.FormCard {
FormCard.FormTextDelegate {
text: i18nc("@info:label", "Hidden events are not considered as recent activity when sorting rooms.")
}
FormCard.FormDelegateSeparator {}
FormCard.FormRadioDelegate {
text: i18nc("As in 'sort something based on last activity'", "Importance")
description: i18nc("@info", "Rooms with unread notifications will be shown first.")
checked: NeoChatConfig.sortOrder === 1
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 1
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
Kirigami.FormGroup {
title: i18nc("@title:group", "Default Settings")
Kirigami.FormEntry {
leadingItems: Kirigami.Icon {
implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: Kirigami.Units.iconSizes.smallMedium
source: "kt-restore-defaults-symbolic"
}
contentItem: QQC2.Label {
text: i18nc("@action:button", "Reset all configuration values to their default…")
}
onClicked: resetDialog.open()
FormCard.FormRadioDelegate {
text: i18nc("As in 'sort something alphabetically'", "Alphabetical")
checked: NeoChatConfig.sortOrder === 0
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 0
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
FormCard.FormRadioDelegate {
text: i18nc("As in 'sort something based on the last event'", "Newest Events")
description: i18nc("@info", "Rooms with the newest events will be shown first.")
checked: NeoChatConfig.sortOrder === 2
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 2
NeoChatConfig.customSortOrder = []
NeoChatConfig.save()
}
}
FormCard.FormRadioDelegate {
id: openCustomRoomSortButton
text: i18nc("@option:radio", "Custom")
checked: NeoChatConfig.sortOrder === 3
enabled: !NeoChatConfig.isSortOrderImmutable
onClicked: {
Qt.createComponent('org.kde.neochat.settings', 'RoomSortParameterDialog').createObject(root).open();
}
}
}
FormCard.FormHeader {
title: i18nc("@title", "Timeline")
}
FormCard.FormCard {
FormCard.FormComboBoxDelegate {
id: markAsReadCombo
text: i18n("Mark messages as read when:")
textRole: "name"
valueRole: "value"
model: [
{
name: i18n("Never"),
value: 0
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when entering the room", "Entering the room"),
value: 1
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when entering the room and all messages are visible on screen", "Entering the room and all unread messages are visible"),
value: 2
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when exiting the room", "Exiting the room"),
value: 3
},
{
name: i18nc("@item:inlistbox As in mark messages in the room as read when exiting the room and all messages are visible on screen", "Exiting the room and all unread messages are visible"),
value: 4
}
]
Component.onCompleted: currentIndex = NeoChatConfig.markReadCondition
onCurrentValueChanged: NeoChatConfig.markReadCondition = currentValue
}
FormCard.FormDelegateSeparator {
above: markAsReadCombo
below: showDeletedMessages
}
FormCard.FormCheckDelegate {
id: showDeletedMessages
text: i18n("Show deleted messages")
checked: NeoChatConfig.showDeletedMessages
enabled: !NeoChatConfig.isShowDeletedMessagesImmutable
onToggled: {
NeoChatConfig.showDeletedMessages = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
above: showDeletedMessages
below: showStateEvents
}
FormCard.FormCheckDelegate {
id: showStateEvents
text: i18n("Show state events")
checked: NeoChatConfig.showStateEvent
enabled: !NeoChatConfig.isShowStateEventImmutable
onToggled: {
NeoChatConfig.showStateEvent = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
visible: NeoChatConfig.showStateEvent
above: showStateEvents
below: showLeaveJoinEventDelegate
}
FormCard.FormCheckDelegate {
id: showLeaveJoinEventDelegate
visible: NeoChatConfig.showStateEvent
text: i18n("Show leave and join events")
checked: NeoChatConfig.showLeaveJoinEvent
enabled: !NeoChatConfig.isShowLeaveJoinEventImmutable
onToggled: {
NeoChatConfig.showLeaveJoinEvent = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
visible: NeoChatConfig.showStateEvent
above: showLeaveJoinEventDelegate
below: showNameDelegate
}
FormCard.FormCheckDelegate {
id: showNameDelegate
visible: NeoChatConfig.showStateEvent
text: i18n("Show name change events")
checked: NeoChatConfig.showRename
enabled: !NeoChatConfig.isShowRenameImmutable
onToggled: {
NeoChatConfig.showRename = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
visible: NeoChatConfig.showStateEvent
above: showNameDelegate
below: showAvatarChangeDelegate
}
FormCard.FormCheckDelegate {
id: showAvatarChangeDelegate
visible: NeoChatConfig.showStateEvent
text: i18n("Show avatar update events")
checked: NeoChatConfig.showAvatarUpdate
enabled: !NeoChatConfig.isShowAvatarUpdateImmutable
onToggled: {
NeoChatConfig.showAvatarUpdate = checked;
NeoChatConfig.save();
}
}
}
FormCard.FormHeader {
title: i18nc("Chat Editor", "Editor")
}
FormCard.FormCard {
FormCard.FormRadioDelegate {
text: i18nc("@option:radio", "Send messages with Enter")
checked: NeoChatConfig.sendMessageWith === 0
visible: !Kirigami.Settings.isMobile
enabled: !NeoChatConfig.isSendMessageWithImmutable
onToggled: {
NeoChatConfig.sendMessageWith = 0
NeoChatConfig.save()
}
}
FormCard.FormRadioDelegate {
id: sendWithEnterRadio
text: i18nc("@option:radio", "Send messages with Ctrl+Enter")
checked: NeoChatConfig.sendMessageWith === 1
visible: !Kirigami.Settings.isMobile
enabled: !NeoChatConfig.isSendMessageWithImmutable
onToggled: {
NeoChatConfig.sendMessageWith = 1
NeoChatConfig.save()
}
}
FormCard.FormDelegateSeparator {
visible: !Kirigami.Settings.isMobile
above: sendWithEnterRadio
below: quickEditCheckbox
}
FormCard.FormCheckDelegate {
id: quickEditCheckbox
text: i18n("Use s/text/replacement syntax to edit your last message")
checked: NeoChatConfig.allowQuickEdit
enabled: !NeoChatConfig.isAllowQuickEditImmutable
onToggled: {
NeoChatConfig.allowQuickEdit = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
above: quickEditCheckbox
below: typingNotificationsDelegate
}
FormCard.FormCheckDelegate {
id: typingNotificationsDelegate
text: i18n("Send typing notifications")
checked: NeoChatConfig.typingNotifications
enabled: !NeoChatConfig.isTypingNotificationsImmutable
onToggled: {
NeoChatConfig.typingNotifications = checked;
NeoChatConfig.save();
}
}
}
FormCard.FormHeader {
title: i18n("Developer Settings")
}
FormCard.FormCard {
FormCard.FormCheckDelegate {
id: enableDeveloperToolsDelegate
text: i18n("Enable developer tools")
checked: NeoChatConfig.developerTools
enabled: !NeoChatConfig.isDeveloperToolsImmutable
onToggled: {
NeoChatConfig.developerTools = checked;
NeoChatConfig.save();
}
}
FormCard.FormDelegateSeparator {
above: enableDeveloperToolsDelegate
below: openDeveloperToolsDelegate
}
FormCard.FormButtonDelegate {
id: openDeveloperToolsDelegate
visible: NeoChatConfig.developerTools
icon.name: "tools"
text: i18n("Open Developer Tools")
onClicked: root.QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), {
connection: root.connection
}, {
title: i18n("Developer Tools")
});
}
}
FormCard.FormHeader {
title: i18nc("@title:group", "Default Settings")
}
FormCard.FormCard {
FormCard.FormButtonDelegate {
icon.name: "kt-restore-defaults-symbolic"
text: i18nc("@action:button", "Reset all configuration values to their default…")
onClicked: resetDialog.open()
}
}
Kirigami.PromptDialog {
id: resetDialog

View File

@@ -13,7 +13,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.neochat
import Quotient
import io.github.quotient_im.libquotient
FormCard.FormCardPage {
id: root
@@ -65,23 +65,23 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate {
text: i18nc("@option:check", "Private (invite only)")
description: i18nc("@info", "Only invited people can join.")
checked: root.room.joinRule === JoinRule.Invite
checked: root.room.joinRule === Quotient.JoinRule.Invite
enabled: root.room.canSendState("m.room.join_rules")
onCheckedChanged: if (checked && root.room.joinRule != JoinRule.Invite) {
root.room.joinRule = JoinRule.Invite;
onCheckedChanged: if (checked && root.room.joinRule != Quotient.JoinRule.Invite) {
root.room.joinRule = Quotient.JoinRule.Invite;
}
}
FormCard.FormRadioDelegate {
text: i18nc("@option:check", "Space members")
description: i18nc("@info", "Anyone in the selected spaces can find and join.") + (!["8", "9", "10", "11", "12"].includes(root.room.version) ? `\n${root.needUpgradeRoom}` : "")
checked: root.room.joinRule === JoinRule.Restricted
checked: root.room.joinRule === Quotient.JoinRule.Restricted
enabled: root.room.canSendState("m.room.join_rules") && ["8", "9", "10", "11", "12"].includes(root.room.version)
onCheckedChanged: if (checked && root.room.joinRule != JoinRule.Restricted) {
onCheckedChanged: if (checked && root.room.joinRule != Quotient.JoinRule.Restricted) {
(selectSpacesDialog.createObject(QQC2.Overlay.overlay) as SelectSpacesDialog).open();
}
contentItem.children: QQC2.Button {
visible: root.room.joinRule === JoinRule.Restricted
visible: root.room.joinRule === Quotient.JoinRule.Restricted
text: i18nc("@action:button", "Select spaces")
icon.name: "list-add"
@@ -102,20 +102,20 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate {
text: i18nc("@option:check", "Knock")
description: i18nc("@info", "People not in the room need to request an invite to join the room.") + (!["7", "8", "9", "10", "11", "12"].includes(root.room.version) ? `\n${root.needUpgradeRoom}` : "")
checked: root.room.joinRule === JoinRule.Knock
checked: root.room.joinRule === Quotient.JoinRule.Knock
// https://spec.matrix.org/v1.4/rooms/#feature-matrix
enabled: root.room.canSendState("m.room.join_rules") && ["7", "8", "9", "10", "11", "12"].includes(root.room.version)
onCheckedChanged: if (checked && root.room.joinRule != JoinRule.Knock) {
root.room.joinRule = JoinRule.Knock;
onCheckedChanged: if (checked && root.room.joinRule != Quotient.JoinRule.Knock) {
root.room.joinRule = Quotient.JoinRule.Knock;
}
}
FormCard.FormRadioDelegate {
text: i18nc("@option:check", "Public")
description: i18nc("@option:check", "Anyone can find and join.")
checked: root.room.joinRule === JoinRule.Public
checked: root.room.joinRule === Quotient.JoinRule.Public
enabled: root.room.canSendState("m.room.join_rules")
onCheckedChanged: if (checked && root.room.joinRule != JoinRule.Public) {
root.room.joinRule = JoinRule.Public;
onCheckedChanged: if (checked && root.room.joinRule != Quotient.JoinRule.Public) {
root.room.joinRule = Quotient.JoinRule.Public;
}
}
}

View File

@@ -11,7 +11,7 @@ import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kirigamiaddons.labs.components as Components
import Quotient
import io.github.quotient_im.libquotient
import org.kde.neochat
@@ -44,7 +44,7 @@ Kirigami.Dialog {
ids.push(spaceGroup.buttons[i].modelData.id);
}
}
root.room.setJoinRule(JoinRule.Restricted, ids);
root.room.setJoinRule(Quotient.JoinRule.Restricted, ids);
}
QQC2.ButtonGroup {