mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
enable changelog
This commit is contained in:
@@ -128,7 +128,9 @@ FloatingWindow {
|
||||
iconName: "open_in_new"
|
||||
backgroundColor: Theme.surfaceContainerHighest
|
||||
textColor: Theme.surfaceText
|
||||
onClicked: Qt.openUrlExternally("https://danklinux.com/blog/dms-1-2-spicy-miso")
|
||||
// ! TODO - replace with blog before tag
|
||||
//onClicked: Qt.openUrlExternally("https://danklinux.com/blog/v1.2-release")
|
||||
onClicked: Qt.openUrlExternally("https://github.com/AvengeMedia/DankMaterialShell/compare/v1.0.3...master")
|
||||
}
|
||||
|
||||
DankButton {
|
||||
|
||||
@@ -11,7 +11,7 @@ Singleton {
|
||||
id: root
|
||||
|
||||
readonly property string currentVersion: "1.2"
|
||||
readonly property bool changelogEnabled: false
|
||||
readonly property bool changelogEnabled: true
|
||||
|
||||
readonly property string configDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)) + "/DankMaterialShell"
|
||||
readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion
|
||||
@@ -37,7 +37,27 @@ Singleton {
|
||||
Component.onCompleted: {
|
||||
if (!changelogEnabled)
|
||||
return;
|
||||
changelogCheckProcess.running = true;
|
||||
if (FirstLaunchService.checkComplete)
|
||||
handleFirstLaunchResult();
|
||||
}
|
||||
|
||||
function handleFirstLaunchResult() {
|
||||
if (FirstLaunchService.isFirstLaunch) {
|
||||
checkComplete = true;
|
||||
changelogDismissed = true;
|
||||
touchMarkerProcess.running = true;
|
||||
} else {
|
||||
changelogCheckProcess.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: FirstLaunchService
|
||||
|
||||
function onCheckCompleteChanged() {
|
||||
if (FirstLaunchService.checkComplete && root.changelogEnabled && !root.checkComplete)
|
||||
root.handleFirstLaunchResult();
|
||||
}
|
||||
}
|
||||
|
||||
function showChangelog() {
|
||||
@@ -66,9 +86,7 @@ Singleton {
|
||||
root.changelogDismissed = true;
|
||||
break;
|
||||
case "show":
|
||||
if (typeof FirstLaunchService === "undefined" || !FirstLaunchService.isFirstLaunch) {
|
||||
root.changelogRequested();
|
||||
}
|
||||
root.changelogRequested();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,10 @@ Singleton {
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
const result = data.trim();
|
||||
root.checkComplete = true;
|
||||
|
||||
if (result === "first") {
|
||||
root.isFirstLaunch = true;
|
||||
console.info("FirstLaunchService: First launch detected, greeter will be shown");
|
||||
root.greeterRequested();
|
||||
} else if (result === "existing_user") {
|
||||
root.isFirstLaunch = false;
|
||||
console.info("FirstLaunchService: Existing user detected, silently creating marker");
|
||||
@@ -87,6 +85,11 @@ Singleton {
|
||||
} else {
|
||||
root.isFirstLaunch = false;
|
||||
}
|
||||
|
||||
root.checkComplete = true;
|
||||
|
||||
if (root.isFirstLaunch)
|
||||
root.greeterRequested();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user