diff --git a/app/assets/javascripts/app/pages/settings.js b/app/assets/javascripts/app/pages/settings.js index be522514fc36e88e4d5b9d7eac19ee0b2fff99c9..6592c1b8c6a48ca2fed9ded060cb5bf0fd13fbfa 100644 --- a/app/assets/javascripts/app/pages/settings.js +++ b/app/assets/javascripts/app/pages/settings.js @@ -15,6 +15,10 @@ app.pages.Settings = Backbone.View.extend({ form: $("#post-default-aspects") }); $("#update_profile_form").areYouSure(); + + $("#register-protocol-handler").click(function() { + Diaspora.ProtocolHandler.register(); + }); } }); // @license-end diff --git a/app/assets/javascripts/helpers/protocol_handler.js b/app/assets/javascripts/helpers/protocol_handler.js index c857c1b5109d62f1be797d5a7f3439e817c43b74..090362f27b5fb8e42512a2b71d86309ed7d58acf 100644 --- a/app/assets/javascripts/helpers/protocol_handler.js +++ b/app/assets/javascripts/helpers/protocol_handler.js @@ -19,5 +19,3 @@ Diaspora.ProtocolHandler = { return true; } }; - -Diaspora.ProtocolHandler.register(); diff --git a/app/views/users/_edit.haml b/app/views/users/_edit.haml index 0ec3102b7db386b666b1b6f1615452094ec97ce3..65bf97f0e5dcce6532fa95a59e4d2f13b5618c9b 100644 --- a/app/views/users/_edit.haml +++ b/app/views/users/_edit.haml @@ -180,6 +180,16 @@ .clearfix= f.submit t(".change"), class: "btn btn-primary pull-right", id: "change_email_preferences" %hr + .row + .col-md-12 + %h3#protocol-handler + = t(".protocol_handler.title") + %p= t(".protocol_handler.description") + .form-group + %button.btn.btn-default#register-protocol-handler + = t(".protocol_handler.register") + %hr + .row .col-md-6.account-data %h3= t(".export_data") diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index f28b8f5518b38f82ccfbd2681788fd69148acbf9..e6d80d0b18b93b0f5bc3f319184cce6fd932bbb1 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -1242,6 +1242,11 @@ en: lock_username: "Your username will be locked. You will not be able to create a new account on this pod with the same ID." no_turning_back: "There is no turning back! If you’re really sure, enter your password below." + protocol_handler: + title: "web+diaspora:// protocol handler" + description: "Clicking this button will ask your browser to install a handler that allows us to open web+diaspora:// URLs on your home pod. This is currently experimental and interactions will depend on your browser." + register: "Register" + privacy_settings: title: "Privacy settings" strip_exif: "Strip metadata such as location, author, and camera model from uploaded images (recommended)"