mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
qt: i2cp server page is now shown, work towards #914
This commit is contained in:
parent
5c2f1f36e8
commit
a0d90717c3
@ -532,7 +532,7 @@ namespace http {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id)
|
void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id)
|
||||||
{
|
{
|
||||||
auto i2cpServer = i2p::client::context.GetI2CPServer ();
|
auto i2cpServer = i2p::client::context.GetI2CPServer ();
|
||||||
if (i2cpServer)
|
if (i2cpServer)
|
||||||
|
@ -99,6 +99,7 @@ namespace http
|
|||||||
void ShowI2PTunnels (std::stringstream& s);
|
void ShowI2PTunnels (std::stringstream& s);
|
||||||
void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token);
|
void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token);
|
||||||
void ShowSAMSession (std::stringstream& s, const std::string& id);
|
void ShowSAMSession (std::stringstream& s, const std::string& id);
|
||||||
|
void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id);
|
||||||
} // http
|
} // http
|
||||||
} // i2p
|
} // i2p
|
||||||
|
|
||||||
|
@ -1001,14 +1001,13 @@ void MainWindow::anchorClickedHandler(const QUrl & link) {
|
|||||||
url.parse_query(params);
|
url.parse_query(params);
|
||||||
const std::string page = params["page"];
|
const std::string page = params["page"];
|
||||||
const std::string cmd = params["cmd"];
|
const std::string cmd = params["cmd"];
|
||||||
if(page == "sam_session") {
|
if (page == "sam_session") {
|
||||||
const std::string samID = params["sam_id"];
|
|
||||||
pageWithBackButton->show();
|
pageWithBackButton->show();
|
||||||
textBrowser->hide();
|
textBrowser->hide();
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
i2p::http::ShowSAMSession (s, samID);
|
i2p::http::ShowSAMSession (s, params["sam_id"]);
|
||||||
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
||||||
} else if(page == "local_destination") {
|
} else if (page == "local_destination") {
|
||||||
std::string b32 = params["b32"];
|
std::string b32 = params["b32"];
|
||||||
currentLocalDestinationB32 = b32;
|
currentLocalDestinationB32 = b32;
|
||||||
pageWithBackButton->show();
|
pageWithBackButton->show();
|
||||||
@ -1017,6 +1016,12 @@ void MainWindow::anchorClickedHandler(const QUrl & link) {
|
|||||||
std::string strstd = currentLocalDestinationB32;
|
std::string strstd = currentLocalDestinationB32;
|
||||||
i2p::http::ShowLocalDestination(s,strstd,0);
|
i2p::http::ShowLocalDestination(s,strstd,0);
|
||||||
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
||||||
|
} else if (page == "i2cp_local_destination") {
|
||||||
|
pageWithBackButton->show();
|
||||||
|
textBrowser->hide();
|
||||||
|
std::stringstream s;
|
||||||
|
i2p::http::ShowI2CPLocalDestination (s, params["i2cp_id"]);
|
||||||
|
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
||||||
} else if(cmd == "closestream") {
|
} else if(cmd == "closestream") {
|
||||||
std::string b32 = params["b32"];
|
std::string b32 = params["b32"];
|
||||||
uint32_t streamID = std::stoul(params["streamID"], nullptr);
|
uint32_t streamID = std::stoul(params["streamID"], nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user