Consistency with cryptpad.fr customize

pull/1/head
yflory 4 years ago
parent daace8f12c
commit 1b638d16db

@ -179,5 +179,22 @@ define([
return crowdFunding; return crowdFunding;
}; };
Pages.subscribeButton = function (onClick) {
var _link = h('a', {
href: "/accounts/",
});
var subscribe = h('button', [
Msg.subscribe_button
]);
$(subscribe).click(function () {
_link.click();
if (typeof(onClick) === 'function') { onClick(); }
});
return subscribe;
};
return Pages; return Pages;
}); });

@ -72,10 +72,6 @@ define([
}); });
UI.addTooltips(); UI.addTooltips();
var crowdFunding = Pages.crowdfundingButton(function () {
Feedback.send('HOME_SUPPORT_CRYPTPAD');
});
var blocks = [ var blocks = [
h('div.row.cp-index-section', [ h('div.row.cp-index-section', [
h('div.col-sm-6', h('div.col-sm-6',
@ -108,7 +104,9 @@ define([
h('div.col-sm-6', [ h('div.col-sm-6', [
h('h2', Msg.home_support_title), h('h2', Msg.home_support_title),
Pages.setHTML(h('span'), Msg.home_support), Pages.setHTML(h('span'), Msg.home_support),
crowdFunding Pages.crowdfundingButton(function () {
Feedback.send('HOME_SUPPORT_CRYPTPAD');
}),
]) ])
]) ])
]; ];

@ -57,6 +57,10 @@ define([
h('div.col-md-6.order-md-2', [ h('div.col-md-6.order-md-2', [
Pages.setHTML(h('h2'), Msg.whatis_model), Pages.setHTML(h('h2'), Msg.whatis_model),
Pages.setHTML(h('span'), Msg.whatis_model_info), Pages.setHTML(h('span'), Msg.whatis_model_info),
Config.allowSubscriptions ?
Pages.subscribeButton(function () {
Feedback.send('WHATIS_SUBSCRIBE_CRYPTPAD');
}) : undefined,
Pages.crowdfundingButton(function () { Pages.crowdfundingButton(function () {
Feedback.send('WHATIS_SUPPORT_CRYPTPAD'); Feedback.send('WHATIS_SUPPORT_CRYPTPAD');
}), }),

Loading…
Cancel
Save