Skip to content

Commit 892e8e1

Browse files
committed
Update dependencies, fix token validation, update tutorial url, switch back to npm
1 parent 31fa57e commit 892e8e1

10 files changed

Lines changed: 8072 additions & 4455 deletions

File tree

frontend/package-lock.json

Lines changed: 8013 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,41 @@
1212
},
1313
"license": "MIT",
1414
"devDependencies": {
15-
"@types/jest": "^29.5.7",
15+
"@types/jest": "^29.5.14",
1616
"jest": "^29.7.0",
17-
"solid-devtools": "^0.29.3",
18-
"ts-jest": "^29.1.2",
19-
"typescript": "^5.3.3",
20-
"vite": "^5.1.3",
21-
"vite-plugin-solid": "^2.8.2"
17+
"solid-devtools": "^0.30.1",
18+
"ts-jest": "^29.2.5",
19+
"typescript": "^5.6.3",
20+
"vite": "^5.4.10",
21+
"vite-plugin-solid": "^2.10.2"
2222
},
2323
"browserslist": [
2424
"defaults",
2525
"chrome >=92 "
2626
],
2727
"dependencies": {
28-
"@fontsource/roboto": "^5.0.8",
29-
"@solid-devtools/overlay": "^0.29.3",
30-
"@solidjs/meta": "^0.29.3",
31-
"@solidjs/router": "^0.12.4",
32-
"@suid/icons-material": "^0.6.11",
33-
"@suid/material": "^0.15.1",
34-
"@suid/vite-plugin": "^0.1.5",
35-
"@types/lodash": "^4.14.202",
36-
"@types/node": "^20.8.10",
37-
"@types/semver": "^7.5.7",
38-
"@vitejs/plugin-legacy": "^5.3.0",
39-
"autoprefixer": "^10.4.17",
40-
"date-fns": "^3.3.1",
28+
"@fontsource/roboto": "^5.1.0",
29+
"@solid-devtools/overlay": "^0.30.1",
30+
"@solidjs/meta": "^0.29.4",
31+
"@solidjs/router": "^0.15.0",
32+
"@suid/icons-material": "^0.8.1",
33+
"@suid/material": "^0.18.0",
34+
"@suid/vite-plugin": "^0.3.1",
35+
"@types/lodash": "^4.17.13",
36+
"@types/node": "^22.8.7",
37+
"@types/semver": "^7.5.8",
38+
"@vitejs/plugin-legacy": "^5.4.3",
39+
"autoprefixer": "^10.4.20",
40+
"date-fns": "^4.1.0",
4141
"lodash": "^4.17.21",
4242
"normalize.css": "^8.0.1",
43-
"postcss": "^8.4.35",
44-
"sass": "^1.71.0",
45-
"semver": "^7.6.0",
43+
"postcss": "^8.4.47",
44+
"sass": "^1.80.6",
45+
"semver": "^7.6.3",
4646
"solid-icons": "^1.1.0",
47-
"solid-js": "^1.8.15",
47+
"solid-js": "^1.9.3",
4848
"solid-toast": "^0.5.0",
49-
"tailwindcss": "^3.4.1",
50-
"terser": "^5.27.2"
49+
"tailwindcss": "^3.4.14",
50+
"terser": "^5.36.0"
5151
}
5252
}

frontend/src/components/Buttons/Button.module.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
background: #111827;
66
border-radius: 6px;
77
padding: 10px 15px;
8-
display: flex;
9-
flex-direction: column;
10-
align-items: center;
11-
justify-content: center;
12-
cursor: pointer;
8+
display: flex;
9+
flex-direction: column;
10+
align-items: center;
11+
justify-content: center;
12+
cursor: pointer;
1313

1414
font-family: "Roboto";
1515
font-style: normal;
@@ -22,10 +22,10 @@
2222
text-align: center;
2323

