From c90fab0136a08071f220b9ea97528bca76aa65ba Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 8 Sep 2023 20:48:54 +0200 Subject: [PATCH] added help for JSON API page --- retroshare-gui/src/gui/settings/JsonApiPage.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/settings/JsonApiPage.cc b/retroshare-gui/src/gui/settings/JsonApiPage.cc index a824a5fa0..f0767db7c 100644 --- a/retroshare-gui/src/gui/settings/JsonApiPage.cc +++ b/retroshare-gui/src/gui/settings/JsonApiPage.cc @@ -59,7 +59,15 @@ JsonApiPage::JsonApiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/) ui.listenAddressLineEdit->setValidator(ipValidator); } - +QString JsonApiPage::helpText() const +{ + return tr("

  Webinterface

\ +

Retroshare provides a JSON API allowing other softwares to communicate with its core using token-controlled HTTP requests to http://localhost:[port]. \ + Please refer to the Retroshare documentation for how to use this feature.

\ +

Unless you know what you're doing, you shouldn't need to change anything in this page. \ + The web interface for instance will automatically register its own token to the JSON API which will be visible \ + in the list of authenticated tokens after you enable it.

"); +} void JsonApiPage::enableJsonApi(bool checked) { ui.addTokenPushButton->setEnabled(checked); @@ -107,8 +115,6 @@ void JsonApiPage::load() whileBlocking(ui.tokensListView)->setModel(new QStringListModel(newTk)); } -QString JsonApiPage::helpText() const { return ""; } - bool JsonApiPage::checkStartJsonApi() { if(!Settings->getJsonApiEnabled()) return false;