mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
refactor
This commit is contained in:
@@ -233,24 +233,21 @@ onNextButtonClicked = function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFinishButtonClicked = function() {
|
onFinishButtonClicked = function() {
|
||||||
var widget = gui.pageById(QInstaller.InstallationFinished);
|
let widget = gui.pageById(QInstaller.InstallationFinished);
|
||||||
if (widget) {
|
if (widget) {
|
||||||
var isChecked = widget["RunItCheckBox"].checked;
|
let isChecked = widget["RunItCheckBox"].checked;
|
||||||
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
// TODO: Remove MessageBoxes
|
|
||||||
if (runningOnWindows()) {
|
if (runningOnWindows()) {
|
||||||
var cmdArgs = ["/C", "reg", "delete", "HKEY_CURRENT_USER\\Software\\AmneziaVPN.ORG", "/f"];
|
let cmdArgs = ["/C", "reg", "delete", "HKEY_CURRENT_USER\\Software\\AmneziaVPN.ORG", "/f"];
|
||||||
var result = installer.execute("cmd", cmdArgs);
|
installer.execute("cmd", cmdArgs);
|
||||||
QMessageBox.warning("quit.question", "Result command", result, QMessageBox.Ok);
|
|
||||||
}
|
}
|
||||||
else if (runningOnMacOS()) {
|
else if (runningOnMacOS()) {
|
||||||
var cmdArgs = ["rm", "~/Library/Preferences/org.amneziavpn.AmneziaVPN.plist"];
|
let cmdArgs = ["-c", "rm ~/Library/Preferences/org.amneziavpn.AmneziaVPN.plist"];
|
||||||
var result = installer.execute("/bin/bash", cmdArgs);
|
installer.execute("/bin/bash", cmdArgs);
|
||||||
QMessageBox.warning("quit.question", "Result command", result, QMessageBox.Ok);
|
|
||||||
}
|
}
|
||||||
else if (runningOnLinux()) {
|
else if (runningOnLinux()) {
|
||||||
var cmdArgs = ["-c", "rm /home/$USER/.config/AmneziaVPN.ORG/AmneziaVPN.conf"];
|
let cmdArgs = ["-c", "rm ~/.config/AmneziaVPN.ORG/AmneziaVPN.conf"];
|
||||||
installer.execute("/bin/bash", cmdArgs);
|
installer.execute("/bin/bash", cmdArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user