flxcn / dialogue Goto Github PK
View Code? Open in Web Editor NEWMUN chat platform with middleman verification
Home Page: https://dialogue.lakemun.com
MUN chat platform with middleman verification
Home Page: https://dialogue.lakemun.com
The time display is currently in UTC. For the behind-the-scenes comparisons and calculations, it will be fine to continue using UTC. The time however needs to be updated when displayed to the user.
Initially, two approaches were considered to signal whether a delegate is online (i.e. active) or offline.
First was a boolean table column called is_logged_in, which would be toggled to true after sign-in and switched back to false after the sign-out button is clicked. However, with some testing, it was clear that even if a delegate closed the browser window without clicking the sign-out button, the delegate would still be registered as "online."
Therefore the second approach was pursued. A table column called "last_active_on" is updated through a function when the delegate is signed into the dashboard, and this updated value is checked against the current time to determine "online" status.
At some time in the future, once most of the code for this project has been written, consider swapping out icon.png for a new icon that doesn't require attribution, OR properly include attribution on each page, OR draw a new one. For now it is fine, because it is in development and recorded on the ACKNOWLEDGEMENTS.md file.
This may ultimately be a moot point, but I did want to write this down for future reference. At the moment, active delegate sessions on the dashboard are being tracked through a single column in the 'delegates' table, which is update frequently with new timestamps.
As the project scales and the username grows, it may be worth taking a look at creating a separate table named 'sessions', or 'delegate_activities', or some combination of those terms, for the purpose of logging user activity. It would however grow in volume at a much faster rate than the other tables, which may require future maintenance.
Here's an interesting Stack Overflow article that is relevant to the topic:
https://stackoverflow.com/questions/174248/strategy-for-tracking-user-recent-activity
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.