From 1113118c06056af3b51cfbf7a40cccdf541a63d2 Mon Sep 17 00:00:00 2001 From: Vyn Date: Tue, 23 Apr 2024 10:40:46 +0200 Subject: [PATCH] Add simple hint when no files are loaded --- src/qml/Main.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/qml/Main.qml b/src/qml/Main.qml index 55d69c2..9e3643a 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -119,8 +119,19 @@ Window { } } + Component { + id: gettingStartedComponent + AppText { + text: "You currently have no files loaded, you can add them by clicking on the cog icon on the left pane" + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + Loader { - sourceComponent: selectedView === "list" ? listViewComponent + sourceComponent: backend.tasks.length === 0 ? gettingStartedComponent + : selectedView === "list" ? listViewComponent : selectedView === "calendar" ? calendarViewComponent : undefined Layout.fillWidth: true