mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-16 21:57:01 -05:00
Merge branch 'dev' into dev-feat-navbar
This commit is contained in:
@@ -15,4 +15,4 @@ Join our Discord:
|
||||
|
||||
<a href="https://discord.gg/DThgbba" target="_blank">
|
||||
<img src="https://discordapp.com/api/guilds/408718485913468928/widget.png?style=banner3">
|
||||
</a>
|
||||
</a>
|
||||
24
package-lock.json
generated
24
package-lock.json
generated
@@ -3078,9 +3078,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.0.tgz",
|
||||
"integrity": "sha512-eBDrueap1Zx3qFrcYylTiqTFlL5iTEaYAxoDF1MSRdipwAzChQRMJve+vxHtxPhI2q5tmf9RYHfZwXfTUHPd3g==",
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.6.tgz",
|
||||
"integrity": "sha512-ZAfNCWgXhwev6k/+rMzjHIJ/+wLkundQU/i+aUTqmCgGoYqc+B5e4EC4Y3E1XaLzNXiWID1/vocSM6zs5IAGvA==",
|
||||
"dependencies": {
|
||||
"bson": "^4.6.2",
|
||||
"kareem": "2.4.1",
|
||||
@@ -4354,9 +4354,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz",
|
||||
"integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==",
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz",
|
||||
"integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==",
|
||||
"engines": {
|
||||
"node": ">=12.18"
|
||||
}
|
||||
@@ -6938,9 +6938,9 @@
|
||||
}
|
||||
},
|
||||
"mongoose": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.0.tgz",
|
||||
"integrity": "sha512-eBDrueap1Zx3qFrcYylTiqTFlL5iTEaYAxoDF1MSRdipwAzChQRMJve+vxHtxPhI2q5tmf9RYHfZwXfTUHPd3g==",
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.6.tgz",
|
||||
"integrity": "sha512-ZAfNCWgXhwev6k/+rMzjHIJ/+wLkundQU/i+aUTqmCgGoYqc+B5e4EC4Y3E1XaLzNXiWID1/vocSM6zs5IAGvA==",
|
||||
"requires": {
|
||||
"bson": "^4.6.2",
|
||||
"kareem": "2.4.1",
|
||||
@@ -7928,9 +7928,9 @@
|
||||
}
|
||||
},
|
||||
"undici": {
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz",
|
||||
"integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q=="
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz",
|
||||
"integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g=="
|
||||
},
|
||||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
/* Account settings sidebar */
|
||||
.account-sidebar .user {
|
||||
text-align: center;
|
||||
margin: 55px auto;
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
}
|
||||
.account-sidebar .user .miiname {
|
||||
font-size: 1.2rem;
|
||||
@@ -341,4 +343,4 @@ footer {
|
||||
.setting-card .setting-list {
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,8 +638,8 @@ section.update-signup div.circle {
|
||||
/* the next 4 lines make it so the circle is always the same aspect ratio and covers enough of the screen */
|
||||
width: 2591px;
|
||||
height: 1454px;
|
||||
min-width: 135vw;
|
||||
min-height: 76vw; /* yes, this is supposed to be in vw */
|
||||
min-width: 145vw;
|
||||
min-height: 13vw; /* yes, this is supposed to be in vw */
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -127,8 +127,8 @@ footer .bandwidth-raccoon-wrapper .text-bubble:after {
|
||||
z-index: 1;
|
||||
border-style: solid;
|
||||
border-color: var(--bg-shade-3) transparent;
|
||||
border-width: 10px 10px 0;
|
||||
bottom: -10px;
|
||||
border-width: 12px 12px 0;
|
||||
bottom: -9px;
|
||||
right: 60px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
// This file gets automatically bundled with browserify when running the start script. This also means that after any update you're gonna need to restart the server to see any changes.
|
||||
/**
|
||||
* Compilation note:
|
||||
* This file gets automatically bundled with browserify when running the start script.
|
||||
* This also means that after any update you're gonna need to restart the server to see any changes.
|
||||
*
|
||||
* browserify is needed for the use of require() in the browser
|
||||
*/
|
||||
const Mii = require('mii-js');
|
||||
const newMiiData = 'AwAAQOlVognnx0GC2qjhdwOzuI0n2QAAAGBzAHQAZQB2AGUAAAAAAAAAAAAAAEBAAAAhAQJoRBgmNEYUgRIXaA0AACkAUkhQAAAAAAAAAAAAAAAAAAAAAAAAAAAAANeC';
|
||||
|
||||
// Prevent the user from reloading or leaving the page
|
||||
window.onbeforeunload = function (e) {
|
||||
@@ -32,33 +40,56 @@ window.addEventListener('resize', () => {
|
||||
setCanvasScale();
|
||||
});
|
||||
|
||||
// MII RENDERER
|
||||
let mii; // global mii object
|
||||
|
||||
const Mii = require('mii-js');
|
||||
// this initalizes a mii for editing
|
||||
// returns if mii data was parsed successfully
|
||||
function initializeMiiData(encodedUserMiiData) {
|
||||
console.group('Initalizing Mii data');
|
||||
console.log('encoded mii data:', encodedUserMiiData);
|
||||
|
||||
// We initialize the Mii object
|
||||
try {
|
||||
console.log('Attempting to parse mii data');
|
||||
mii = new Mii(Buffer.from(encodedUserMiiData, 'base64'));
|
||||
} catch (err) {
|
||||
console.error('failed to decode mii data', err);
|
||||
console.groupEnd();
|
||||
return false;
|
||||
}
|
||||
|
||||
// We set the img sources for the unedited miis in the save animation
|
||||
console.log('grabbing rendered miis for later use');
|
||||
const miiStudioNeutralUrl = mii.studioUrl({
|
||||
width: 512,
|
||||
bgColor: '13173300',
|
||||
});
|
||||
const miiStudioSorrowUrl = mii.studioUrl({
|
||||
width: 512,
|
||||
bgColor: '13173300',
|
||||
expression: 'sorrow',
|
||||
});
|
||||
document.querySelector('.mii-comparison img.old-mii').src = miiStudioNeutralUrl;
|
||||
document.querySelector('.mii-comparison.confirmed img.old-mii').src = miiStudioSorrowUrl;
|
||||
console.log('initialization complete');
|
||||
console.groupEnd();
|
||||
return true;
|
||||
}
|
||||
|
||||
// The Mii data is stored in a script tag in the HTML, so we can just grab it and then remove the element
|
||||
const encodedUserMiiData = document.querySelector(
|
||||
'script#encodedUserMiiData'
|
||||
).textContent;
|
||||
document.querySelector('script#encodedUserMiiData').remove();
|
||||
console.log('encodedMiiData', encodedUserMiiData);
|
||||
|
||||
// We initialize the Mii object
|
||||
const mii = new Mii(Buffer.from(encodedUserMiiData, 'base64'));
|
||||
|
||||
// We set the img sources for the unedited miis in the save animation
|
||||
const miiStudioNeutralUrl = mii.studioUrl({
|
||||
width: 512,
|
||||
bgColor: '13173300',
|
||||
});
|
||||
const miiStudioSorrowUrl = mii.studioUrl({
|
||||
width: 512,
|
||||
bgColor: '13173300',
|
||||
expression: 'sorrow',
|
||||
});
|
||||
document.querySelector('.mii-comparison img.old-mii').src = miiStudioNeutralUrl;
|
||||
document.querySelector('.mii-comparison.confirmed img.old-mii').src =
|
||||
miiStudioSorrowUrl;
|
||||
// is valid mii data
|
||||
const validMiiData = initializeMiiData(encodedUserMiiData);
|
||||
if (!validMiiData) {
|
||||
const shouldContinue = window.confirm('Found corrupted mii data, want to continue with a new Mii?');
|
||||
if (!shouldContinue)
|
||||
window.location.assign('/account');
|
||||
initializeMiiData(newMiiData);
|
||||
}
|
||||
|
||||
// we keeep the images here so we can cache them when we need to change the build/height
|
||||
const miiFaceImg = new Image();
|
||||
@@ -444,8 +475,8 @@ document
|
||||
const miiData = mii.encode().toString('base64');
|
||||
const tokenType = document.cookie.split('; ').find(row => row.startsWith('token_type=')).split('=')[1];
|
||||
const accessToken = document.cookie.split('; ').find(row => row.startsWith('access_token=')).split('=')[1];
|
||||
|
||||
fetch('http://api.pretendo.cc/v1/user', {
|
||||
|
||||
fetch('https://api.pretendo.cc/v1/user', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p class="price">
|
||||
<span>{{this.price}}</span> / {{ locale.upgrade.month }}
|
||||
<span>{{this.price}}</span> / {{ ../locale.upgrade.month }}
|
||||
</p>
|
||||
</label>
|
||||
{{/each}}
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
|
||||
<div class="section">
|
||||
<h5>{{ locale.docs.sidebar.juxt_err }}</h5>
|
||||
<a href="/docs/en_US/errors/JXT-598-0009">JXT-598-0009</a>
|
||||
<a href="/docs/en_US/errors/JXT-598-0010">JXT-598-0010</a>
|
||||
<a href="/docs/en_US/errors/JXT-598-0011">JXT-598-0011</a>
|
||||
<a href="/docs/en_US/errors/JXT-598-0015">JXT-598-0015</a>
|
||||
<a href="/docs/en_US/errors/JXT-598-0020">JXT-598-0020</a>
|
||||
<a href="/docs/errors/JXT-598-0009">JXT-598-0009</a>
|
||||
<a href="/docs/errors/JXT-598-0010">JXT-598-0010</a>
|
||||
<a href="/docs/errors/JXT-598-0011">JXT-598-0011</a>
|
||||
<a href="/docs/errors/JXT-598-0020">JXT-598-0020</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user