mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-30 21:09:19 +01:00
Added the new user web page classes to the build. They still need binds, so they won't do anything at the moment.
This commit is contained in:
parent
3028c08e9e
commit
16fda02f48
@ -18,6 +18,14 @@ sources = [
|
||||
|
||||
if env['module_web_enabled']:
|
||||
sources.append("web/middleware/user_session_setup_web_server_middleware.cpp")
|
||||
sources.append("web/web_nodes/user_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_delete_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_login_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_logout_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_password_reset_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_register_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_settings_web_page.cpp")
|
||||
sources.append("web/web_nodes/user_stats_web_page.cpp")
|
||||
|
||||
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
||||
# Shared lib compilation
|
||||
|
@ -17,6 +17,15 @@ def get_doc_classes():
|
||||
"UserDB",
|
||||
|
||||
"UserSessionSetupWebServerMiddleware",
|
||||
|
||||
"UserWebPage",
|
||||
"UserDeleteWebPage",
|
||||
"UserLoginWebPage",
|
||||
"UserLogoutWebPage",
|
||||
"UserPasswordResetWebPage",
|
||||
"UserRegisterWebPage",
|
||||
"UserSettingsWebPage",
|
||||
"UserStatsWebPage",
|
||||
]
|
||||
|
||||
|
||||
|
@ -36,6 +36,15 @@ SOFTWARE.
|
||||
|
||||
#ifdef MODULE_WEB_ENABLED
|
||||
#include "web/middleware/user_session_setup_web_server_middleware.h"
|
||||
|
||||
#include "web/web_nodes/user_delete_web_page.cpp"
|
||||
#include "web/web_nodes/user_login_web_page.cpp"
|
||||
#include "web/web_nodes/user_logout_web_page.cpp"
|
||||
#include "web/web_nodes/user_password_reset_web_page.cpp"
|
||||
#include "web/web_nodes/user_register_web_page.cpp"
|
||||
#include "web/web_nodes/user_settings_web_page.cpp"
|
||||
#include "web/web_nodes/user_stats_web_page.cpp"
|
||||
#include "web/web_nodes/user_web_page.cpp"
|
||||
#endif
|
||||
|
||||
UserDB *_user_db = nullptr;
|
||||
@ -54,6 +63,15 @@ void register_users_types() {
|
||||
|
||||
#ifdef MODULE_WEB_ENABLED
|
||||
ClassDB::register_class<UserSessionSetupWebServerMiddleware>();
|
||||
|
||||
ClassDB::register_class<UserWebPage>();
|
||||
ClassDB::register_class<UserDeleteWebPage>();
|
||||
ClassDB::register_class<UserLoginWebPage>();
|
||||
ClassDB::register_class<UserLogoutWebPage>();
|
||||
ClassDB::register_class<UserPasswordResetWebPage>();
|
||||
ClassDB::register_class<UserRegisterWebPage>();
|
||||
ClassDB::register_class<UserSettingsWebPage>();
|
||||
ClassDB::register_class<UserStatsWebPage>();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ void UserSettingsWebPage::_handle_request_main(Ref<WebServerRequest> request) {
|
||||
Ref<User> u = request->get_meta("user");
|
||||
|
||||
if (u.is_valid()) {
|
||||
handle_request(u, request);
|
||||
//handle_request(u, request);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -17,9 +17,6 @@ class UserSettingsWebPage : public UserWebPage {
|
||||
public:
|
||||
void _handle_request_main(Ref<WebServerRequest> request);
|
||||
|
||||
virtual void handle_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
virtual void handle_main_page_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
|
||||
struct SettingsRequestData {
|
||||
String error_str;
|
||||
|
||||
|
@ -16,16 +16,10 @@ class UserStatsWebPage : public UserWebPage {
|
||||
GDCLASS(UserStatsWebPage, UserWebPage);
|
||||
|
||||
public:
|
||||
virtual void handle_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
virtual void handle_main_page_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
|
||||
UserStatsWebPage();
|
||||
~UserStatsWebPage();
|
||||
|
||||
protected:
|
||||
Ref<FormValidator> _login_validator;
|
||||
Ref<FormValidator> _registration_validator;
|
||||
Ref<FormValidator> _profile_validator;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user