Compare commits
3 Commits
work/redst
...
work/tobia
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
092e092e18 | ||
|
|
de7f2654f4 | ||
|
|
ccf9ed66f8 |
@@ -7,7 +7,7 @@ msgstr ""
|
||||
"Project-Id-Version: neochat\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2026-02-02 00:43+0000\n"
|
||||
"PO-Revision-Date: 2026-01-28 20:57+0400\n"
|
||||
"PO-Revision-Date: 2026-02-05 11:07+0400\n"
|
||||
"Last-Translator: Zayed Al-Saidi <zayed.alsaidi@gmail.com>\n"
|
||||
"Language-Team: ar\n"
|
||||
"Language: ar\n"
|
||||
@@ -3742,9 +3742,7 @@ msgid "Settings"
|
||||
msgstr "إعدادات"
|
||||
|
||||
#: src/login/WelcomePage.qml:277
|
||||
#, fuzzy, kde-format
|
||||
#| msgctxt "@action:button As in 'go back'"
|
||||
#| msgid "Back"
|
||||
#, kde-format
|
||||
msgctxt "@action:button"
|
||||
msgid "Go Back"
|
||||
msgstr "عُد"
|
||||
|
||||
@@ -5,7 +5,7 @@ msgstr ""
|
||||
"Project-Id-Version: neochat\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2026-02-02 00:43+0000\n"
|
||||
"PO-Revision-Date: 2026-01-29 09:12+0100\n"
|
||||
"PO-Revision-Date: 2026-02-02 09:07+0100\n"
|
||||
"Last-Translator: Xavier Besnard <xavier.besnard@kde.org>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
@@ -3803,9 +3803,7 @@ msgid "Settings"
|
||||
msgstr "Configuration"
|
||||
|
||||
#: src/login/WelcomePage.qml:277
|
||||
#, fuzzy, kde-format
|
||||
#| msgctxt "@action:button As in 'go back'"
|
||||
#| msgid "Back"
|
||||
#, kde-format
|
||||
msgctxt "@action:button"
|
||||
msgid "Go Back"
|
||||
msgstr "Revenir en arrière"
|
||||
|
||||
@@ -7734,7 +7734,3 @@ msgid "%2 is typing"
|
||||
msgid_plural "%2 are typing"
|
||||
msgstr[0] "%2 skriv"
|
||||
msgstr[1] "%2 skriv"
|
||||
|
||||
#~ msgctxt "@action:button"
|
||||
#~ msgid "Go back"
|
||||
#~ msgstr "Gå tilbake"
|
||||
|
||||
@@ -227,6 +227,7 @@ 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;
|
||||
|
||||
|
||||
@@ -11,10 +11,8 @@ bool UserFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP
|
||||
if (!m_allowEmpty && m_filterText.length() < 1) {
|
||||
return false;
|
||||
}
|
||||
if (m_membership != Quotient::Membership::Invalid) {
|
||||
if (sourceModel()->data(sourceModel()->index(sourceRow, 0), UserListModel::MembershipRole).value<Quotient::Membership>() != m_membership) {
|
||||
return false;
|
||||
}
|
||||
if (sourceModel()->data(sourceModel()->index(sourceRow, 0), UserListModel::MembershipRole).value<Quotient::Membership>() != Quotient::Membership::Join) {
|
||||
return false;
|
||||
}
|
||||
return sourceModel()->data(sourceModel()->index(sourceRow, 0), UserListModel::DisplayNameRole).toString().contains(m_filterText, Qt::CaseInsensitive)
|
||||
|| sourceModel()->data(sourceModel()->index(sourceRow, 0), UserListModel::UserIdRole).toString().contains(m_filterText, Qt::CaseInsensitive);
|
||||
@@ -43,15 +41,4 @@ void UserFilterModel::setAllowEmpty(bool allowEmpty)
|
||||
Q_EMIT allowEmptyChanged();
|
||||
}
|
||||
|
||||
Quotient::Membership UserFilterModel::membership() const
|
||||
{
|
||||
return m_membership;
|
||||
}
|
||||
|
||||
void UserFilterModel::setMembership(const Quotient::Membership state)
|
||||
{
|
||||
m_membership = state;
|
||||
Q_EMIT membershipChanged();
|
||||
}
|
||||
|
||||
#include "moc_userfiltermodel.cpp"
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Quotient/quotient_common.h>
|
||||
|
||||
#include <QQmlEngine>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
@@ -27,10 +25,7 @@ class UserFilterModel : public QSortFilterProxyModel
|
||||
*/
|
||||
Q_PROPERTY(QString filterText READ filterText WRITE setFilterText NOTIFY filterTextChanged)
|
||||
Q_PROPERTY(bool allowEmpty READ allowEmpty WRITE setAllowEmpty NOTIFY allowEmptyChanged)
|
||||
/**
|
||||
* @brief Only shows users with this membership state.
|
||||
*/
|
||||
Q_PROPERTY(Quotient::Membership membership READ membership WRITE setMembership NOTIFY membershipChanged)
|
||||
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
|
||||
@@ -47,16 +42,11 @@ public:
|
||||
bool allowEmpty() const;
|
||||
void setAllowEmpty(bool allowEmpty);
|
||||
|
||||
Quotient::Membership membership() const;
|
||||
void setMembership(Quotient::Membership state);
|
||||
|
||||
Q_SIGNALS:
|
||||
void filterTextChanged();
|
||||
void allowEmptyChanged();
|
||||
void membershipChanged();
|
||||
|
||||
private:
|
||||
QString m_filterText;
|
||||
bool m_allowEmpty = false;
|
||||
Quotient::Membership m_membership = Quotient::Membership::Invalid;
|
||||
};
|
||||
|
||||
@@ -261,7 +261,6 @@ QQC2.ScrollView {
|
||||
id: userFilterModel
|
||||
sourceModel: root.userListModel
|
||||
allowEmpty: true
|
||||
membership: JoinRule.Join
|
||||
}
|
||||
|
||||
clip: true
|
||||
|
||||
@@ -9,7 +9,7 @@ import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.components as KirigamiComponents
|
||||
|
||||
import io.github.quotient_im.libquotient
|
||||
import Quotient
|
||||
|
||||
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 !== Quotient.Invite
|
||||
visible: !root.room.isDirectChat() && root.room.joinRule !== JoinRule.Invite
|
||||
onTriggered: {
|
||||
// The canonical alias (if it exists) otherwise the first available alias
|
||||
const firstAlias = root.room.aliases[0];
|
||||
|
||||
@@ -52,7 +52,6 @@ ecm_add_qml_module(Settings GENERATE_PLUGIN_SOURCE
|
||||
RoomAdvancedPage.qml
|
||||
KeyboardShortcutsPage.qml
|
||||
Members.qml
|
||||
MembersList.qml
|
||||
SOURCES
|
||||
colorschemer.cpp
|
||||
threepidaddhelper.cpp
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.labs.components as KirigamiComponents
|
||||
import org.kde.kitemmodels
|
||||
|
||||
import org.kde.neochat
|
||||
import io.github.quotient_im.libquotient
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
@@ -29,63 +28,6 @@ FormCard.FormCardPage {
|
||||
showMute: false
|
||||
}
|
||||
|
||||
Component {
|
||||
id: bannedMembersPage
|
||||
MembersList {
|
||||
title: i18nc("@title", "Banned Members")
|
||||
membership: Quotient.MembershipMask.Ban
|
||||
room: root.room
|
||||
confirmationTitle: i18nc("@title:dialog", "Unban User")
|
||||
confirmationSubtitle: i18nc("@info %1 is a matrix ID", "Do you really want to unban %1?", currentMemberId)
|
||||
icon: "checkmark-symbolic"
|
||||
actionText: i18nc("@action:button", "Unban…")
|
||||
actionConfirmationText: i18nc("@action:button", "Unban")
|
||||
actionVisible: root.room.canSendState("ban")
|
||||
|
||||
onActionTaken: memberId => root.room.unban(memberId)
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: invitedMembersPage
|
||||
MembersList {
|
||||
title: i18nc("@title", "Invited Members")
|
||||
membership: Quotient.MembershipMask.Invite
|
||||
room: root.room
|
||||
confirmationTitle: i18nc("@title:dialog", "Uninvite User")
|
||||
confirmationSubtitle: i18nc("@info %1 is a matrix ID", "Do you really want to uninvite %1?", currentMemberId)
|
||||
icon: "im-ban-kick-user-symbolic"
|
||||
actionText: i18nc("@action:button", "Uninvite…")
|
||||
actionConfirmationText: i18nc("@action:button", "Uninvite")
|
||||
actionVisible: root.room.canSendState("kick")
|
||||
|
||||
onActionTaken: memberId => root.room.kickMember(memberId, "Revoked invite")
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormCard {
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing * 4
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
id: bannedMemberDelegate
|
||||
|
||||
icon.name: "im-ban-user-symbolic"
|
||||
text: i18nc("@action:button", "Banned Members")
|
||||
onClicked: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).layers.push(bannedMembersPage)
|
||||
}
|
||||
FormCard.FormDelegateSeparator {
|
||||
above: bannedMemberDelegate
|
||||
below: inviteMemberDelegate
|
||||
}
|
||||
FormCard.FormButtonDelegate {
|
||||
id: inviteMemberDelegate
|
||||
|
||||
icon.name: "list-add-user-symbolic"
|
||||
text: i18nc("@action:button", "Invited Members")
|
||||
onClicked: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).layers.push(invitedMembersPage)
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
title: i18nc("@title", "Privileged Members")
|
||||
visible: !root.loading
|
||||
@@ -161,7 +103,6 @@ FormCard.FormCardPage {
|
||||
id: userListFilterModel
|
||||
sourceModel: RoomManager.userListModel
|
||||
filterText: userListSearchField.text
|
||||
membership: Quotient.MembershipMask.Join
|
||||
|
||||
onFilterTextChanged: {
|
||||
if (filterText.length > 0 && !userListSearchPopup.visible) {
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2026 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kirigamiaddons.delegates as Delegates
|
||||
import org.kde.kirigamiaddons.labs.components as KirigamiComponents
|
||||
import org.kde.kitemmodels
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
||||
required property NeoChatRoom room
|
||||
property alias membership: userFilterModel.membership
|
||||
property alias confirmationTitle: actionDialog.title
|
||||
property alias confirmationSubtitle: actionDialog.subtitle
|
||||
property string currentMemberId
|
||||
required property string icon
|
||||
required property string actionText
|
||||
required property string actionConfirmationText
|
||||
required property bool actionVisible
|
||||
|
||||
signal actionTaken(memberId: string)
|
||||
|
||||
FormCard.FormCard {
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing * 4
|
||||
Layout.fillWidth: true
|
||||
|
||||
FormCard.FormPlaceholderMessageDelegate {
|
||||
text: i18nc("@info:placeholder", "No members")
|
||||
visible: userRepeater.count === 0
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: userRepeater
|
||||
|
||||
model: UserFilterModel {
|
||||
id: userFilterModel
|
||||
sourceModel: RoomManager.userListModel
|
||||
allowEmpty: true
|
||||
}
|
||||
|
||||
delegate: FormCard.FormTextDelegate {
|
||||
id: userDelegate
|
||||
|
||||
required property string userId
|
||||
|
||||
text: userId
|
||||
textItem.textFormat: Text.PlainText
|
||||
|
||||
contentItem.children: RowLayout {
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
||||
QQC2.Button {
|
||||
icon.name: root.icon
|
||||
visible: root.actionVisible
|
||||
text: root.actionText
|
||||
|
||||
onClicked: {
|
||||
root.currentMemberId = userDelegate.userId;
|
||||
actionDialog.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.PromptDialog {
|
||||
id: actionDialog
|
||||
|
||||
parent: root.QQC2.Overlay.overlay
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
icon.name: root.icon
|
||||
text: root.actionConfirmationText
|
||||
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: root.actionTaken(root.currentMemberId)
|
||||
}
|
||||
}
|
||||
@@ -7,354 +7,329 @@ import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
import org.kde.neochat.devtools
|
||||
|
||||
FormCard.FormCardPage {
|
||||
Kirigami.ScrollablePage {
|
||||
id: root
|
||||
|
||||
required property NeoChatConnection connection
|
||||
|
||||
title: i18nc("@title:window", "General")
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
Kirigami.Form {
|
||||
Kirigami.FormGroup {
|
||||
title: i18nc("@title:group", "General Settings")
|
||||
visible: Qt.platform.os !== "android"
|
||||
onToggled: {
|
||||
NeoChatConfig.autoRoomInfoDrawer = 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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()
|
||||
}
|
||||
}
|
||||
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
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
text: i18n("Show in System Tray")
|
||||
checked: NeoChatConfig.systemTray
|
||||
visible: Controller.supportSystemTray
|
||||
enabled: !NeoChatConfig.isSystemTrayImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.systemTray = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
]
|
||||
Component.onCompleted: currentIndex = NeoChatConfig.markReadCondition
|
||||
onCurrentValueChanged: NeoChatConfig.markReadCondition = currentValue
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {
|
||||
above: markAsReadCombo
|
||||
below: showDeletedMessages
|
||||
}
|
||||
Kirigami.FormSeparator {}
|
||||
|
||||
FormCard.FormCheckDelegate {
|
||||
id: showDeletedMessages
|
||||
text: i18n("Show deleted messages")
|
||||
checked: NeoChatConfig.showDeletedMessages
|
||||
enabled: !NeoChatConfig.isShowDeletedMessagesImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.showDeletedMessages = checked;
|
||||
NeoChatConfig.save();
|
||||
Kirigami.FormEntry {
|
||||
id: trayOnStartup
|
||||
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: trayOnStartup.visible
|
||||
}
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
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.FormSeparator {}
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
text: i18n("Show all rooms in \"Home\" tab")
|
||||
checked: NeoChatConfig.allRoomsInHome
|
||||
enabled: !NeoChatConfig.isAllRoomsInHomeImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.allRoomsInHome = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {
|
||||
above: showDeletedMessages
|
||||
below: showStateEvents
|
||||
Kirigami.FormGroup {
|
||||
title: i18nc("@title:group", "Room List Sort Order")
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.Label {
|
||||
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()
|
||||
// }
|
||||
// }
|
||||
// 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.FormCheckDelegate {
|
||||
id: showStateEvents
|
||||
text: i18n("Show state events")
|
||||
checked: NeoChatConfig.showStateEvent
|
||||
enabled: !NeoChatConfig.isShowStateEventImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.showStateEvent = checked;
|
||||
NeoChatConfig.save();
|
||||
Kirigami.FormGroup {
|
||||
title: i18nc("@title", "Timeline")
|
||||
Kirigami.FormEntry {
|
||||
title: i18n("Mark messages as read when:")
|
||||
contentItem: QQC2.ComboBox {
|
||||
id: markAsReadCombo
|
||||
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 {
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: showDeletedMessages
|
||||
text: i18n("Show deleted messages")
|
||||
checked: NeoChatConfig.showDeletedMessages
|
||||
enabled: !NeoChatConfig.isShowDeletedMessagesImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.showDeletedMessages = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.FormSeparator {}
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: showStateEvents
|
||||
text: i18n("Show state events")
|
||||
checked: NeoChatConfig.showStateEvent
|
||||
enabled: !NeoChatConfig.isShowStateEventImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.showStateEvent = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.FormSeparator {
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
}
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: showLeaveJoinEventDelegate
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
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 {
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: showNameDelegate
|
||||
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 {
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: showAvatarChangeDelegate
|
||||
text: i18n("Show avatar update events")
|
||||
checked: NeoChatConfig.showAvatarUpdate
|
||||
enabled: !NeoChatConfig.isShowAvatarUpdateImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.showAvatarUpdate = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
above: showStateEvents
|
||||
below: showLeaveJoinEventDelegate
|
||||
}
|
||||
Kirigami.FormGroup {
|
||||
title: i18nc("Chat Editor", "Editor")
|
||||
|
||||
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();
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.FormSeparator {}
|
||||
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: typingNotificationsDelegate
|
||||
text: i18n("Send typing notifications")
|
||||
checked: NeoChatConfig.typingNotifications
|
||||
enabled: !NeoChatConfig.isTypingNotificationsImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.typingNotifications = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {
|
||||
visible: NeoChatConfig.showStateEvent
|
||||
above: showLeaveJoinEventDelegate
|
||||
below: showNameDelegate
|
||||
}
|
||||
Kirigami.FormGroup {
|
||||
title: i18n("Developer Settings")
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.CheckBox {
|
||||
id: enableDeveloperToolsDelegate
|
||||
text: i18n("Enable developer tools")
|
||||
checked: NeoChatConfig.developerTools
|
||||
enabled: !NeoChatConfig.isDeveloperToolsImmutable
|
||||
onToggled: {
|
||||
NeoChatConfig.developerTools = checked;
|
||||
NeoChatConfig.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.FormSeparator {}
|
||||
|
||||
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();
|
||||
Kirigami.FormEntry {
|
||||
visible: NeoChatConfig.developerTools
|
||||
contentItem: QQC2.Button {
|
||||
id: openDeveloperToolsDelegate
|
||||
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")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.FormGroup {
|
||||
title: i18nc("@title:group", "Default Settings")
|
||||
|
||||
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();
|
||||
Kirigami.FormEntry {
|
||||
contentItem: QQC2.Button {
|
||||
icon.name: "kt-restore-defaults-symbolic"
|
||||
text: i18nc("@action:button", "Reset all configuration values to their default…")
|
||||
onClicked: resetDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
title: i18nc("@title:dialog", "Reset Configuration")
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
import io.github.quotient_im.libquotient
|
||||
import Quotient
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kirigamiaddons.labs.components as Components
|
||||
|
||||
import io.github.quotient_im.libquotient
|
||||
import Quotient
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user