mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
enable changelog
This commit is contained in:
@@ -128,7 +128,9 @@ FloatingWindow {
|
|||||||
iconName: "open_in_new"
|
iconName: "open_in_new"
|
||||||
backgroundColor: Theme.surfaceContainerHighest
|
backgroundColor: Theme.surfaceContainerHighest
|
||||||
textColor: Theme.surfaceText
|
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 {
|
DankButton {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Singleton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property string currentVersion: "1.2"
|
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 configDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)) + "/DankMaterialShell"
|
||||||
readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion
|
readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion
|
||||||
@@ -37,7 +37,27 @@ Singleton {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (!changelogEnabled)
|
if (!changelogEnabled)
|
||||||
return;
|
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() {
|
function showChangelog() {
|
||||||
@@ -66,9 +86,7 @@ Singleton {
|
|||||||
root.changelogDismissed = true;
|
root.changelogDismissed = true;
|
||||||
break;
|
break;
|
||||||
case "show":
|
case "show":
|
||||||
if (typeof FirstLaunchService === "undefined" || !FirstLaunchService.isFirstLaunch) {
|
root.changelogRequested();
|
||||||
root.changelogRequested();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,12 +74,10 @@ Singleton {
|
|||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
onRead: data => {
|
onRead: data => {
|
||||||
const result = data.trim();
|
const result = data.trim();
|
||||||
root.checkComplete = true;
|
|
||||||
|
|
||||||
if (result === "first") {
|
if (result === "first") {
|
||||||
root.isFirstLaunch = true;
|
root.isFirstLaunch = true;
|
||||||
console.info("FirstLaunchService: First launch detected, greeter will be shown");
|
console.info("FirstLaunchService: First launch detected, greeter will be shown");
|
||||||
root.greeterRequested();
|
|
||||||
} else if (result === "existing_user") {
|
} else if (result === "existing_user") {
|
||||||
root.isFirstLaunch = false;
|
root.isFirstLaunch = false;
|
||||||
console.info("FirstLaunchService: Existing user detected, silently creating marker");
|
console.info("FirstLaunchService: Existing user detected, silently creating marker");
|
||||||
@@ -87,6 +85,11 @@ Singleton {
|
|||||||
} else {
|
} else {
|
||||||
root.isFirstLaunch = false;
|
root.isFirstLaunch = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
root.checkComplete = true;
|
||||||
|
|
||||||
|
if (root.isFirstLaunch)
|
||||||
|
root.greeterRequested();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user