Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>feature/proxyhack
parent
55a985dc73
commit
f507302993
|
@ -601,9 +601,15 @@ AC_SUBST(MAX_DOCUMENTS)
|
|||
ENABLE_WELCOME_MESSAGE=false
|
||||
AS_IF([test "$enable_welcome_message" = "yes"],
|
||||
[ENABLE_WELCOME_MESSAGE="true"])
|
||||
AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE],["$ENABLE_WELCOME_MESSAGE"],[Should the Release notes message on startup should be enabled be default?])
|
||||
AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE],["$ENABLE_WELCOME_MESSAGE"],[Should the Release notes message on startup be enabled by default?])
|
||||
AC_SUBST(ENABLE_WELCOME_MESSAGE)
|
||||
|
||||
ENABLE_WELCOME_MESSAGE_BUTTON=false
|
||||
AS_IF([test "$enable_welcome_message_button" = "yes"],
|
||||
[ENABLE_WELCOME_MESSAGE_BUTTON="true"])
|
||||
AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE_BUTTON],["$ENABLE_WELCOME_MESSAGE_BUTTON"],[Should the Release notes message on startup should have a dismiss button instead of an x button to close by default?])
|
||||
AC_SUBST(ENABLE_WELCOME_MESSAGE_BUTTON)
|
||||
|
||||
VEREIGN_URL=
|
||||
if test "$enable_vereign" = "yes"; then
|
||||
VEREIGN_URL="https://app.vereign.com"
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
*/
|
||||
#define ENABLE_WELCOME_MESSAGE "false"
|
||||
|
||||
/* Should the Release notes message on startup have a dismiss button instead of an x button to close by default?
|
||||
*/
|
||||
#define ENABLE_WELCOME_MESSAGE_BUTTON "false"
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 0
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@ m4_ifelse(MOBILEAPP,[true],
|
|||
window.accessHeader = '';
|
||||
window.loleafletLogging = 'true';
|
||||
window.enableWelcomeMessage = false;
|
||||
window.enableWelcomeMessageButton = false;
|
||||
window.outOfFocusTimeoutSecs = 1000000;
|
||||
window.idleTimeoutSecs = 1000000;
|
||||
window.reuseCookies = '';
|
||||
|
@ -248,6 +249,7 @@ m4_ifelse(MOBILEAPP,[true],
|
|||
window.accessHeader = '%ACCESS_HEADER%';
|
||||
window.loleafletLogging = '%LOLEAFLET_LOGGING%';
|
||||
window.enableWelcomeMessage = %ENABLE_WELCOME_MSG%;
|
||||
window.enableWelcomeMessageButton = %ENABLE_WELCOME_MSG_BTN%;
|
||||
window.outOfFocusTimeoutSecs = %OUT_OF_FOCUS_TIMEOUT_SECS%;
|
||||
window.idleTimeoutSecs = %IDLE_TIMEOUT_SECS%;
|
||||
window.reuseCookies = '%REUSE_COOKIES%';
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
|
||||
<welcome>
|
||||
<enable type="bool" desc="Controls whether the welcome screen should be shown to the users on new install and updates." default="@ENABLE_WELCOME_MESSAGE@">@ENABLE_WELCOME_MESSAGE@</enable>
|
||||
<enable_button type="bool" desc="Controls whether the welcome screen should have an explanatory button instead of an X button to close the dialog." default="@ENABLE_WELCOME_MESSAGE_BUTTON@">@ENABLE_WELCOME_MESSAGE_BUTTON@</enable_button>
|
||||
<path desc="Path to 'welcome-$lang.html' files served on first start or when the version changes. When empty, defaults to the Release notes." type="path" relative="true" default="loleaflet/welcome"></path>
|
||||
</welcome>
|
||||
|
||||
|
|
|
@ -741,6 +741,11 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::
|
|||
enableWelcomeMessage = "true";
|
||||
Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG%"), enableWelcomeMessage);
|
||||
|
||||
std::string enableWelcomeMessageButton = "false";
|
||||
if (config.getBool("welcome.enable_button", false))
|
||||
enableWelcomeMessageButton = "true";
|
||||
Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG_BTN%"), enableWelcomeMessageButton);
|
||||
|
||||
// Capture cookies so we can optionally reuse them for the storage requests.
|
||||
{
|
||||
NameValueCollection cookies;
|
||||
|
|
|
@ -942,6 +942,7 @@ void LOOLWSD::initialize(Application& self)
|
|||
{ "trace.path[@snapshot]", "false" },
|
||||
{ "trace[@enable]", "false" },
|
||||
{ "welcome.enable", ENABLE_WELCOME_MESSAGE },
|
||||
{ "welcome.enable_button", ENABLE_WELCOME_MESSAGE_BUTTON },
|
||||
{ "welcome.path", "loleaflet/welcome" }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue