diff --git a/bookwyrm/static/js/bookwyrm.js b/bookwyrm/static/js/bookwyrm.js index 2d5b88adc..86a021af8 100644 --- a/bookwyrm/static/js/bookwyrm.js +++ b/bookwyrm/static/js/bookwyrm.js @@ -368,4 +368,20 @@ let BookWyrm = new class { ); } } + + /** + * Display pop up window. + * + * @param {string} url Url to open + * @param {string} windowName windowName + * @return {undefined} + */ + displayPopUp(url, windowName){ + + window.open( + url, + windowName, + "left=100,top=100,width=430,height=600" + ) + } }(); diff --git a/bookwyrm/templates/ostatus/remote_follow_button.html b/bookwyrm/templates/ostatus/remote_follow_button.html index 4789d3064..2848fde0e 100644 --- a/bookwyrm/templates/ostatus/remote_follow_button.html +++ b/bookwyrm/templates/ostatus/remote_follow_button.html @@ -4,13 +4,9 @@
{% endif %} diff --git a/bookwyrm/views/follow.py b/bookwyrm/views/follow.py index ce0238d67..2ebe0ce04 100644 --- a/bookwyrm/views/follow.py +++ b/bookwyrm/views/follow.py @@ -136,11 +136,6 @@ def ostatus_follow_success(request): def remote_follow_page(request): """Display remote follow page""" - - # this is triggered from remote follow form - # attempt the follow request - # on success [[return success page]] - # on fail return [[ostatus_error]] user = get_user_from_username(request.user, request.GET.get("user")) data = { "user": user @@ -154,15 +149,3 @@ def remote_follow(request): template = subscribe_remote_webfinger(remote_user) url = template.replace("{uri}", request.POST.get("user")) return redirect(url) - -""" -REQUEST TO FOLLOW FROM REMOTE ACCOUNT -1. click remote follow button [default checked option to open new window] -2. popup new small window - - -REQUEST TO FOLLOW FROM LOCAL ACCOUNT - -4. send follow request, on 200 response display success else display error -5. Include button inviting to close window -"""