From f432852a86d74d09a6b8536e4ec10f05e93593db Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Oct 2021 16:59:41 +0200 Subject: [PATCH] New error messages for early access apps --- customize.dist/src/less2/include/contextmenu.less | 7 ++++++- www/common/sframe-common.js | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index 1c6912f6e..2bd587e9e 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -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; } diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index ecd4f094e..eb979d721 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -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;