From b82b0427370bf8942b3573895a1ae785c2f8aa66 Mon Sep 17 00:00:00 2001 From: emeric Date: Sun, 13 Feb 2022 14:01:49 +0100 Subject: [PATCH 01/66] Switch to vanilla v5, broken --- src/lms/ui/LmsTheme.cpp | 15 +++++++-------- src/lms/ui/LmsTheme.hpp | 8 ++++---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lms/ui/LmsTheme.cpp b/src/lms/ui/LmsTheme.cpp index e5d9f3cc..4df381ff 100644 --- a/src/lms/ui/LmsTheme.cpp +++ b/src/lms/ui/LmsTheme.cpp @@ -27,14 +27,12 @@ namespace UserInterface { LmsTheme::LmsTheme(Database::UITheme theme) : _theme {theme} { - setVersion(Wt::BootstrapVersion::v3); - setResponsive(true); // Should be not necessary since applied via head-matter } void -LmsTheme::setTheme(Database::UITheme theme) +LmsTheme::setTheme(Database::UITheme ) { - if (theme == _theme) +/* if (theme == _theme) return; // Hack, use the application interface directly since changing theme is not allowed @@ -45,12 +43,13 @@ LmsTheme::setTheme(Database::UITheme theme) _theme = theme; for (const auto& styleSheet : getStyleSheets(theme)) LmsApp->useStyleSheet(styleSheet); + */ } - +/* std::vector LmsTheme::styleSheets() const { - const std::vector styleSheets {getStyleSheets(_theme)}; +/ const std::vector styleSheets {getStyleSheets(_theme)}; std::vector res; res.reserve(styleSheets.size()); @@ -59,7 +58,7 @@ LmsTheme::styleSheets() const } std::vector -LmsTheme::getStyleSheets(Database::UITheme theme) +LmsTheme::getStyleSheets(Database::UITheme ) { switch (theme) { @@ -85,5 +84,5 @@ LmsTheme::getStyleSheets(Database::UITheme theme) } return {}; } - +*/ } diff --git a/src/lms/ui/LmsTheme.hpp b/src/lms/ui/LmsTheme.hpp index 912137a6..952ef4c2 100644 --- a/src/lms/ui/LmsTheme.hpp +++ b/src/lms/ui/LmsTheme.hpp @@ -21,14 +21,14 @@ #include -#include +#include #include #include "services/database/Types.hpp" namespace UserInterface { - class LmsTheme : public Wt::WBootstrapTheme + class LmsTheme : public Wt::WBootstrap5Theme { public: LmsTheme(Database::UITheme theme); @@ -36,8 +36,8 @@ namespace UserInterface void setTheme(Database::UITheme theme); private: - std::vector styleSheets() const override; - static std::vector getStyleSheets(Database::UITheme theme); +// std::vector styleSheets() const override; +// static std::vector getStyleSheets(Database::UITheme theme); Database::UITheme _theme; }; From f3b0a9748e4ba698d96cfb87d2bf44997765bccb Mon Sep 17 00:00:00 2001 From: emeric Date: Sun, 13 Feb 2022 14:02:08 +0100 Subject: [PATCH 02/66] Restored nav bar --- approot/templates.xml | 82 ++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/approot/templates.xml b/approot/templates.xml index f2aa8a7b..a046161d 100644 --- a/approot/templates.xml +++ b/approot/templates.xml @@ -2,51 +2,59 @@ -