LoginController.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // Created by xcbosa on 2023/1/30.
  3. //
  4. #include "../processor/processor.h"
  5. #include "../webuiconf.h"
  6. #include "../processor/templates/framework7/Framework7Document.hpp"
  7. using namespace std;
  8. using namespace xc::processor;
  9. using namespace xc::processor::templates;
  10. using namespace xc::processor::templates::framework7;
  11. using namespace configor;
  12. namespace xc::controller {
  13. ResponseData *LoginController(RequestData request) {
  14. return new TemplateResponseData({
  15. Framework7Document({
  16. FormView({
  17. FormInputView("userName", "用户名", "text", "输入您的用户名"),
  18. FormInputView("password", "密码", "password", "输入您的密码")
  19. }),
  20. BlockView({
  21. BlockColumnView({
  22. ButtonView("登陆"),
  23. VerticalSpacer(10),
  24. p("如果您需要注册,请联系管理员")
  25. })
  26. })
  27. }, {
  28. a("2023 © Frp-WebUI by XCBOSA")
  29. .classAdd("link")
  30. .onclick("window.open('https://github.com/XCBOSA/frp-webui-500k.git')")
  31. })
  32. });
  33. }
  34. ContentGeneratorDefineWithNameS("LoginController", false, LoginController(request))
  35. }