Add how-it-works steps to home page and fix post-OAuth redirect
- Add three-step explanation (Search, Review, Save or skip) below the search form on the index page - After a LoginNeeded during save, redirect to OAuth with next= pointing back to the article page showing the same candidate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
25056aaf33
commit
5ba380d590
2 changed files with 33 additions and 3 deletions
|
|
@ -318,7 +318,8 @@ def handle_post(url_title: str) -> Response:
|
|||
try:
|
||||
do_save(from_title, hit_title)
|
||||
except mediawiki_oauth.LoginNeeded:
|
||||
return flask.redirect(flask.url_for("start_oauth"))
|
||||
next_url = flask.url_for("article_page", url_title=url_title, title=hit_title)
|
||||
return flask.redirect(flask.url_for("start_oauth", next=next_url))
|
||||
except (mediawiki_api.APIError, api.MediawikiError) as e:
|
||||
return flask.make_response(
|
||||
flask.render_template("error.html", message=f"Save failed: {e}"), 502
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue