diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index fca98531..563afe18 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -829,7 +829,11 @@ Item { Connections { target: FirstLaunchService function onGreeterRequested() { - greeterLoader.active = true; + if (greeterLoader.active && greeterLoader.item) { + greeterLoader.item.show(); + } else { + greeterLoader.active = true; + } } } } diff --git a/quickshell/DMSShellIPC.qml b/quickshell/DMSShellIPC.qml index c8297b36..58f20e73 100644 --- a/quickshell/DMSShellIPC.qml +++ b/quickshell/DMSShellIPC.qml @@ -894,6 +894,26 @@ Item { target: "clipboard" } + IpcHandler { + function open(): string { + FirstLaunchService.showWelcome(); + return "WELCOME_OPEN_SUCCESS"; + } + + function doctor(): string { + FirstLaunchService.showDoctor(); + return "WELCOME_DOCTOR_SUCCESS"; + } + + function page(pageNum: string): string { + const num = parseInt(pageNum) || 0; + FirstLaunchService.showGreeter(num); + return `WELCOME_PAGE_SUCCESS: ${num}`; + } + + target: "welcome" + } + IpcHandler { function toggleOverlay(instanceId: string): string { if (!instanceId) diff --git a/quickshell/Modals/Greeter/GreeterModal.qml b/quickshell/Modals/Greeter/GreeterModal.qml index edd52b0e..e2dd6551 100644 --- a/quickshell/Modals/Greeter/GreeterModal.qml +++ b/quickshell/Modals/Greeter/GreeterModal.qml @@ -53,7 +53,12 @@ FloatingWindow { } function show() { - currentPage = 0; + currentPage = FirstLaunchService.requestedStartPage || 0; + visible = true; + } + + function showAtPage(page) { + currentPage = page; visible = true; } diff --git a/quickshell/Modules/Settings/AboutTab.qml b/quickshell/Modules/Settings/AboutTab.qml index 255b537f..792bdda7 100644 --- a/quickshell/Modules/Settings/AboutTab.qml +++ b/quickshell/Modules/Settings/AboutTab.qml @@ -713,6 +713,63 @@ Item { } } + StyledRect { + width: parent.width + height: toolsSection.implicitHeight + Theme.spacingL * 2 + radius: Theme.cornerRadius + color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) + border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.width: 0 + + Column { + id: toolsSection + + anchors.fill: parent + anchors.margins: Theme.spacingL + spacing: Theme.spacingM + + Row { + width: parent.width + spacing: Theme.spacingM + + DankIcon { + name: "build" + size: Theme.iconSize + color: Theme.primary + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + text: I18n.tr("Tools") + font.pixelSize: Theme.fontSizeLarge + font.weight: Font.Medium + color: Theme.surfaceText + anchors.verticalCenter: parent.verticalCenter + } + } + + Row { + spacing: Theme.spacingS + + DankButton { + text: I18n.tr("Show Welcome") + iconName: "waving_hand" + backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + textColor: Theme.surfaceText + onClicked: FirstLaunchService.showWelcome() + } + + DankButton { + text: I18n.tr("System Check") + iconName: "vital_signs" + backgroundColor: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08) + textColor: Theme.surfaceText + onClicked: FirstLaunchService.showDoctor() + } + } + } + } + StyledText { anchors.horizontalCenter: parent.horizontalCenter text: `MIT License` diff --git a/quickshell/Services/FirstLaunchService.qml b/quickshell/Services/FirstLaunchService.qml index eae07b76..766d826b 100644 --- a/quickshell/Services/FirstLaunchService.qml +++ b/quickshell/Services/FirstLaunchService.qml @@ -17,12 +17,26 @@ Singleton { property bool isFirstLaunch: false property bool checkComplete: false property bool greeterDismissed: false + property int requestedStartPage: 0 readonly property bool shouldShowGreeter: checkComplete && isFirstLaunch && !greeterDismissed signal greeterRequested signal greeterCompleted + function showGreeter(startPage) { + requestedStartPage = startPage || 0; + greeterRequested(); + } + + function showWelcome() { + showGreeter(0); + } + + function showDoctor() { + showGreeter(1); + } + Component.onCompleted: { checkFirstLaunch(); }