[go: nahoru, domu]

Skip to content

Commit

Permalink
Deploy ready 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
brtvcl committed Oct 13, 2022
1 parent 5e3d3c0 commit d359a7d
Show file tree
Hide file tree
Showing 30 changed files with 1,249 additions and 41 deletions.
52 changes: 52 additions & 0 deletions events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Events that client emits
let client_emits = ["addFile", "delFile", "downloadFile", "getUsers", "chunk"];

// Events that client listens for
let client_listens = ["setFiles", "setUsers", "setMascot", "getFile", "chunk"];

// Events that only host emits
let host_emits = ["setFiles", "setUsers", "setMascot"];

// Events that host listens
let host_listens = ["addFile", "delFile", "downloadFile"];



const addFileEvent = {

type: "addFile",
payload: {
id,
owner,
name,
size,
type,
}
}


const delFileEvent = {
type: "delFile",
payload: id
}

const setUsersEvent = {
type: "setUsers",
payload: [
{id:"SAFG9S",mascot:"🐵"}
]
}

const getFileEvent = {
type: "getFile",
payload: foundFile.id
};

const chunkEvent = {
type: "chunk",
payload: {
fileId: "",
offset: "",
chunk: ""
}
}
23 changes: 23 additions & 0 deletions features
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
add file
- add file to box

delete file
- remove file from box

download remote file
- show download progress
- show uploading progress

(admin) kick user,
user leave
- remove every file of user from box
- remove user from box
- alert user that is kicked

admin leave
- alert admin left
- go back to home page

share
- by qr code
- with link
159 changes: 141 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"webpack-merge": "^5.8.0"
},
"dependencies": {
"nanoid": "^4.0.0",
"peerjs": "^1.4.7",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
Binary file added public/img/a1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/a2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/monkey-face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d359a7d

Please sign in to comment.