Skip to content

Commit b72c167

Browse files
committed
2 parents 35e07eb + bc81fb0 commit b72c167

5 files changed

Lines changed: 97 additions & 61 deletions

File tree

src/lib/Event/Component.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Language from "../../resources/language.js";
44
import EventPages from "../../resources/markdown/events/pages.js";
55
6-
const isHavingEvent = true;
6+
const isHavingEvent = false;
77
const eventName = "All The Mods 2026";
88
const eventPath = "allthemods2026";
99

src/routes/+page.svelte

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -745,18 +745,15 @@
745745
<div class="category-news">
746746
<div class="category-news-content">
747747
<h2 style="margin-block:4px;">
748-
All The Mods Game Jam!
748+
All The Mods Game Jam has ended!
749749
</h2>
750750
<div style="width:100%">
751751
<p>
752-
We've partnered with many different Scratch mods (featuring PenguinMod, TurboWarp, and more)
753-
to run a game jam across multiple communities!
754-
<br />
755-
Please see the event page for details on how to participate!
756-
</p>
757-
<p style="margin-block-start:4px;">
758-
<a href="https://penguinmod.com/events/allthemods2026">All The Mods 2026</a>
752+
Thanks for participating in the event! Rankings will be announced on <a href="https://itch.io/jam/all-the-mods-game-jam">itch.io</a>. See you soon!
759753
</p>
754+
<a href="https://itch.io/jam/all-the-mods-game-jam">
755+
All The Mods on itch.io
756+
</a>
760757
<img
761758
src="/events/news/allthemods2026.webp?r=1"
762759
alt="All The Mods 2026"

