cleanup + изменение цветов темы
This commit is contained in:
@@ -109,13 +109,11 @@ public:
|
||||
|
||||
// картинки, их даже можно кешировать
|
||||
static constexpr const char* FAVICON_ICO = "static/favicon.png";
|
||||
static constexpr const char* KROKODIL_GIF = "static/krokodil.gif";
|
||||
static constexpr const char* VUE_JS = "static/js/vue.js"; // это тоже можно кешировать
|
||||
|
||||
// а эти стили нельзя кешировать в отладочной версии
|
||||
static constexpr const char* STYLE_CSS = "static/style.css";
|
||||
static constexpr const char* FIELDS_CSS = "static/fields.css";
|
||||
static constexpr const char* KB_MP4 = "static/video_2024-11-06_15-49-35.mp4";
|
||||
|
||||
ServerResources(const ServerResources&) = delete;
|
||||
|
||||
@@ -124,9 +122,7 @@ public:
|
||||
auth.users.emplace_back(std::make_shared<http::auth::User>("admin", "", http::auth::User::SUPERUSER));
|
||||
|
||||
sf->registerFile(FAVICON_ICO, mime_types::image_png, true);
|
||||
sf->registerFile(KROKODIL_GIF, mime_types::image_gif, true);
|
||||
sf->registerFile(VUE_JS, mime_types::javascript, true);
|
||||
sf->registerFile(KB_MP4, mime_types::video_mp4, true);
|
||||
|
||||
sf->registerFile(STYLE_CSS, mime_types::text_css, true);
|
||||
sf->registerFile(FIELDS_CSS, mime_types::text_css, true);
|
||||
@@ -187,11 +183,9 @@ public:
|
||||
}));
|
||||
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/favicon.ico", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(FAVICON_ICO, rep); }));
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/images/krokodil_vzryvaetsya_hd.gif", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(KROKODIL_GIF, rep); }));
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/style.css", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(STYLE_CSS, rep); }));
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/fields.css", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(FIELDS_CSS, rep); }));
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/js/vue.js", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(VUE_JS, rep); }));
|
||||
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/vid/video_2024-11-06_15-49-35.mp4", [this](const auto& req, auto& rep) { boost::ignore_unused(req); sf->serve(KB_MP4, rep); }));
|
||||
|
||||
s.resources.emplace_back(std::make_unique<http::auth::AuthRequiredResource>("/api/get/statistics", this->auth, http::auth::User::WATCH_STATISTICS, [this](const auto& req, auto& rep) {
|
||||
if (req.method != "GET") {
|
||||
|
Reference in New Issue
Block a user