versionbar: add option to hide popup
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I5b6b0695789048a208db970f45e42e0f59d855de
This commit is contained in:
parent
b1c6ff5c9c
commit
ba82b1c4fb
6 changed files with 21 additions and 7 deletions
|
@ -319,7 +319,8 @@ m4_ifelse(MOBILEAPP,[true],
|
|||
window.coolLogging = 'true';
|
||||
window.enableWelcomeMessage = false;
|
||||
window.autoShowWelcome = false;
|
||||
window.autoShowFeedback = true;
|
||||
window.autoShowFeedback = true;
|
||||
window.allowUpdateNotification = false;
|
||||
window.outOfFocusTimeoutSecs = 1000000;
|
||||
window.idleTimeoutSecs = 1000000;
|
||||
window.protocolDebug = false;
|
||||
|
@ -347,6 +348,7 @@ m4_ifelse(MOBILEAPP,[true],
|
|||
window.enableWelcomeMessage = %ENABLE_WELCOME_MSG%;
|
||||
window.autoShowWelcome = %AUTO_SHOW_WELCOME%;
|
||||
window.autoShowFeedback = %AUTO_SHOW_FEEDBACK%;
|
||||
window.allowUpdateNotification = %ENABLE_UPDATE_NOTIFICATION%;
|
||||
window.userInterfaceMode = '%USER_INTERFACE_MODE%';
|
||||
window.useIntegrationTheme = '%USE_INTEGRATION_THEME%';
|
||||
window.enableMacrosExecution = '%ENABLE_MACROS_EXECUTION%';
|
||||
|
|
|
@ -234,6 +234,9 @@ L.Control.UIManager = L.Control.extend({
|
|||
this.map.addControl(this.map.userList);
|
||||
this.map.aboutDialog = JSDialog.aboutDialog(this.map);
|
||||
|
||||
if (L.Map.versionBar && window.allowUpdateNotification)
|
||||
this.map.addControl(L.Map.versionBar);
|
||||
|
||||
var openBusyPopup = function(label) {
|
||||
this.busyPopupTimer = setTimeout(function() {
|
||||
var json = {
|
||||
|
|
|
@ -82,9 +82,6 @@ if (host === '' && !window.ThisIsAMobileApp) {
|
|||
map.uiManager.showInfoModal('empty-host-url-modal', '', errorMessages.emptyhosturl, '', _('OK'), null, false);
|
||||
}
|
||||
|
||||
if (L.Map.versionBar)
|
||||
map.addControl(L.Map.versionBar);
|
||||
|
||||
L.Map.THIS = map;
|
||||
app.map = map;
|
||||
app.idleHandler.map = map;
|
||||
|
|
|
@ -84,6 +84,7 @@ data = data.replace(/%COOLWSD_VERSION%/g, 'loadjs');
|
|||
data = data.replace(/%ENABLE_WELCOME_MSG%/g, 'false');
|
||||
data = data.replace(/%AUTO_SHOW_WELCOME%/g, 'false');
|
||||
data = data.replace(/%AUTO_SHOW_FEEDBACK%/g, 'false');
|
||||
data = data.replace(/%ENABLE_UPDATE_NOTIFICATION%/g, 'false');
|
||||
data = data.replace(/%USER_INTERFACE_MODE%/g, '');
|
||||
data = data.replace(/%USE_INTEGRATION_THEME%/g, 'true');
|
||||
data = data.replace(/%ENABLE_MACROS_EXECUTION%/g, '');
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<memproportion desc="The maximum percentage of available memory consumed by all of the @APP_NAME@ processes, after which we start cleaning up idle documents. If cgroup memory limits are set, this is the maximum percentage of that limit to consume." type="double" default="80.0"></memproportion>
|
||||
<num_prespawn_children desc="Number of child processes to keep started in advance and waiting for new clients." type="uint" default="4">@NUM_PRESPAWN_CHILDREN@</num_prespawn_children>
|
||||
<!-- <fetch_update_check desc="Every number of hours will fetch latest version data. Defaults to 10 hours." type="uint" default="10">10</fetch_update_check> -->
|
||||
<!-- <allow_update_popup desc="Allows notification about an update in the editor" type="bool" default="true">true</allow_update_popup> -->
|
||||
<per_document desc="Document-specific settings, including LO Core settings.">
|
||||
<max_concurrency desc="The maximum number of threads to use while processing a document." type="uint" default="4">4</max_concurrency>
|
||||
<batch_priority desc="A (lower) priority for use by batch eg. convert-to processes to avoid starving interactive ones" type="uint" default="5">5</batch_priority>
|
||||
|
|
|
@ -1169,6 +1169,14 @@ private:
|
|||
const std::string _blank;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
std::string boolToString(const bool value)
|
||||
{
|
||||
return value ? std::string("true"): std::string("false");
|
||||
}
|
||||
}
|
||||
|
||||
FileServerRequestHandler::ResourceAccessDetails FileServerRequestHandler::preprocessFile(
|
||||
const HTTPRequest& request, http::Response& httpResponse, const RequestDetails& requestDetails,
|
||||
Poco::MemoryInputStream& message, const std::shared_ptr<StreamSocket>& socket)
|
||||
|
@ -1337,15 +1345,17 @@ FileServerRequestHandler::ResourceAccessDetails FileServerRequestHandler::prepro
|
|||
Poco::replaceInPlace(preprocess, std::string("%AUTO_SHOW_FEEDBACK%"), (std::string)"true");
|
||||
}
|
||||
|
||||
bool allowUpdateNotification = config.getBool("allow_update_popup", true);
|
||||
Poco::replaceInPlace(preprocess, std::string("%ENABLE_UPDATE_NOTIFICATION%"), boolToString(allowUpdateNotification));
|
||||
|
||||
Poco::replaceInPlace(preprocess, std::string("%FEEDBACK_URL%"), std::string(FEEDBACK_URL));
|
||||
Poco::replaceInPlace(preprocess, std::string("%WELCOME_URL%"), std::string(WELCOME_URL));
|
||||
|
||||
Poco::replaceInPlace(preprocess, BUYPRODUCT_URL, urv[BUYPRODUCT_URL]);
|
||||
|
||||
Poco::replaceInPlace(preprocess, std::string("%DEEPL_ENABLED%"), (config.getBool("deepl.enabled", false) ? std::string("true"): std::string("false")));
|
||||
Poco::replaceInPlace(preprocess, std::string("%ZOTERO_ENABLED%"), (config.getBool("zotero.enable", true) ? std::string("true"): std::string("false")));
|
||||
Poco::replaceInPlace(preprocess, std::string("%WASM_ENABLED%"), (COOLWSD::getConfigValue<bool>("wasm.enable", false) ? std::string("true"): std::string("false")));
|
||||
Poco::replaceInPlace(preprocess, std::string("%DEEPL_ENABLED%"), boolToString(config.getBool("deepl.enabled", false)));
|
||||
Poco::replaceInPlace(preprocess, std::string("%ZOTERO_ENABLED%"), boolToString(config.getBool("zotero.enable", true)));
|
||||
Poco::replaceInPlace(preprocess, std::string("%WASM_ENABLED%"), boolToString(COOLWSD::getConfigValue<bool>("wasm.enable", false)));
|
||||
Poco::URI indirectionURI(config.getString("indirection_endpoint.url", ""));
|
||||
Poco::replaceInPlace(preprocess, std::string("%INDIRECTION_URL%"), indirectionURI.toString());
|
||||
|
||||
|
|
Loading…
Reference in a new issue