From 1fc8b56783f4dd902f90b5538c035a7007be4b7d Mon Sep 17 00:00:00 2001 From: Darshan Phaldesai Date: Wed, 13 Nov 2024 14:07:19 -0700 Subject: [PATCH] add NoDeviceSelected.qml page as a landing page --- app/CMakeLists.txt | 1 + app/qml/Main.qml | 2 +- app/qml/NoDeviceSelected.qml | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/qml/NoDeviceSelected.qml diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index f91b6278a..eab3dd46d 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -41,6 +41,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES qml/MprisSlider.qml qml/PluginSettings.qml qml/Settings.qml + qml/NoDeviceSelected.qml ) target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils KF6::Crash) diff --git a/app/qml/Main.qml b/app/qml/Main.qml index a1f4473e2..9a195bcf9 100644 --- a/app/qml/Main.qml +++ b/app/qml/Main.qml @@ -138,5 +138,5 @@ Kirigami.ApplicationWindow { id: contextDrawer } - pageStack.initialPage: Qt.resolvedUrl("FindDevicesPage.qml") + pageStack.initialPage: Qt.resolvedUrl("NoDeviceSelected.qml") } diff --git a/app/qml/NoDeviceSelected.qml b/app/qml/NoDeviceSelected.qml new file mode 100644 index 000000000..27a0225a8 --- /dev/null +++ b/app/qml/NoDeviceSelected.qml @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2024 Darshan Phaldesai + * + * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL + */ +import QtQuick +import org.kde.kirigami as Kirigami + +Kirigami.Page { + id: root + // TODO: replace with proper text components instead of HTML + Kirigami.PlaceholderMessage { + text: i18nd("kdeconnect_app", "

No device selected.

If you own an Android device, make sure to install the KDE Connect Android app (also available from F-Droid) and it should appear in the list. If you have an iPhone, make sure to install the KDE Connect iOS app

If you are having problems, visit the KDE Connect Community wiki for help.

") + anchors.centerIn: parent + width: parent.width - (Kirigami.Units.largeSpacing * 4) + } +}