jillytot / remote-control Goto Github PK
View Code? Open in Web Editor NEWLearning how to web dev : ]
Learning how to web dev : ]
joi is behaving correctly, and you cannot continue when your passwords don't match, however the error isn't getting cleared in the state.
Some of them...
Trying to follow conventions and move everything into a /config folder, but this particular error is being stubborn.
internal/modules/cjs/loader.js:613 [1] throw err; [1] ^ [1] [1] Error: Cannot find module './settings' [1] Require stack: [1] - /Users/DerpThought/messing/remote-control/src/services/sockets/factories.js [1] - /Users/DerpThought/messing/remote-control/src/services/sockets/socketManager.js [1] - /Users/DerpThought/messing/remote-control/src/services/sockets/sockets.js [1] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) [1] at Function.Module._load (internal/modules/cjs/loader.js:526:27) [1] at Module.require (internal/modules/cjs/loader.js:666:19) [1] at require (internal/modules/cjs/helpers.js:16:16) [1] at Object.<anonymous> (/Users/DerpThought/messing/remote-control/src/services/sockets/factories.js:3:23) [1] at Module._compile (internal/modules/cjs/loader.js:759:30) [1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) [1] at Module.load (internal/modules/cjs/loader.js:628:32) [1] at Function.Module._load (internal/modules/cjs/loader.js:555:12) [1] at Module.require (internal/modules/cjs/loader.js:666:19)
Move Active Users into it's own tab.
Chat button to the right of the chat box
Fix sizing of chat input ( other text input fields )
Channels might need their own model
A channel could be composed of several elements: i.e. a chat room, a control interface, one or more video feeds etc...
Interface needs to handle channels being dynamically updated and presented to the user.
Need to do some research here.
Signup,
Login,
Create Server,
send Chat,
get Chat,
join server,
join channel
Currently hitting logout doesn't reflect changes in the UI for logging out.
Time users out after some given amount of time if connection is totally lost.
Without publishing to the whole group
node:30403) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt malformed
at Object.module.exports [as verify] (/home/soylentmail/remote-control/node_modules/jsonwebtoken/verify.js:63:1
7)
at Promise (/home/soylentmail/remote-control/src/models/user.js:104:9)
at new Promise ()
at Object.module.exports.verifyAuthToken (/home/soylentmail/remote-control/src/models/user.js:102:28)
at Socket.socket.on (/home/soylentmail/remote-control/src/events/index.js:19:32)
at Socket.emit (events.js:197:13)
at /home/soylentmail/remote-control/node_modules/socket.io/lib/socket.js:528:12
at processTicksAndRejections (internal/process/next_tick.js:74:9)
(node:30403) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwin
g inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(rejection id: 6)
undefined
(node:30403) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt malformed
at Object.module.exports [as verify] (/home/soylentmail/remote-control/node_modules/jsonwebtoken/verify.js:63:1
7)
at Promise (/home/soylentmail/remote-control/src/models/user.js:104:9)
at new Promise ()
at module.exports.verifyAuthToken (/home/soylentmail/remote-control/src/models/user.js:102:28)
at router.post (/home/soylentmail/remote-control/src/routes/api/auth.js:5:25)
at Layer.handle [as handle_request] (/home/soylentmail/remote-control/node_modules/express/lib/router/layer.js:
95:5)
at next (/home/soylentmail/remote-control/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/soylentmail/remote-control/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/soylentmail/remote-control/node_modules/express/lib/router/layer.js:
95:5)
at /home/soylentmail/remote-control/node_modules/express/lib/router/index.js:281:22
(node:30403) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwin
g inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(rejection id: 8)
Ged's suggestion:
`var colors = {'user1' :'red', 'user2': 'green', 'user3': 'blue'} //this.state.colors
var users = [{username: 'user1'}] //(this.state.users)
var chatroom = {messages: [{sender: 'user2'}]} // (this.state.chatroom)
var colorCleanup = setInterval(() => {
const newColors = colors //(this.state.colors)
var usernamesToKeep = []
users.map((user) => {
usernamesToKeep.push(user.username)
})
chatroom.messages.map((message) => {
if (usernamesToKeep.includes(message.sender) !== true){
usernamesToKeep.push(message.sender)
}
})
Object.keys(colors).map((username) => {
if (usernamesToKeep.includes(username) !== true){
delete newColors[username]
}
})
console.log(newColors)
//this.setState({colors: newColors})
}, 30000) //garbage cleanup every 30s
function getColor(username){
const newColors = colors
if (colors.hasOwnProperty(username)){
return colors[username]
} else {
const newColor = 'randomly generated color'
newColors[username] = newColor
colors = newColors //this.setState({colors: newColors})
return newColor
}
}
// on component unmount clearInterval(colorCleanup)`
User gets timed out. User's status is set to being timed out.
A general message should be shown to people in chat that tells them who has been timed out, and for how long
Making an incorrect command should give the user direct feedback on the client side
If timedout user tries to type or do things, they will get a message telling them they are still timedout / banned
All messages by removed user also get removed
A log is added to the user indicating when and where they got timed out and by who
Channel names shouldn't appear until server is selected.
Chat shouldn't appear until channel is selected.
Chat name should be the title of the chat.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.