Display subscribe and donate buttons if instance accepts subscriptions

master
David Benqué 3 years ago
parent 6a708a7df0
commit 7baf0250ac

@ -191,6 +191,23 @@ define([
locationBlock = h('div', h('br')); // XXX locationBlock = h('div', h('br')); // XXX
} }
Msg.home_morestorage = 'For more storage space, and to support the project:'; // XXX
var subButton = function () {
if (Pages.areSubscriptionsAllowed()) {
sub = h('div.cp-sub-prompt', [
h('span', Msg.home_morestorage),
h('br'),
h('button', Msg.features_f_subscribe),
h('button', Msg.footer_donate)
]);
return sub;
} else {
return h('div');
}
};
return [ return [
h('div#cp-main', [ h('div#cp-main', [
Pages.infopageTopbar(), Pages.infopageTopbar(),
@ -202,7 +219,7 @@ define([
'aria-hidden': 'true', 'aria-hidden': 'true',
alt: '' alt: ''
}), }),
h('h1', Pages.Instance.name), h('h1.cp-instance-title', Pages.Instance.name),
UI.setHTML(h('span.tag-line'), Pages.Instance.description), UI.setHTML(h('span.tag-line'), Pages.Instance.description),
locationBlock, locationBlock,
termsLink, termsLink,
@ -219,9 +236,12 @@ define([
icons, icons,
]) ])
]), ]),
h('a.cp-app-drive', {'href': '/drive/'}, [ // XXX check this is correct h('div.cp-app-drive', [
h('a.cp-drive-btn', {'href': '/drive/'}, [
h('i.fa.fa-hdd-o', {'aria-hidden': 'true'}), h('i.fa.fa-hdd-o', {'aria-hidden': 'true'}),
'Drive: 1GB' // XXX DB TODO: Use instance default storage Msg.team_cat_drive
]),
subButton
]) ])
]) ])
]), ]),

@ -175,13 +175,20 @@
} }
} }
}); });
a.cp-app-drive { .cp-app-drive {
color: @cryptpad_text_col; display: flex;
font-size: 1.5em; flex-direction: row;
display: inline-block;
margin: 20px 0px; margin: 20px 0px;
// font-size: 1.4rem;
a.cp-drive-btn {
color: @cryptpad_text_col;
font-size: 1.5rem;
display: block;
height: min-content;
width: fit-content;
padding: 10px; padding: 10px;
border-radius: @infopages-radius-L; border-radius: @infopages-radius-L;
margin-right: 15px;
&:visited { &:visited {
color: @cryptpad_text_col; color: @cryptpad_text_col;
} }
@ -194,6 +201,13 @@
font-size: 1.3em; font-size: 1.3em;
} }
} }
.cp-sub-prompt {
button {
font-size: 1.4rem;
margin-top: 10px;
}
}
}
.cp-hidden { display: none !important; } .cp-hidden { display: none !important; }
.cp-callout-more { .cp-callout-more {

Loading…
Cancel
Save