-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextsteps.html
110 lines (102 loc) · 4.88 KB
/
nextsteps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Thanks for downloading!</title>
<meta name="description" content="A python based Password Manager made using Flet & Fernet." />
<link rel="icon" type="image/x-icon" href="/images/icon.webp" />
<link href="fonts/googleSans.css" rel="preconnect stylesheet" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<noscript>
<meta http-equiv="refresh" content="0;url=noscript">
</meta>
</noscript>
</head>
<body data-bs-theme="dark">
<div class="main">
<h1 class="title" style="margin-bottom: 0">Thanks for downloading!</h1>
<p class="subheading" style="font-size: 22px">
The download should start automatically. If it doesn't, try again
<a class="link" href="javascript:downloadIfNotAlready()">here.</a>
</p>
<p class="txt" style="display: none"></p>
<p class="subheading" id="commandLabel1">STEP 1</p>
<pre class="commandsHolder" style="display: none"><code class="command1"></code></pre>
<p class="subheading" id="commandLabel2">STEP 2</p>
<pre class="commandsHolder2" style="display: none"><code class="command2"></code></pre>
<pre class="unixOsCommandsHolder" style="display: none"><code class="unixOsCommand"></code></pre>
</div>
<script src="main.js" async defer></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<script>
function parseURLParams() {
const urlSearchParams = new URLSearchParams(window.location.search);
const params = Object.fromEntries(urlSearchParams.entries());
return params;
}
const params = parseURLParams();
let os;
if ("os" in params) {
os = params.os;
} else {
window.location.replace("/");
}
if (os == "Windows" || os == "Unix" || os == "Mac") {
const stepsLeft = document.querySelector(".txt");
const command1 = document.querySelector(".command1");
const command2 = document.querySelector(".command2");
const commandsHolder = document.querySelector(".commandsHolder");
const commandsHolder2 = document.querySelector(".commandsHolder2");
const commandLabel1 = document.querySelector("#commandLabel1");
const commandLabel2 = document.querySelector("#commandLabel2");
if (os == "Unix") {
stepsLeft.style.display = "block";
stepsLeft.textContent = "To use the program, simply extract the ZIP file & execute the passmgrgui file using the command line or your DE. Do NOT run as root, or errors will be encountered."
commandsHolder.style.display = "block";
commandsHolder2.style.display = "block";
commandLabel1.textContent = "COMMAND"
commandLabel2.textContent = "OR"
command1.textContent = "./passmgrgui";
command2.textContent = "Run using your DE."
} else if (os == "Windows") {
stepsLeft.style.display = "block";
stepsLeft.textContent =
"To install, simply run the installer executable, either by right clicking > Open or double clicking the file. If you get a SmartScreen security warning, simply click More info > Run anyway. The installer will guide you.";
commandsHolder.style.display = "block";
commandsHolder2.style.display = "block";
command1.textContent = "Run the installer executable.";
command2.textContent =
"The installer will guide you through the next steps.";
} else if (os == "Mac") {
stepsLeft.style.display = "block";
stepsLeft.textContent = "To use the program, simply extract the ZIP file & run the .app binary using Finder. If you get a security warning, please add the .app file as a trusted program."
commandsHolder.style.display = "block";
commandsHolder2.style.display = "block";
command1.textContent =
"Run the APP binary.";
command2.textContent = "Launch the program using the Dock.";
}
} else {
window.location.replace("/");
}
function downloadIfNotAlready() {
if (os == "Unix") {
downloadUrl =
"https://github.com/passmgrgui/passmgr/raw/binaries/linux/passmgrgui.zip";
} else if (os == "Windows") {
downloadUrl =
"https://github.com/passmgrgui/passmgr/raw/binaries/windows/passmgrguisetup.exe";
} else if (os == "Mac") {
downloadUrl =
"https://github.com/passmgrgui/passmgr/raw/binaries/macos/passmgrgui.zip";
}
window.location.replace(downloadUrl);
}
</script>
</body>
</html>