Skip to content

Commit

Permalink
Make API key & RSS feed url only show when clicked (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
EXtremeExploit authored Mar 6, 2024
1 parent 1f69cee commit 7a3b7e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/philomena_web/templates/registration/edit.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ p
h3 API Key
p
' Your API key is
code>
= @current_user.authentication_token
' - you can use this to allow API consumers to access your account.
#api-key-button>
code>
= link("Click to show", to: "#", data: [click_show: "#api-key", click_hide: "#api-key-button"])
#api-key.hidden>
code>
= @current_user.authentication_token
p You can use this to allow API consumers to access your account.
p
' Avoid sharing this key with others, as it could be used to compromise
' your account.
Expand Down
6 changes: 5 additions & 1 deletion lib/philomena_web/templates/setting/edit.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ h1 Content Settings
p
' RSS feed link (for Newsblur, RSSOwl, Thunderbird, etc.):
br
= url_input f, :subscribe_url, value: Routes.api_rss_watched_url(@conn, :index, key: @conn.assigns.current_user.authentication_token), class: "input input--wide"
#rss-feed-button>
code>
= link("Click to show", to: "#", data: [click_show: "#rss-link", click_hide: "#rss-feed-button"])
#rss-link.hidden
= url_input f, :subscribe_url, value: Routes.api_rss_watched_url(@conn, :index, key: @conn.assigns.current_user.authentication_token), class: "input input--wide"
br
' Do not share this URL with anyone, it may allow an attacker to compromise your account.

Expand Down

0 comments on commit 7a3b7e6

Please sign in to comment.