src/routes/oauthchangepasswordintermediate/+page.svelte

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { onMount } from "svelte";
3-
import { browser } from '$app/environment';
3+
import { browser } from "$app/environment";
44
55
import { PUBLIC_API_URL, PUBLIC_STUDIO_URL } from "$env/static/public";
66
@@ -40,7 +40,7 @@
4040
{ name: "password.requirement.symbol", value: false },
4141
];
4242
43-
function changePasswordRedirect() {
43+
async function changePasswordRedirect() {
4444
if (!browser) return;
4545
4646
// get url params
@@ -63,11 +63,20 @@
6363
throw new Error("Invalid method");
6464
}
6565
66-
url += `?at=${accessToken}&password=${password}`;
66+
const { username, token } = await fetch(url, {
67+
method: "POST",
68+
headers: {
69+
"Content-Type": "application/json",
70+
},
71+
body: JSON.stringify({ at: accessToken, password }),
72+
}).then((res) => res.json());
6773
68-
location.href = url;
74+
localStorage.setItem("token", token);
75+
localStorage.setItem("username", username);
76+
77+
location.href = "/";
6978
}
70-
const changePasswordRedirectSafe = () => {
79+
const changePasswordRedirectSafe = async () => {
7180
if (!canChangePassword) {
7281
alert(
7382
TranslationHandler.textSafe(
@@ -82,7 +91,7 @@
8291
if (changingPassword) return;
8392
changingPassword = true;
8493
85-
changePasswordRedirect();
94+
await changePasswordRedirect();
8695
};
8796
8897
async function checkIfValid() {

src/routes/profile/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@
333333
}
334334
}
335335
336+
fetchProfile();
337+
336338
page.subscribe((v) => {
337339
if (!v.url.searchParams.get("user") || !user) return;
338340
if (

src/routes/resetpassword/+page.svelte

Lines changed: 74 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { onMount } from "svelte";
3-
3+
44
// Components
55
import NavigationBar from "$lib/NavigationBar/NavigationBar.svelte";
66
import NavigationMargin from "$lib/NavigationBar/NavMargin.svelte";
@@ -44,19 +44,27 @@
4444
let passwordValid = false;
4545
4646
const passwordRequirements = [
47-
{name: "password.requirement.length", value: false},
48-
{name: "password.requirement.casing", value: false},
49-
{name: "password.requirement.number", value: false},
50-
{name: "password.requirement.symbol", value: false},
51-
]
47+
{ name: "password.requirement.length", value: false },
48+
{ name: "password.requirement.casing", value: false },
49+
{ name: "password.requirement.number", value: false },
50+
{ name: "password.requirement.symbol", value: false },
51+
];
5252
5353
async function checkIfValid() {
54-
const passwordDoesNotMeetLength = password.length < 8 || password.length > 50;
55-
const passwordMeetsTextInclude = password.match(/[a-z]/) && password.match(/[A-Z]/);
54+
const passwordDoesNotMeetLength =
55+
password.length < 8 || password.length > 50;
56+
const passwordMeetsTextInclude =
57+
password.match(/[a-z]/) && password.match(/[A-Z]/);
5658
const passwordHasNumber = !!password.match(/[0-9]/);
5759
const passwordMeetsSpecialInclude = !!password.match(/[^a-z0-9]/i);
5860
59-
const passwordCheck = passwordDoesNotMeetLength || !(passwordMeetsTextInclude && passwordMeetsSpecialInclude && passwordHasNumber);
61+
const passwordCheck =
62+
passwordDoesNotMeetLength ||
63+
!(
64+
passwordMeetsTextInclude &&
65+
passwordMeetsSpecialInclude &&
66+
passwordHasNumber
67+
);
6068
6169
passwordRequirements[0].value = !passwordDoesNotMeetLength;
6270
passwordRequirements[1].value = passwordMeetsTextInclude;
@@ -81,13 +89,16 @@
8189
function resetPassword() {
8290
resetingPassword = true;
8391
Authentication.resetPassword(email, state, password)
84-
.then(() => {
92+
.then((token) => {
93+
localStorage.setItem("token", token);
8594
resetingPassword = false;
86-
alert(TranslationHandler.textSafe(
87-
"password.update.success",
88-
currentLang,
89-
"Password changed successfully!"
90-
));
95+
alert(
96+
TranslationHandler.textSafe(
97+
"password.update.success",
98+
currentLang,
99+
"Password changed successfully!",
100+
),
101+
);
91102
location.href = "/";
92103
})
93104
.catch((error) => {
@@ -96,29 +107,35 @@
96107
});
97108
}
98109
</script>
99-
110+
100111
<svelte:head>
101112
<title>PenguinMod - Reset Password</title>
102113
<meta name="title" content="PenguinMod - Reset Password" />
103114
<meta property="og:title" content="PenguinMod - Reset Password" />
104115
<meta property="twitter:title" content="PenguinMod - Reset Password" />
105-
<meta name="description" content="Reset your password for PenguinMod to regain access to your account with a new password" />
106-
<meta property="twitter:description" content="Reset your password for PenguinMod to regain access to your account with a new password" />
107-
<meta property="og:url" content="https://penguinmod.com/resetpassword">
108-
<meta property="twitter:url" content="https://penguinmod.com/resetpassword">
116+
<meta
117+
name="description"
118+
content="Reset your password for PenguinMod to regain access to your account with a new password"
119+
/>
120+
<meta
121+
property="twitter:description"
122+
content="Reset your password for PenguinMod to regain access to your account with a new password"
123+
/>
124+
<meta property="og:url" content="https://penguinmod.com/resetpassword" />
125+
<meta
126+
property="twitter:url"
127+
content="https://penguinmod.com/resetpassword"
128+
/>
109129
</svelte:head>
110-
130+
111131
<NavigationBar />
112132

113133
<div class="main">
114134
<NavigationMargin />
115135

116136
<main>
117137
<div class="profile-section">
118-
<img
119-
src="/account/profile_sheet.png"
120-
alt="Profiles"
121-
/>
138+
<img src="/account/profile_sheet.png" alt="Profiles" />
122139
</div>
123140
<h1 style="margin-block:4px">PenguinMod</h1>
124141
<p>
@@ -128,7 +145,7 @@
128145
lang={currentLang}
129146
/>
130147
</p>
131-
148+
132149
<span class="input-title">
133150
<LocalizedText
134151
text="Password"
@@ -142,13 +159,13 @@
142159
placeholder={TranslationHandler.textSafe(
143160
"account.fields.password.placeholder",
144161
currentLang,
145-
"Remember to write it down!"
162+
"Remember to write it down!",
146163
)}
147164
data-valid={passwordValid}
148165
maxlength="50"
149166
on:input={passwordInputChanged}
150-
on:focusin={() => focused = true}
151-
on:focusout={() => focused = false}
167+
on:focusin={() => (focused = true)}
168+
on:focusout={() => (focused = false)}
152169
/>
153170
<button
154171
class="password-show invert-on-dark"
@@ -160,7 +177,11 @@
160177
<ChecksBox items={passwordRequirements} />
161178
{/if}
162179

163-
<button class="create-acc" data-canReset={canResetPassword} on:click={resetPassword}>
180+
<button
181+
class="create-acc"
182+
data-canReset={canResetPassword}
183+
on:click={resetPassword}
184+
>
164185
{#if resetingPassword}
165186
<LoadingSpinner icon="/loading_white.png" />
166187
{:else}
@@ -173,7 +194,7 @@
173194
</button>
174195
</main>
175196
</div>
176-
197+
177198
<style>
178199
* {
179200
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -241,7 +262,7 @@
241262
background: #111;
242263
color: white;
243264
}
244-
265+
245266
main input[data-valid="true"] {
246267
border-color: rgb(0, 187, 0) !important;
247268
}
@@ -257,13 +278,13 @@
257278
height: calc(100% - 8px);
258279
border: 0;
259280
background: transparent;
260-
background-image: url('account/showpassword.svg');
281+
background-image: url("account/showpassword.svg");
261282
background-size: 100% 100%;
262283
opacity: 0.7;
263284
cursor: pointer;
264285
}
265286
.password-show[data-visible="true"] {
266-
background-image: url('account/hidepassword.svg');
287+
background-image: url("account/hidepassword.svg");
267288
background-size: 100% 100%;
268289
}
269290
:global(body.dark-mode) .invert-on-dark {
@@ -288,27 +309,27 @@
288309
padding: 4px 8px;
289310
width: 60%;
290311
margin-top: 4px;
291-
312+
292313
display: flex;
293314
flex-direction: row;
294315
align-items: center;
295316
justify-content: center;
296317
border: 1px solid rgba(0, 0, 0, 0.2);
297318
font-size: 18px;
298319
}
299-
300-
.create-acc[data-canReset=true] {
320+
321+
.create-acc[data-canReset="true"] {
301322
background: #00c3ff;
302323
cursor: pointer;
303324
color: white;
304325
}
305326
306-
:global(body.dark-mode) .create-acc[data-canReset=false] {
327+
:global(body.dark-mode) .create-acc[data-canReset="false"] {
307328
background: #9c9c9c;
308329
color: rgb(255, 255, 255);
309330
}
310331
311-
.create-acc[data-canReset=false] {
332+
.create-acc[data-canReset="false"] {
312333
background: #9c9c9c;
313334
color: rgb(255, 255, 255);
314335
cursor: not-allowed;
@@ -331,25 +352,32 @@
331352
}
332353
333354
@keyframes profile-scroll {
334-
0%, 10% {
355+
0%,
356+
10% {
335357
transform: translateX(0);
336358
}
337-
15%, 25% {
359+
15%,
360+
25% {
338361
transform: translateX(-96px);
339362
}
340-
30%, 40% {
363+
30%,
364+
40% {
341365
transform: translateX(-192px);
342366
}
343-
45%, 55% {
367+
45%,
368+
55% {
344369
transform: translateX(-288px);
345370
}
346-
60%, 70% {
371+
60%,
372+
70% {
347373
transform: translateX(-384px);
348374
}
349-
75%, 85% {
375+
75%,
376+
85% {
350377
transform: translateX(-480px);
351378
}
352-
90%, 100% {
379+
90%,
380+
100% {
353381
transform: translateX(-480px);
354382
}
355383
}

0 commit comments

Comments
 (0)