New error messages for early access apps

This commit is contained in:
yflory 2021-10-12 16:59:41 +02:00
parent 0d12f1d75e
commit f432852a86
2 changed files with 10 additions and 3 deletions

View file

@ -55,7 +55,12 @@
color: @cp_context-fg;
}
.fa, .cptools {
margin-right: 10px;
&:first-child {
margin-right: 10px;
}
&.cptools:not(:first-child) {
vertical-align: middle;
}
color: @cp_context-icon;
width: 16px;
}

View file

@ -908,10 +908,12 @@ define([
return;
}
// XXX PREMIUM
Messages.premiumOnly = "Premium only for now..."; // XXX
Messages.premiumOnly = "Creating new documents in this application is currently limited to subscribers on {0}. This is an early-access experimental application for testing purposes, and should not yet be trusted with important data. It will soon become available to everyone on {0}."; // XXX
var blocked = privateData.premiumOnly && privateData.isNewFile;
if (blocked) {
UI.alert(Messages.premiumOnly, function () {
var domain = ApiConfig.httpUnsafeOrigin || 'CryptPad';
if (/^http/.test(domain)) { domain = domain.replace(/^https?\:\/\//, ''); }
UI.errorLoadingScreen(Messages._getKey('premiumOnly', [domain]), null, function () {
funcs.gotoURL('/drive/');
}, {forefront: true});
return;