Added the rest of the nodes.

This commit is contained in:
Relintai 2022-02-18 00:14:29 +01:00
parent 2aeb1712b9
commit c1918e505b
9 changed files with 287 additions and 2 deletions

View File

@ -33,9 +33,14 @@ import traceback
folders = [ folders = [
'app', 'app',
'app/buildings', 'app/alliance',
'app/village',
'app/assignments', 'app/assignments',
'app/buildings',
'app/changelog',
'app/hero',
'app/mail',
'app/news',
'app/village',
'app/weather', 'app/weather',
] ]

View File

@ -0,0 +1,42 @@
#include "changelog_node.h"
#include "web/html/form_validator.h"
#include "web/html/html_builder.h"
#include "web/http/cookie.h"
#include "web/http/http_enums.h"
#include "web/http/http_session.h"
#include "web/http/request.h"
#include "web/http/session_manager.h"
#include "../html_macros.h"
#include "database/database.h"
#include "database/database_manager.h"
#include "database/query_builder.h"
#include "database/query_result.h"
#include "database/table_builder.h"
#include "crypto/hash/sha256.h"
void ChangelogNode::handle_request_default(Request *request) {
}
void ChangelogNode::admin_handle_request_main(Request *request) {
request->send_error(404);
}
String ChangelogNode::admin_get_section_name() {
return "Changelog";
}
void ChangelogNode::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
links->push_back(AdminSectionLinkInfo("- Changelog Editor", ""));
}
bool ChangelogNode::admin_full_render() {
return false;
}
ChangelogNode::ChangelogNode() :
AdminNode() {
}
ChangelogNode::~ChangelogNode() {
}

View File

@ -0,0 +1,28 @@
#ifndef CHANGELOG_NODE_H
#define CHANGELOG_NODE_H
#include "core/containers/vector.h"
#include "core/string.h"
#include "web_modules/admin_panel/admin_node.h"
class Request;
class FormValidator;
class QueryResult;
class ChangelogNode : public AdminNode {
RCPP_OBJECT(ChangelogNode, AdminNode);
public:
void handle_request_default(Request *request);
void admin_handle_request_main(Request *request);
String admin_get_section_name();
void admin_add_section_links(Vector<AdminSectionLinkInfo> *links);
bool admin_full_render();
ChangelogNode();
~ChangelogNode();
};
#endif

42
app/hero/hero_node.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "hero_node.h"
#include "web/html/form_validator.h"
#include "web/html/html_builder.h"
#include "web/http/cookie.h"
#include "web/http/http_enums.h"
#include "web/http/http_session.h"
#include "web/http/request.h"
#include "web/http/session_manager.h"
#include "../html_macros.h"
#include "database/database.h"
#include "database/database_manager.h"
#include "database/query_builder.h"
#include "database/query_result.h"
#include "database/table_builder.h"
#include "crypto/hash/sha256.h"
void HeroNode::handle_request_default(Request *request) {
}
void HeroNode::admin_handle_request_main(Request *request) {
request->send_error(404);
}
String HeroNode::admin_get_section_name() {
return "Hero";
}
void HeroNode::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
links->push_back(AdminSectionLinkInfo("- Hero Editor", ""));
}
bool HeroNode::admin_full_render() {
return false;
}
HeroNode::HeroNode() :
AdminNode() {
}
HeroNode::~HeroNode() {
}

28
app/hero/hero_node.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef HERO_NODE_H
#define HERO_NODE_H
#include "core/containers/vector.h"
#include "core/string.h"
#include "web_modules/admin_panel/admin_node.h"
class Request;
class FormValidator;
class QueryResult;
class HeroNode : public AdminNode {
RCPP_OBJECT(HeroNode, AdminNode);
public:
void handle_request_default(Request *request);
void admin_handle_request_main(Request *request);
String admin_get_section_name();
void admin_add_section_links(Vector<AdminSectionLinkInfo> *links);
bool admin_full_render();
HeroNode();
~HeroNode();
};
#endif

42
app/mail/mail_node.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "mail_node.h"
#include "web/html/form_validator.h"
#include "web/html/html_builder.h"
#include "web/http/cookie.h"
#include "web/http/http_enums.h"
#include "web/http/http_session.h"
#include "web/http/request.h"
#include "web/http/session_manager.h"
#include "../html_macros.h"
#include "database/database.h"
#include "database/database_manager.h"
#include "database/query_builder.h"
#include "database/query_result.h"
#include "database/table_builder.h"
#include "crypto/hash/sha256.h"
void MailNode::handle_request_default(Request *request) {
}
void MailNode::admin_handle_request_main(Request *request) {
request->send_error(404);
}
String MailNode::admin_get_section_name() {
return "Mail";
}
void MailNode::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
links->push_back(AdminSectionLinkInfo("- Mail Editor", ""));
}
bool MailNode::admin_full_render() {
return false;
}
MailNode::MailNode() :
AdminNode() {
}
MailNode::~MailNode() {
}

28
app/mail/mail_node.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef MAIL_NODE_H
#define MAIL_NODE_H
#include "core/containers/vector.h"
#include "core/string.h"
#include "web_modules/admin_panel/admin_node.h"
class Request;
class FormValidator;
class QueryResult;
class MailNode : public AdminNode {
RCPP_OBJECT(MailNode, AdminNode);
public:
void handle_request_default(Request *request);
void admin_handle_request_main(Request *request);
String admin_get_section_name();
void admin_add_section_links(Vector<AdminSectionLinkInfo> *links);
bool admin_full_render();
MailNode();
~MailNode();
};
#endif

42
app/news/news_node.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "news_node.h"
#include "web/html/form_validator.h"
#include "web/html/html_builder.h"
#include "web/http/cookie.h"
#include "web/http/http_enums.h"
#include "web/http/http_session.h"
#include "web/http/request.h"
#include "web/http/session_manager.h"
#include "../html_macros.h"
#include "database/database.h"
#include "database/database_manager.h"
#include "database/query_builder.h"
#include "database/query_result.h"
#include "database/table_builder.h"
#include "crypto/hash/sha256.h"
void NewsNode::handle_request_default(Request *request) {
}
void NewsNode::admin_handle_request_main(Request *request) {
request->send_error(404);
}
String NewsNode::admin_get_section_name() {
return "Mail";
}
void NewsNode::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
links->push_back(AdminSectionLinkInfo("- Mail Editor", ""));
}
bool NewsNode::admin_full_render() {
return false;
}
NewsNode::NewsNode() :
AdminNode() {
}
NewsNode::~NewsNode() {
}

28
app/news/news_node.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef NEWS_NODE_H
#define NEWS_NODE_H
#include "core/containers/vector.h"
#include "core/string.h"
#include "web_modules/admin_panel/admin_node.h"
class Request;
class FormValidator;
class QueryResult;
class NewsNode : public AdminNode {
RCPP_OBJECT(NewsNode, AdminNode);
public:
void handle_request_default(Request *request);
void admin_handle_request_main(Request *request);
String admin_get_section_name();
void admin_add_section_links(Vector<AdminSectionLinkInfo> *links);
bool admin_full_render();
NewsNode();
~NewsNode();
};
#endif