mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
qt: sam session is now shown at qt->sam sessions, work towards #914
This commit is contained in:
parent
0b084956e6
commit
5c2f1f36e8
@ -820,7 +820,7 @@ namespace http {
|
||||
s << "<b>SAM Sessions:</b> no sessions currently running.<br>\r\n";
|
||||
}
|
||||
|
||||
static void ShowSAMSession (std::stringstream& s, const std::string& id)
|
||||
void ShowSAMSession (std::stringstream& s, const std::string& id)
|
||||
{
|
||||
auto sam = i2p::client::context.GetSAMBridge ();
|
||||
if (!sam) {
|
||||
|
@ -98,6 +98,7 @@ namespace http
|
||||
void ShowSAMSessions (std::stringstream& s);
|
||||
void ShowI2PTunnels (std::stringstream& s);
|
||||
void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token);
|
||||
void ShowSAMSession (std::stringstream& s, const std::string& id);
|
||||
} // http
|
||||
} // i2p
|
||||
|
||||
|
@ -1001,7 +1001,14 @@ void MainWindow::anchorClickedHandler(const QUrl & link) {
|
||||
url.parse_query(params);
|
||||
const std::string page = params["page"];
|
||||
const std::string cmd = params["cmd"];
|
||||
if(page == "local_destination") {
|
||||
if(page == "sam_session") {
|
||||
const std::string samID = params["sam_id"];
|
||||
pageWithBackButton->show();
|
||||
textBrowser->hide();
|
||||
std::stringstream s;
|
||||
i2p::http::ShowSAMSession (s, samID);
|
||||
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
||||
} else if(page == "local_destination") {
|
||||
std::string b32 = params["b32"];
|
||||
currentLocalDestinationB32 = b32;
|
||||
pageWithBackButton->show();
|
||||
@ -1010,8 +1017,7 @@ void MainWindow::anchorClickedHandler(const QUrl & link) {
|
||||
std::string strstd = currentLocalDestinationB32;
|
||||
i2p::http::ShowLocalDestination(s,strstd,0);
|
||||
childTextBrowser->setHtml(QString::fromStdString(s.str()));
|
||||
}
|
||||
if(cmd == "closestream") {
|
||||
} else if(cmd == "closestream") {
|
||||
std::string b32 = params["b32"];
|
||||
uint32_t streamID = std::stoul(params["streamID"], nullptr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user