mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 02:22:07 -05:00
add toasts
This commit is contained in:
parent
70ecadbae5
commit
ab3cfe0184
@ -2,6 +2,8 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="/js/all.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
|
||||
|
||||
<style>@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');</style>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
23
js/cookie.js
23
js/cookie.js
@ -44,7 +44,16 @@ function downloadMainSave() {
|
||||
fakeElement.download = 'your.e-gamepass.save';
|
||||
fakeElement.click();
|
||||
URL.revokeObjectURL(dataURL);
|
||||
alert("Make sure to keep the file that was just downloaded so you can use it to restore your progress in games later.")
|
||||
Toastify({
|
||||
text: "Download successful! Make sure to not lose this download.",
|
||||
duration: 5000,
|
||||
gravity: "top", // `top` or `bottom`
|
||||
position: "center", // `left`, `center` or `right`
|
||||
style: {
|
||||
background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)",
|
||||
},
|
||||
onClick: function(){} // Callback after click
|
||||
}).showToast();
|
||||
}
|
||||
|
||||
// Function to get the main save data from an uploaded file
|
||||
@ -86,7 +95,17 @@ function uploadMainSave() {
|
||||
getMainSaveFromUpload(e.target.result);
|
||||
|
||||
// Show a success message to the user
|
||||
alert("Upload successful!")
|
||||
Toastify({
|
||||
text: "Upload successful!",
|
||||
duration: 3000,
|
||||
gravity: "top", // `top` or `bottom`
|
||||
position: "center", // `left`, `center` or `right`
|
||||
stopOnFocus: true, // Prevents dismissing of toast on hover
|
||||
style: {
|
||||
background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)",
|
||||
},
|
||||
onClick: function(){} // Callback after click
|
||||
}).showToast();
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user