mirror of https://github.com/xwiki-labs/cryptpad
replace 'pricing' link text with 'features' when subscriptions are disabled
addresses #683
This commit is contained in:
parent
755300d742
commit
7ce2b67fd6
|
@ -43,6 +43,17 @@ define([
|
|||
return Pages.externalLink(el, Pages.localizeDocsLink(href));
|
||||
};
|
||||
|
||||
var accounts = Pages.accounts = {
|
||||
donateURL: AppConfig.donateURL || "https://opencollective.com/cryptpad/",
|
||||
upgradeURL: AppConfig.upgradeURL
|
||||
};
|
||||
|
||||
Pages.areSubscriptionsAllowed = function () {
|
||||
try {
|
||||
return ApiConfig.allowSubscriptions && accounts.upgradeURL && !ApiConfig.restrictRegistration;
|
||||
} catch (err) { return void console.error(err); }
|
||||
};
|
||||
|
||||
var languageSelector = function () {
|
||||
var options = [];
|
||||
var languages = Msg._languages;
|
||||
|
@ -133,7 +144,7 @@ define([
|
|||
footerCol('footer_product', [
|
||||
footLink('/what-is-cryptpad.html', 'topbar_whatIsCryptpad'),
|
||||
Pages.docsLink,
|
||||
footLink('/features.html', 'pricing'),
|
||||
footLink('/features.html', Pages.areSubscriptionsAllowed()? 'pricing': 'features'), // Messages.pricing, Messages.features
|
||||
Pages.githubLink,
|
||||
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate'),
|
||||
]),
|
||||
|
|
|
@ -8,10 +8,7 @@ define([
|
|||
'/api/config',
|
||||
'/common/common-ui-elements.js',
|
||||
], function ($, h, Msg, AppConfig, LocalStore, Pages, Config, UIElements) {
|
||||
var accounts = {
|
||||
donateURL: AppConfig.donateURL || "https://opencollective.com/cryptpad/",
|
||||
upgradeURL: AppConfig.upgradeURL
|
||||
};
|
||||
var accounts = Pages.accounts;
|
||||
|
||||
return function () {
|
||||
Msg.features_f_apps_note = AppConfig.availablePadTypes.map(function (app) {
|
||||
|
@ -145,10 +142,11 @@ define([
|
|||
]),
|
||||
]),
|
||||
]);
|
||||
var availableFeatures =
|
||||
(Config.allowSubscriptions && accounts.upgradeURL && !Config.restrictRegistration) ?
|
||||
[anonymousFeatures, registeredFeatures, premiumFeatures] :
|
||||
[anonymousFeatures, registeredFeatures];
|
||||
var availableFeatures = [
|
||||
anonymousFeatures,
|
||||
registeredFeatures,
|
||||
Pages.areSubscriptionsAllowed() ? premiumFeatures: undefined,
|
||||
];
|
||||
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
|
|
Loading…
Reference in New Issue