Skip to content

Commit

Permalink
v8.1.10: make fat drives sidebar works for anonumous user
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Jun 23, 2024
1 parent a4f8d7e commit abeb485
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-dos",
"version": "8.1.9",
"version": "8.1.10",
"description": "Full-featured DOS player with multiple emulator backends",
"type": "module",
"keywords": [
Expand Down
49 changes: 48 additions & 1 deletion src/frame/fat-drives-frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,59 @@ export function FatDrivesFrame() {

function reloadDrives() {
if (!account || !account.token) {
setMyDrives([]);
setMyDrives([
{
"fork_of": [],
"name": "fat32-2gb",
"owner": "system",
"template": "fat32-2gb",
},
{
"fork_of": [],
"name": "fat16-256m",
"owner": "system",
"template": "fat16-256m",
},
{
"fork_of": [
"system/fat16-256m",
],
"name": "win95-v1",
"owner": "system",
"template": "fat16-256m",
},
{
"fork_of": [
"system/fat16-256m",
],
"name": "dos7.1-v1",
"owner": "system",
"template": "fat16-256m",
},
{
"fork_of": [
"system/fat32-2gb",
],
"name": "win98-v1",
"owner": "system",
"template": "fat32-2gb",
},
{
"fork_of": [
"system/fat32-2gb",
],
"name": "win95-v2",
"owner": "system",
"template": "fat32-2gb",
},
]);
setBusy(false);
} else {
setBusy(true);
fetch(sockdriveEndpoint + "/list/drives/" + account.token.access_token)
.then((r) => r.json())
.then((drives: Drive[]) => {
console.log(JSON.stringify(drives, null, 2));
setMyDrives(drives.sort((a, b) => a.name.localeCompare(b.name)));
})
.catch(console.error)
Expand Down

0 comments on commit abeb485

Please sign in to comment.