Older/WebApplication/RedirectPage.h
amass 38e6447885
All checks were successful
Deploy / Build (push) Successful in 6m12s
finish redirect.
2025-01-05 14:23:02 +08:00

26 lines
606 B
C++

#ifndef __REDIRECTPAGE_H__
#define __REDIRECTPAGE_H__
#include <Wt/WTemplate.h>
class RedirectPage : public Wt::WTemplate {
public:
RedirectPage();
void setRedirect(const std::string &path, const std::string &text = "");
void setMessage(const std::string &message);
void redirect(const std::string &path);
protected:
void onTimeout();
private:
Wt::JSignal<int> m_history;
int m_historySize = 0;
Wt::WTimer *m_timer = nullptr;
Wt::WAnchor *m_anchor = nullptr;
int m_time = 5000;
std::string m_redirect;
std::string m_text;
};
#endif // __REDIRECTPAGE_H__