Make API key & RSS feed url only show when clicked (#205)

This commit is contained in:
Pedro Montes Alcalde 2024-03-06 16:36:14 -03:00 committed by GitHub
parent 1f69cee296
commit 7a3b7e6d62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -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.

View file

@ -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.