Merge branch 'next-minor' into develop
This commit is contained in:
commit
1289b3b541
7 changed files with 43 additions and 19 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -54,7 +54,6 @@ tmp/
|
||||||
.byebug_history
|
.byebug_history
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
|
||||||
.redcar
|
.redcar
|
||||||
.stgit*
|
.stgit*
|
||||||
*.swap
|
*.swap
|
||||||
|
|
@ -73,6 +72,8 @@ capybara-*.html
|
||||||
*.rbc
|
*.rbc
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
diaspora.iml
|
diaspora.iml
|
||||||
|
|
||||||
# Dolphin's directory's preferences files
|
# Dolphin's directory's preferences files
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ app.pages.Settings = Backbone.View.extend({
|
||||||
form: $("#post-default-aspects")
|
form: $("#post-default-aspects")
|
||||||
});
|
});
|
||||||
$("#update_profile_form").areYouSure();
|
$("#update_profile_form").areYouSure();
|
||||||
|
|
||||||
|
$("#register-protocol-handler").click(function() {
|
||||||
|
Diaspora.ProtocolHandler.register();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
|
||||||
21
app/assets/javascripts/helpers/protocol_handler.js
Normal file
21
app/assets/javascripts/helpers/protocol_handler.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
||||||
|
|
||||||
|
Diaspora.ProtocolHandler = {
|
||||||
|
register: function() {
|
||||||
|
if (!window.navigator.registerProtocolHandler) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
window.navigator.registerProtocolHandler(
|
||||||
|
"web+diaspora",
|
||||||
|
[window.location.protocol, "//", window.location.host, "/link?q=%s"].join(""),
|
||||||
|
document.title
|
||||||
|
);
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
//= require api/authorization_page
|
//= require api/authorization_page
|
||||||
//= require bootstrap-markdown/bootstrap-markdown
|
//= require bootstrap-markdown/bootstrap-markdown
|
||||||
//= require helpers/markdown_editor
|
//= require helpers/markdown_editor
|
||||||
|
//= require helpers/protocol_handler
|
||||||
//= require jquery.are-you-sure
|
//= require jquery.are-you-sure
|
||||||
//= require cropperjs/dist/cropper.js
|
//= require cropperjs/dist/cropper.js
|
||||||
//= require pica
|
//= require pica
|
||||||
//= require protocol-handler
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
|
||||||
|
|
||||||
function registerDiasporaLinksProtocol() {
|
|
||||||
var protocol = location.protocol;
|
|
||||||
var slashes = protocol.concat("//");
|
|
||||||
var host = slashes.concat(window.location.hostname);
|
|
||||||
|
|
||||||
if (location.port) {
|
|
||||||
host = host.concat(":" + location.port);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof (window.navigator.registerProtocolHandler) === "function") {
|
|
||||||
registerDiasporaLinksProtocol();
|
|
||||||
}
|
|
||||||
|
|
@ -180,6 +180,16 @@
|
||||||
.clearfix= f.submit t(".change"), class: "btn btn-primary pull-right", id: "change_email_preferences"
|
.clearfix= f.submit t(".change"), class: "btn btn-primary pull-right", id: "change_email_preferences"
|
||||||
%hr
|
%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
|
.row
|
||||||
.col-md-6.account-data
|
.col-md-6.account-data
|
||||||
%h3= t(".export_data")
|
%h3= t(".export_data")
|
||||||
|
|
|
||||||
|
|
@ -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."
|
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."
|
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:
|
privacy_settings:
|
||||||
title: "Privacy settings"
|
title: "Privacy settings"
|
||||||
strip_exif: "Strip metadata such as location, author, and camera model from uploaded images (recommended)"
|
strip_exif: "Strip metadata such as location, author, and camera model from uploaded images (recommended)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue