100 lines
5.3 KiB
HTML
100 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<style>
|
|
.custom-bg {
|
|
background-color: #0D0E12;
|
|
}
|
|
/* Style the checkbox and label for dark mode */
|
|
.dark .form-check-input:checked {
|
|
background-color: #000; /* Background color when checked */
|
|
border-color: #000; /* Border color when checked */
|
|
}
|
|
.dark .form-check-input:not(:checked) {
|
|
background-color: #000; /* Background color when unchecked */
|
|
border-color: #000; /* Border color when unchecked */
|
|
}
|
|
.dark .form-check-label {
|
|
color: #fff; /* Text color for the label in dark mode */
|
|
}
|
|
|
|
/* Style the file upload input and button in dark mode */
|
|
.dark input[type="file"] {
|
|
background-color: #000; /* Background color when choosing a file */
|
|
border-color: #000; /* Border color when choosing a file */
|
|
color: #fff; /* Text color when choosing a file */
|
|
}
|
|
.dark input[type="file"]::-webkit-file-upload-button {
|
|
background-color: #000; /* Background color when choosing a file (for Webkit browsers) */
|
|
border-color: #000; /* Border color when choosing a file (for Webkit browsers) */
|
|
color: #fff; /* Text color when choosing a file (for Webkit browsers) */
|
|
}
|
|
/* Style the "Extra info" textarea in dark mode */
|
|
.dark #extraInfo {
|
|
background-color: #000; /* Background color for the textarea */
|
|
border-color: #000; /* Border color for the textarea */
|
|
color: #fff; /* Text color for the textarea */
|
|
}
|
|
</style>
|
|
<body class="custom-bg">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/core-min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/sha256.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/enc-base64.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/pbkdf2.js"></script>
|
|
{% include 'header.html' %}
|
|
<body {% if mode == 'dark' %}class="text-white bg-secondary dark"{% endif %}>
|
|
<div class="card {% if mode == 'dark' %}text-white bg-dark dark{% endif %} mb-3" style="width:90%; left: 5%; top:5px;">
|
|
<center><div class="card-header">
|
|
Welcome to the StreetPass Shop Uploader!
|
|
<h4>Download the <a href="https://github.com/VeltronNET/streetpass-shop/raw/main/unistore/StreetPass-Shop.unistore">UniStore</a></h4>
|
|
<div id="card-header" class="form-text">The UniStore updates every three hours.</div>
|
|
<div id="card-header" class="form-text">Source code is available <a href="https://github.com/VeltronNET/streetpass-shop">on our GitHub</a>.</div>
|
|
<div id="card-header" class="form-text">In need of support? Check out our <a href="https://discord.go.veltron.net">Discord</a>.</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<form id="uploadForm" action="/uploadJson" method="post" enctype="multipart/form-data" onsubmit="return validateForm()">
|
|
<div class="mb-3">
|
|
<label for="streetPassFile" class="form-label">StreetPass Data Uploader</label>
|
|
<input type="file" class="form-control" id="streetPassFile" name="streetPassFile" aria-describedby="streetPassFileHelp" required>
|
|
<div id="streetPassFileHelp" class="form-text">Upload your StreetPass data extracted from the GodMode9 script here.</div>
|
|
</div>
|
|
|
|
<label for="extrainfo" class="form-label">Extra info</label>
|
|
<div class="mb-3">
|
|
<div id="streetPassFileHelp" class="form-text">Optionally put any extra info that you want to show with the StreetPass data in the shop here!</div>
|
|
<textarea class="form-control" id="extraInfo" name="extraInfo"></textarea>
|
|
</div>
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="exampleCheck1" required>
|
|
<label class="form-check-label" for="exampleCheck1">I agree to the <a href="toc.html">Terms</a> and <a href="toc.html">Conditions</a> that I probably did not read.</label>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
</form>
|
|
<footer>Made by <a href="https://github.com/MattTheTekie">MattTheTekie</a> & <a href="https://github.com/Dakotath">Dakotath</a></footer>
|
|
</div>
|
|
</center>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
function validateForm() {
|
|
var fileInput = document.getElementById('streetPassFile');
|
|
var fileSize = fileInput.files[0].size / (1024 * 1024); // Convert to MB
|
|
if (fileSize < 54 || fileSize > 56) {
|
|
alert('This is NOT StreetPass data. Stop using this site as a file host, or risk getting IP blocked!');
|
|
return false; // Prevent form submission
|
|
}
|
|
|
|
var tosCheckbox = document.getElementById('exampleCheck1');
|
|
if (!tosCheckbox.checked) {
|
|
alert('You must agree to the Terms and Conditions.');
|
|
return false; // Prevent form submission
|
|
}
|
|
|
|
// Now trigger the form submission
|
|
document.getElementById('uploadForm').submit();
|
|
|
|
return false; // Prevent default form submission
|
|
}
|
|
|
|
</script>
|
|
</html>
|