From 86e50e04775aad51c89a92440426233c82b909fd Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 19 Mar 2021 17:05:28 +0100 Subject: [PATCH] Add a configuration key to disable driveless mode --- www/common/application_config_internal.js | 8 ++++++++ www/common/sframe-common-outer.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index f91c73f56..e119b3e5e 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -190,5 +190,13 @@ define(function() { // but this number depends on the network and CPU performances of each user's device. config.degradedLimit = 8; + // In "legacy" mode, one-time users were always creating an "anonymous" drive when visiting CryptPad + // in which they could store their pads. The new "driveless" mode allow users to open an existing + // pad without creating a drive in the background. The drive will only be created if they visit + // a different page (Drive, Settings, etc.) or try to create a new pad themselves. You can disable + // the driveless mode by changing the following value to "false" + config.allowDrivelessMode = true; + config.allowDrivelessMode = true; + return config; }); diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index df49ee6a3..77aa9ba43 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -222,7 +222,7 @@ define([ } catch (e) { console.error(e); } Cryptpad.ready(waitFor(), { - noDrive: cfg.noDrive, + noDrive: cfg.noDrive && AppConfig.allowDrivelessMode, driveEvents: cfg.driveEvents, cache: Boolean(cfg.cache), currentPad: currentPad