Skip to content

Commit

Permalink
Add logos, add logout #19
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Mar 11, 2024
1 parent 64e15c5 commit 5da3308
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
17 changes: 17 additions & 0 deletions public/img/orcid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions public/img/wikimedia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion public/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
<div class="form-group">
<label>
<% if(data?.user?.id){ %>
<p>Logged in</p>
<p>Logged in (<a href="/logout">Logout</a>)</p>
<% } else{ %>
<span>Login with</span>
<a href="/auth/mediawiki">Wikimedia</a>
<img src="img/wikimedia.svg" alt="wikimedia" style="height: 1em; vertical-align: middle;">
<span>or</span>
<a href="/auth/orcid">ORCID</a>
<img src="img/orcid.svg" alt="orcid" style="height: 1em; vertical-align: middle;">
<span>to provide an account for your dataset</span>
<a title="Please provide the same account for all your uploads. The account is part of the reconcile service url."></a>
<% } %>
Expand Down
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ app.get('/orcid/callback',
res.redirect('/');
});

app.get('/logout',
function(req, res) {
const data = {
reconcileUrl: config.reconcile_service_url,
user: null
}
res.render("index", { data });
});

app.post(
"/upload",
upload.single("uploaded_file"),
Expand Down

0 comments on commit 5da3308

Please sign in to comment.