Fix the upgrade button in the drive

pull/1/head
yflory 7 years ago
parent cc6b2192e4
commit c25be21138

@ -382,10 +382,11 @@ define([
var quota = usage/limit; var quota = usage/limit;
var $usage = $('<span>', {'class': 'cp-limit-usage'}).css('width', quota*100+'%'); var $usage = $('<span>', {'class': 'cp-limit-usage'}).css('width', quota*100+'%');
var urls = common.getMetadataMgr().getPrivateData().accounts;
var makeDonateButton = function () { var makeDonateButton = function () {
$('<a>', { $('<a>', {
'class': 'cp-limit-upgrade btn btn-success', 'class': 'cp-limit-upgrade btn btn-success',
href: Cryptpad.donateURL, href: urls.donateURL,
rel: "noreferrer noopener", rel: "noreferrer noopener",
target: "_blank", target: "_blank",
}).text(Messages.supportCryptpad).appendTo($container); }).text(Messages.supportCryptpad).appendTo($container);
@ -394,7 +395,7 @@ define([
var makeUpgradeButton = function () { var makeUpgradeButton = function () {
$('<a>', { $('<a>', {
'class': 'cp-limit-upgrade btn btn-success', 'class': 'cp-limit-upgrade btn btn-success',
href: Cryptpad.upgradeURL, href: urls.upgradeURL,
rel: "noreferrer noopener", rel: "noreferrer noopener",
target: "_blank", target: "_blank",
}).text(Messages.upgradeAccount).appendTo($container); }).text(Messages.upgradeAccount).appendTo($container);

@ -130,6 +130,10 @@ define([
settings: proxy.settings || {}, settings: proxy.settings || {},
isPresent: parsed.hashData && parsed.hashData.present, isPresent: parsed.hashData && parsed.hashData.present,
isEmbed: parsed.hashData && parsed.hashData.embed, isEmbed: parsed.hashData && parsed.hashData.embed,
accounts: {
donateURL: Cryptpad.donateURL,
upgradeURL: Cryptpad.upgradeURL
}
} }
}; };
if (cfg.addData) { if (cfg.addData) {

Loading…
Cancel
Save