Closed HadleyKing closed 5 months ago
@tiwa1154 Here are the things you will need to do to get this done:
[ ] You will need to add a status
to the accountSlice.js like in [bcoSlice.js](https://github.com/biocompute-objects/portal_userdb/blob/main/client/src/slices/bcoSlice.js)
https://github.com/biocompute-objects/portal_userdb/blob/76ab2dc6dd7c6f26b544e4850713b5b611f5f599/client/src/slices/accountSlice.js#L396-L399 https://github.com/biocompute-objects/portal_userdb/blob/76ab2dc6dd7c6f26b544e4850713b5b611f5f599/client/src/slices/bcoSlice.js#L38-L42
[ ] Create extraReducers
for the accountSlice.js
like those for the getDraftBco
functions:
https://github.com/biocompute-objects/portal_userdb/blob/76ab2dc6dd7c6f26b544e4850713b5b611f5f599/client/src/slices/bcoSlice.js#L124-L140
[ ] Use a conditional to display the loading message. Either as a popup or partial page. BCO Builder provided for reference: https://github.com/biocompute-objects/portal_userdb/blob/76ab2dc6dd7c6f26b544e4850713b5b611f5f599/client/src/slices/bcoSlice.js#L124-L140
Optional
[ ] you could add a sleep function to the server
authentication to make sure the submission give you a good wait time:
https://github.com/biocompute-objects/portal_userdb/blob/76ab2dc6dd7c6f26b544e4850713b5b611f5f599/server/authentication/services.py#L44-L50
class CustomJSONWebTokenAuthentication(BaseAuthentication):
"""Class for custom authentication
"""
def authenticate(self, request):
if "Authorization" in request.headers:
import time; time.sleep(2.5)
kind, token = request.headers['Authorization'].split(' ')
Pushed as a new branch https://github.com/biocompute-objects/portal_userdb/tree/login_loading_page
Implementation complete.
Login needs some sort of loading screen (after logging in with ORCID, it takes you back to the login screen and sits for several seconds, looks like nothing is happening)