Skip to content

Commit dfce151

Browse files
committed
12 Feb 2024
Installer update - Added "installation complete screen"
1 parent aff1c87 commit dfce151

File tree

4 files changed

+85
-34
lines changed

4 files changed

+85
-34
lines changed

TODO.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
* Paypal
66
* Stripe
77
* Add database column comments - May help AI
8-
* Add tutorial videos
9-
* CB-worker.js > Server get all JS/CSS/IMAGES/ASSETS > "Push update"
8+
* Add tutorial videos

core/assets/tsparticles.confetti.bundle.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/lib/CORE-Install-HTML.php

+68-27
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
}
1919

20-
// (C) HTML ?>
20+
// (C) INSTALLATION PAGE HTML ?>
2121
<!DOCTYPE html>
2222
<html>
2323
<head>
@@ -26,30 +26,31 @@
2626
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.5">
2727
<meta name="robots" content="noindex">
2828
<link rel="stylesheet" href="<?=HOST_ASSETS?>bootstrap.min.css">
29+
<link rel="stylesheet" href="<?=HOST_ASSETS?>PAGE-cb.css">
30+
<script defer src="<?=HOST_ASSETS?>tsparticles.confetti.bundle.min.js"></script>
2931
<script defer src="<?=HOST_ASSETS?>bootstrap.bundle.min.js"></script>
3032
<?php require PATH_LIB . "CORE-Install-JS.php"; ?>
3133
</head>
3234
<body><div class="container p-4">
33-
<?php if (I_APACHE === false || I_REWRITE === false) { ?>
34-
<!-- (C1) WARNINGS -->
35-
<div class="bg-danger text-white p-2 mb-2">
36-
If you are running Apache Web Server - Please enable <code class="text-white">MOD_REWRITE</code>.
37-
</div>
38-
<div class="bg-danger text-white p-2">
39-
If you are not running Apache Web Server, you can still try to proceed.
40-
After the installation, "translate" your own <code class="text-white">.htaccess</code> file.
41-
</div>
42-
<?php } ?>
35+
<form id="iForm" onsubmit="return false">
36+
<?php if (I_APACHE === false || I_REWRITE === false) { ?>
37+
<!-- (C1) WARNINGS -->
38+
<div class="bg-danger text-white p-2 mb-2">
39+
If you are running Apache Web Server - Please enable <code class="text-white">MOD_REWRITE</code>.
40+
</div>
41+
<div class="bg-danger text-white p-2">
42+
If you are not running Apache Web Server, you can still try to proceed.
43+
After the installation, "translate" your own <code class="text-white">.htaccess</code> file.
44+
</div>
45+
<?php } ?>
4346

44-
<!-- (C2) HEADER -->
45-
<div class="d-flex align-items-center mb-3">
46-
<img src="assets/favicon.png" class="me-2">
47-
<h1><?=strtoupper(SITE_NAME)?> INSTALLATION</h1>
48-
</div>
47+
<!-- (C2) HEADER -->
48+
<div class="d-flex align-items-center mb-3">
49+
<img src="assets/favicon.png" class="me-2">
50+
<h1><?=strtoupper(SITE_NAME)?> INSTALLATION</h1>
51+
</div>
4952

50-
<!-- (C3) INSTALLATION FORM -->
51-
<form id="iForm" onsubmit="return false">
52-
<!-- (C3-1) HOST URL -->
53+
<!-- (C3) HOST URL -->
5354
<h4 class="text-danger mb-3">HOST URL</h4>
5455
<div class="bg-light border p-3 mb-3">
5556
<div class="form-floating mb-2">
@@ -70,7 +71,7 @@
7071
</div>
7172
</div>
7273

73-
<!-- (C3-2) API ENDPOINT -->
74+
<!-- (C4) API ENDPOINT -->
7475
<h4 class="text-danger mb-3">API ENDPOINT</h4>
7576
<div class="bg-light border p-3 mb-3">
7677
<div class="form-floating mb-2">
@@ -110,7 +111,7 @@
110111
</div>
111112
</div>
112113

113-
<!-- (C3-3) DATABASE -->
114+
<!-- (C5) DATABASE -->
114115
<h4 class="text-danger mb-3">DATABASE</h4>
115116
<div class="bg-light border p-3 mb-3">
116117
<div class="form-floating mb-2">
@@ -134,7 +135,7 @@
134135
</div>
135136
</div>
136137

137-
<!-- (C3-4) EMAIL & TIMEZONE -->
138+
<!-- (C6) EMAIL & TIMEZONE -->
138139
<h4 class="text-danger mb-3">SYSTEM DEFAULTS</h4>
139140
<div class="bg-light border p-3 mb-3">
140141
<div class="form-floating mb-2">
@@ -151,7 +152,7 @@
151152
</div>
152153
</div>
153154

154-
<!-- (C3-5) COMPANY -->
155+
<!-- (C7) COMPANY -->
155156
<?php if (I_CO) { ?>
156157
<h4 class="text-danger mb-3">COMPANY</h4>
157158
<div class="bg-light border p-3 mb-3">
@@ -177,7 +178,7 @@
177178
</div>
178179
<?php } ?>
179180

