forked from feedbin/feedbin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept Pinboard API token instead of username/password.
- Loading branch information
Showing
5 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/views/supported_sharing_services/_pinboard_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="service-options hide"> | ||
<%= form_for(record) do |f| %> | ||
<%= f.hidden_field :service_id, value: sharing_service[:service_id] %> | ||
<%= f.hidden_field :operation, value: 'authorize' %> | ||
<%= password_field_tag 'password', '', placeholder: 'API Token', class: 'no-margin' %> | ||
|
||
<%= link_to 'Cancel', '#', class: 'action-button button-danger button-link cancel-button', data: {behavior: "hide_service_options"} %> | ||
<%= submit_tag "Login", class: 'action-button button button-primary' %> | ||
<% end %> | ||
<small>You can find your API token on your <a href="https://pinboard.in/settings/password" target="_blank">Pinboard Password page</a>.</small> | ||
</div> |
13 changes: 12 additions & 1 deletion
13
app/views/supported_sharing_services/_service_pinboard.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<%= render partial: "supported_sharing_services/type_xauth", locals: {sharing_service: sharing_service, status: status, record: record} %></li> | ||
<% if status == :active %> | ||
<%= render partial: "supported_sharing_services/delete_supported_service", locals: {sharing_service: sharing_service} %> | ||
<% elsif status == :issue %> | ||
<p class="service-title <%= "icon-share-#{sharing_service.service_id}" %>"><%= sharing_service.label %></p> | ||
<small class="show-service-options">Feedbin can no longer access <%= sharing_service.label %>, <a href="#" data-behavior="show_service_options">reactivate</a>?</small> | ||
<%= link_to 'Deactivate', supported_sharing_service_path(sharing_service), class: 'list-action danger show-service-options', method: :delete %> | ||
<%= render partial: "supported_sharing_services/pinboard_form", locals: {sharing_service: sharing_service, record: record} %> | ||
<% else %> | ||
<p class="service-title <%= "icon-share-#{sharing_service[:service_id]}" %>"><%= sharing_service[:label] %></p> | ||
<%= link_to 'Activate', '#', class: 'list-action show-service-options', data: {behavior: "show_service_options"} %> | ||
<%= render partial: "supported_sharing_services/pinboard_form", locals: {sharing_service: sharing_service, record: record} %> | ||
<% end %> |