Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update with GSoC progress #1

Merged
merged 100 commits into from Aug 23, 2019

Conversation

@rottencandy
Copy link
Contributor

commented May 9, 2019

Created login page using mithril.js as part of task 101 of the project.

rottencandy added 30 commits Apr 4, 2019
Add login.js
login.js when used as a module works as a mithril component that renders a
login page and communicates with RS Json API to faciliate validation.
Also updated qmake file to include login.js in build.
Update rswebui.js to use modifiable API keys
Added extra function to verify API keys(to be used by login.js) and
updated HTTP requests function to use a different callback on failiure.
Update index.html to use render login.js on start.
index.html's initial startpoint now loads all pages using mithril's
route functionality.
And changed downloads.js to disable updating of downloads list before the
keys have been verified.
Modify api request to not run if keys unverified
Communication with Json API now only happens if the keys are verified.
Automatic rendering and reloading of downloads is handled by oninit attribute
of the downloads component.
Remove minified mithril script
Due to security and debugging issues, the minified version will not
be used in the build process anymore. The framework is pretty minimalistic
so it would not make that big of a difference.
Load downloads only after login is verified.
Previously, the downloads page would be loaded but API would not
be accessed. This was causing issues with mithril's auto rendering.
Not loading the downloads component will make sure no requests are
being sent before login finishes.
Use m.request for all http requests to retroshare
rsJsonApiRequest() will use m.request instead of XmlHttpRequest for
all xhr requests to retroshare client. m.request makes it possible to
notify mithril's DOM vnodes on response and returns a Promise for easier
async calls.
Move login specific functionality to separate file
Login specific functionality like authentication and reporting
moved to login.js script.
Move start point to separate file
The starting point of the app moved from html file to main.js.
Add home tab
Created home tabe which displays user's certificate.
Add new files in qmake config
Added new files main.js and home.js to webui.pro
Implement basic css styles
The existing css has been disabled for the moment and a new css
file theme.css has been created. Respective components modified to
reflect changes for css selectors.
Move download-specific parts to it's own file
Functions used by downloads component for
Moved download-specific functions to it's own file
Functions used by downloads component to load and store files list
have been moved from rswebui.js to downloads.js. And added theme
for the widgets in downloads page.
Add asynchronous background update tasks
background tasks can be initiated from rswebui.js,
Downloads component will automatically update the file list
whenever it is mounted.
Fix file control button
resume/pause and cancel buttons on file transfers fixed and now work
as expected.
Add config tab section.
Config tab will be used to display node details and
settings/configuration options for both RS and the WebUI.
Display info for node panel in config tab
Display public information(from preferences>Node in RS).
Represent Config panel members as objects
Panel members in Config panel can be created, controlled and derived
by using Panel class.
Add Services panel in config tab
Shows Info about own services: names, type, version.
Add Data rate options in Network panel
The 'general' panel in config tab is renamed to 'network' panel.
Added options to set maximum upload and download limits.
// RS_MSG_BOXMASK = 0x000f
// RS_MSG_INBOX
Messages.inbox = Messages.all.filter(
(msg) => (msg.msgflags & 0x000f) === 0);

This comment has been minimized.

Copy link
@csoler

csoler Aug 22, 2019

Contributor

Would be better to have constants with names that match the constants in rsmsgs.h instead of blind numbers (1,3,5, etc).

}, (data) => {
details = data.msg;
files = details.files;
isStarred = (details.msgflags & 0xf00) === 0x200;

This comment has been minimized.

Copy link
@csoler

csoler Aug 22, 2019

Contributor

Same here

@csoler csoler merged commit 9fdaa5e into RetroShare:master Aug 23, 2019

@rottencandy rottencandy changed the title Implement Login page. Update with GSoC progress Aug 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.