180-
<!-- (C3-6) ADMIN USER -->
181+
<!-- (C8) ADMIN USER -->
181182
<?php if (I_USER) { ?>
182183
<h4 class="text-danger mb-3">ADMIN USER</h4>
183184
<div class="bg-light border p-3 mb-3">
@@ -204,7 +205,7 @@
204205
</div>
205206
<?php } ?>
206207

207-
<!-- (C3-7) JWT -->
208+
<!-- (C9) JWT -->
208209
<h4 class="text-danger mb-3">JSON WEB TOKEN</h4>
209210
<div class="bg-light border p-3 mb-3">
210211
<div class="form-floating mb-2">
@@ -224,7 +225,7 @@
224225
</div>
225226
</div>
226227

227-
<!-- (C3-8) PUSH NOTIFICATION -->
228+
<!-- (C10) PUSH NOTIFICATION -->
228229
<?php if (I_PUSH) { ?>
229230
<h4 class="text-danger mb-3">WEB PUSH VAPID KEYS</h4>
230231
<div class="bg-light border p-3 mb-3">
@@ -245,8 +246,48 @@
245246
</div>
246247
<?php } ?>
247248

248-
<!-- (C3-9) GO! -->
249+
<!-- (C11) GO! -->
249250
<input id="gobtn" type="submit" class="btn btn-primary" value="Go!" disabled>
250251
</form>
252+
253+
<!-- (C12) DONE -->
254+
<!-- @TODO - UPDATE LINKS FOR YOUR PROJECT -->
255+
<div id="iCelebrate" class="d-none">
256+
<h1 class="my-4">INSTALLATION COMPLETE</h1>
257+
258+
<h4 class="text-danger m-0">A FEW LINKS</h4>
259+
<div class="bg-light border p-3 mb-3"><ul class="list-group">
260+
<li class="list-group-item d-flex align-items-center">
261+
<a class="btn btn-danger" href="https://code-boxx.com/core-boxx-php-framework/" target="_blank">
262+
<i class="ico-sm icon-home3"></i> Official
263+
</a>
264+
<div class="ms-2">Official Core Boxx Page (Documentation &amp; Stuff).</div>
265+
</li>
266+
<li class="list-group-item d-flex align-items-center">
267+
<a class="btn btn-danger" href="https://github.com/code-boxx/Core-Boxx-PHP-Framework/issues/new/choose" target="_blank">
268+
<i class="ico-sm icon-bug"></i> Report
269+
</a>
270+
<div class="ms-2">Report a bug / Feature Request.</div>
271+
</li>
272+
<li class="list-group-item d-flex align-items-center">
273+
<a class="btn btn-danger" href="https://github.com/code-boxx/Core-Boxx-PHP-Framework" target="_blank">
274+
<i class="ico-sm icon-star-full"></i> Star
275+
</a>
276+
<div class="ms-2">Just give a star to Storage Boxx on GitHub - It's free.</div>
277+
</li>
278+
<li class="list-group-item d-flex align-items-center">
279+
<a class="btn btn-danger" href="https://github.com/sponsors/code-boxx?frequency=one-time" target="_blank">
280+
<i class="ico-sm icon-heart"></i> Donate
281+
</a>
282+
<div class="ms-2">Buy a malnourished developer some food. Even a small one-time amount helps.</div>
283+
</li>
284+
<li class="list-group-item d-flex align-items-center">
285+
<a class="btn btn-danger" id="iDone">
286+
<i class="ico-sm icon-checkmark"></i> Done
287+
</a>
288+
<div class="ms-2">To the home page.</div>
289+
</li>
290+
</ul></div>
291+
</div>
251292
</div></body>
252293
</html>

core/lib/CORE-Install-JS.php

+14-5
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,26 @@
113113
// (E8) VERIFY HTACCESS
114114
install.ajax(url + "installer/test/", "E2", () => {
115115
// (E9) PROCEED INSTALLATION
116-
install.ajax(url, "F", () => {
117-
alert("Installation complete, this page will now reload.");
118-
location.href = url;
119-
});
116+
install.ajax(url, "F", () => install.celebrate(url));
120117
});
121118
});
122119
return false;
120+
},
121+
122+
// (F) INSTALLATION COMPLETE - CELEBRATE!
123+
celebrate : url => {
124+
document.getElementById("iForm").innerHTML = "";
125+
document.getElementById("iDone").href = url;
126+
document.getElementById("iCelebrate").classList.remove("d-none");
127+
confetti({
128+
particleCount: 100,
129+
spread: 70,
130+
origin: { y: 0.6 },
131+
});
123132
}
124133
};
125134

126-
// (F) GENERATE RANDOM JWT KEY + ENABLE INSTALL FORM ON WINDOW LOAD
135+
// (G) GENERATE RANDOM JWT KEY + ENABLE INSTALL FORM ON WINDOW LOAD
127136
window.onload = () => {
128137
install.rnd();
129138
install.toggle(true);

0 commit comments

Comments
 (0)