2424
color: #d1d5db;
25-
&:hover{
25+
&:hover {
2626
background: #1f2937;
2727
}
28-
&:active{
28+
&:active {
2929
background: #374151;
3030
}
3131
&:disabled {

frontend/src/modals/RestoreBackupModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ function InstallingStep(props: {
343343
let installed = await checkIfGameIsInstalled();
344344

345345
if (installed) {
346-
debugger
347346
setIsInstalled(true);
348347
setDone(true);
349348
setInProgress(false);

frontend/src/pages/DowngradePage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ export default function DowngradePage() {
117117

118118
const versions = createMemo<IDisplayVersion[]>(() => {
119119
let versions = gameVersions();
120-
120+
const showBetaVersions = showBeta();
121121
let DisplayVersions = [];
122122

123123
for (const version of versions) {
124124
if (!version.downloadable) continue;
125-
if (showBeta()) {
125+
if (showBetaVersions) {
126126
DisplayVersions.push(versionToDisplayVersion(version, beatSaberCores()));
127127
continue;
128128
} else {
@@ -294,7 +294,6 @@ function SwitchGameModal(props: { open: boolean, onClose: () => void }) {
294294

295295
async function selectGame() {
296296
let game = results()?.find(x => x.id == selected());
297-
debugger
298297
if (!game) {
299298
toast.error("Whaaa, tell frozen that not having a game here is possible")
300299
return;

frontend/src/pages/DownloadProgressPage.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ enum StateOfDownload {
8181
Done,
8282
}
8383

84-
async function cancelAppDL(item: IGameDownloadItem){
84+
async function cancelAppDL(item: IGameDownloadItem) {
8585
let sure = await showConfirmModal({
8686
title: "Cancel download",
8787
message: "Are you sure you want to cancel this download?",
@@ -103,8 +103,8 @@ function GameDownloadItem(props: { download: IGameDownloadItem }) {
103103
const downloadStatus = createMemo<{
104104
state: StateOfDownload,
105105
download: IGameDownloadItem,
106-
manager?: IDownloadManagerInfo
107-
106+
manager?: IDownloadManagerInfo,
107+
status?: string,
108108
}>(() => {
109109
let state = StateOfDownload.Downloading;
110110
let manager: IDownloadManagerInfo | undefined = undefined;
@@ -135,6 +135,7 @@ function GameDownloadItem(props: { download: IGameDownloadItem }) {
135135
state: state,
136136
download: download,
137137
manager: manager,
138+
status: download.status,
138139
}
139140
});
140141

@@ -144,8 +145,6 @@ function GameDownloadItem(props: { download: IGameDownloadItem }) {
144145
<div class="h-full bg-accent transition-all" style={` width: ${Math.floor(downloadStatus().manager!.percentage * 100)}%`}> </div>
145146
</div>
146147
</Show>
147-
148-
149148
<div class="p-4 flex flex-row">
150149
<div class="flex-grow">
151150
<div class="flex gap-2 items-baseline">
@@ -155,12 +154,21 @@ function GameDownloadItem(props: { download: IGameDownloadItem }) {
155154
<div class="text-xs ">
156155
<Show when={downloadStatus().state === StateOfDownload.Downloading && downloadStatus().manager}>
157156
<span class="text-accent">Downloading | {Math.floor(downloadStatus().manager!.percentage * 100)}% | {downloadStatus().manager!.speedString} | ETA: {downloadStatus().manager!.eTAString}</span>
157+
<Show when={downloadStatus().status}>
158+
<span class="text-gray-300"> | {downloadStatus().status}</span>
159+
</Show>
158160
</Show>
159161
<Show when={downloadStatus().state === StateOfDownload.Canceled}>
160162
<span class="text-gray-300">Canceled</span>
163+
<Show when={downloadStatus().status}>
164+
<span class="text-gray-300"> | {downloadStatus().status}</span>
165+
</Show>
161166
</Show>
162167
<Show when={downloadStatus().state === StateOfDownload.Failed}>
163168
<span class="text-red-500">Failed</span>
169+
<Show when={downloadStatus().status}>
170+
<span class="text-gray-300"> | {downloadStatus().status}</span>
171+
</Show>
164172
</Show>
165173
<Show when={downloadStatus().state === StateOfDownload.Done}>
166174
<span class="text-accent">Done</span>
@@ -170,8 +178,7 @@ function GameDownloadItem(props: { download: IGameDownloadItem }) {
170178
</div>
171179
<div class="flex flex-row gap-2">
172180
<Show when={downloadStatus().state === StateOfDownload.Downloading && downloadStatus().manager}>
173-
174-
<IconButton color='info' onClick={()=>cancelAppDL(props.download)} >
181+
<IconButton color='info' onClick={() => cancelAppDL(props.download)} >
175182
<FiX />
176183
</IconButton>
177184
</Show>

frontend/src/pages/ToolsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default function ToolsPage() {
290290
}
291291
} text='Set token' />
292292
</Box>
293-
<A class="text-sm text-accent underline" target={!IsOnQuest() ? "_blank" : ""} href="https://computerelite.github.io/tools/Oculus/ObtainToken.html" >
293+
<A class="text-sm text-accent underline" target={!IsOnQuest() ? "_blank" : ""} href="https://computerelite.github.io/tools/Oculus/ObtainTokenNew.html" >
294294
Guide to get your token
295295
</A>
296296
</form>

frontend/src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export function ValidateToken(token: string): { isValid: boolean, message: strin
5050
message: "You got your token from the wrong place. Go to the payload tab. Don't get it from the url."
5151
};
5252
}
53-
if (!token.startsWith("OC")) {
53+
if (!token.startsWith("FRL")) {
5454
return {
5555
isValid: false,
56-
message: "Tokens must start with 'OC'. Please get a new one."
56+
message: "Tokens must start with 'FRL'. Please get a new one."
5757
};
5858
}
5959
if (token.includes("|")) {

frontend/vite.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import legacy from '@vitejs/plugin-legacy'
66
export default defineConfig({
77
base: "./",
88
plugins: [
9+
// Allows q1 browser to work? Needs to be tested
910
legacy({
1011
targets: ['defaults', 'not IE 11', 'chrome >= 92'],
1112
renderModernChunks: false,
@@ -38,7 +39,13 @@ export default defineConfig({
3839
css: {
3940
preprocessorOptions: {
4041
scss: {
41-
additionalData: `@import "@/assets/global.scss"; `
42+
additionalData: `@import "@/assets/global.scss"; `,
43+
// WARNING: If you update to dart-sass 3.0 you may need to remove this silencing
44+
silenceDeprecations: [
45+
"legacy-js-api",
46+
"import",
47+
"global-builtin",
48+
],
4249
}
4350
}
4451
},

0 commit comments

Comments
 (0)