Add early access message on pad creation screen

pull/1/head
yflory 3 years ago
parent 117eda8a04
commit 2bc0131904

@ -115,6 +115,9 @@
} }
} }
} }
.cp-creation-early {
max-width: 80%;
}
.cp-creation-create { .cp-creation-create {
justify-content: center; justify-content: center;

@ -2302,6 +2302,10 @@ define([
//$creation.append(h('h2.cp-creation-title', Messages.newButtonTitle)); //$creation.append(h('h2.cp-creation-title', Messages.newButtonTitle));
var newPadH3Title = Messages._getKey('creation_new',[Messages.type[type]]); var newPadH3Title = Messages._getKey('creation_new',[Messages.type[type]]);
var early = common.checkRestrictedApp(type);
var domain = Config.httpUnsafeOrigin || 'CryptPad';
if (/^http/.test(domain)) { domain = domain.replace(/^https?\:\/\//, ''); }
var title = h('div.cp-creation-title', [ var title = h('div.cp-creation-title', [
UI.getFileIcon({type: type})[0], UI.getFileIcon({type: type})[0],
h('div.cp-creation-title-text', [ h('div.cp-creation-title-text', [
@ -2310,6 +2314,12 @@ define([
]) ])
]); ]);
$creation.append(title); $creation.append(title);
if (early === 1) {
$creation.append(h('div.cp-creation-early.alert.alert-warning', Messages._getKey('premiumAccess', [
domain
])));
}
//var colorClass = 'cp-icon-color-'+type; //var colorClass = 'cp-icon-color-'+type;
//$creation.append(h('h2.cp-creation-title.'+colorClass, Messages.newButtonTitle)); //$creation.append(h('h2.cp-creation-title.'+colorClass, Messages.newButtonTitle));

Loading…
Cancel
Save