Browse Source

Fix Alternative Web UI to be available

adaptive-webui-19844
Vladimir Golovnev (Glassez) 6 years ago
parent
commit
f309a5279e
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 14
      src/webui/webapplication.cpp

14
src/webui/webapplication.cpp

@ -414,13 +414,19 @@ void WebApplication::doProcessRequest()
void WebApplication::configure() void WebApplication::configure()
{ {
const auto pref = Preferences::instance(); const auto *pref = Preferences::instance();
const bool isAltUIUsed = pref->isAltWebUiEnabled();
const QString rootFolder = Utils::Fs::expandPathAbs( const QString rootFolder = Utils::Fs::expandPathAbs(
!pref->isAltWebUiEnabled() ? WWW_FOLDER : pref->getWebUiRootFolder()); !isAltUIUsed ? WWW_FOLDER : pref->getWebUiRootFolder());
if (rootFolder != m_rootFolder) { if ((isAltUIUsed != m_isAltUIUsed) || (rootFolder != m_rootFolder)) {
m_translatedFiles.clear(); m_isAltUIUsed = isAltUIUsed;
m_rootFolder = rootFolder; m_rootFolder = rootFolder;
m_translatedFiles.clear();
if (!m_isAltUIUsed)
LogMsg(tr("Using built-in Web UI."));
else
LogMsg(tr("Using custom Web UI. Location: \"%1\".").arg(m_rootFolder));
} }
const QString newLocale = pref->getLocale(); const QString newLocale = pref->getLocale();

Loading…
Cancel
Save