From b25a0a7a4e76c0ffad1a80cc8b5f49575eefaeab Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 1 Sep 2024 08:57:55 -0400 Subject: [PATCH] Settings: Hide certain pages when we have no connection This hides the "Notifications", "Security", "Accounts" and "Devices" page from the settings if we have no connection. This can now happen since the user is able to enter the full settings without being logged in from the welcome page. --- src/settings/NeoChatSettingsView.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/settings/NeoChatSettingsView.qml b/src/settings/NeoChatSettingsView.qml index f1c7aa272..ca54f693f 100644 --- a/src/settings/NeoChatSettingsView.qml +++ b/src/settings/NeoChatSettingsView.qml @@ -44,6 +44,7 @@ KirigamiSettings.ConfigurationView { connection: root.connection }; } + visible: root.connection !== null }, KirigamiSettings.ConfigurationModule { moduleId: "security" @@ -55,12 +56,14 @@ KirigamiSettings.ConfigurationView { connection: root.connection }; } + visible: root.connection !== null }, KirigamiSettings.ConfigurationModule { moduleId: "accounts" text: i18n("Accounts") icon.name: "preferences-system-users" page: () => Qt.createComponent("org.kde.neochat.settings", "AccountsPage") + visible: root.connection !== null }, KirigamiSettings.ConfigurationModule { moduleId: "emoticons" @@ -72,6 +75,7 @@ KirigamiSettings.ConfigurationView { connection: root.connection }; } + visible: root.connection !== null }, KirigamiSettings.SpellcheckingConfigurationModule {}, KirigamiSettings.ConfigurationModule { @@ -90,6 +94,7 @@ KirigamiSettings.ConfigurationView { connection: root.connection }; } + visible: root.connection !== null }, KirigamiSettings.ConfigurationModule { moduleId: "aboutNeochat"