-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,249 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.