nodejs download btn
This commit is contained in:
parent
d9d9541d71
commit
2190b5ef07
@ -26,7 +26,7 @@
|
|||||||
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.1.2" date="2022-02-07"/>
|
<release version="4.1.2" date="2022-02-08"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/nodejs.h"
|
#include "miscellaneous/nodejs.h"
|
||||||
|
#include "network-web/webfactory.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@ -18,7 +19,8 @@ SettingsNodejs::SettingsNodejs(Settings* settings, QWidget* parent) : SettingsPa
|
|||||||
"scalable network applications.\n\n"
|
"scalable network applications.\n\n"
|
||||||
"%1 integrates Node.js to bring some modern features like Adblock.\n\n"
|
"%1 integrates Node.js to bring some modern features like Adblock.\n\n"
|
||||||
"Note that usually all required Node.js tools should be available via your \"PATH\" "
|
"Note that usually all required Node.js tools should be available via your \"PATH\" "
|
||||||
"environment variable, so you do not have to specify full paths.").arg(APP_NAME),
|
"environment variable, so you do not have to specify full paths.\n\n"
|
||||||
|
"Also, relaunch \"Settings\" dialog after you install Node.js.").arg(APP_NAME),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
m_ui.m_helpPackages->setHelpText(tr("%1 automatically installs some Node.js packages so that you do not have to. %1 does not "
|
m_ui.m_helpPackages->setHelpText(tr("%1 automatically installs some Node.js packages so that you do not have to. %1 does not "
|
||||||
@ -26,6 +28,11 @@ SettingsNodejs::SettingsNodejs(Settings* settings, QWidget* parent) : SettingsPa
|
|||||||
"it uses subfolder placed in your \"user data\" folder.").arg(APP_NAME),
|
"it uses subfolder placed in your \"user data\" folder.").arg(APP_NAME),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
|
connect(m_ui.m_btnDownloadNodejs, &QPushButton::clicked,
|
||||||
|
this, [this]() {
|
||||||
|
qApp->web()->openUrlInExternalBrowser(QSL("https://nodejs.org/en/download/"));
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_ui.m_tbNodeExecutable->lineEdit(), &BaseLineEdit::textChanged,
|
connect(m_ui.m_tbNodeExecutable->lineEdit(), &BaseLineEdit::textChanged,
|
||||||
this, &SettingsNodejs::testNodejs);
|
this, &SettingsNodejs::testNodejs);
|
||||||
connect(m_ui.m_tbNpmExecutable->lineEdit(), &BaseLineEdit::textChanged,
|
connect(m_ui.m_tbNpmExecutable->lineEdit(), &BaseLineEdit::textChanged,
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="HelpSpoiler" name="m_helpInfo" native="true"/>
|
<widget class="HelpSpoiler" name="m_helpInfo" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Node.js executable</string>
|
<string>Node.js executable</string>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditWithStatus" name="m_tbNodeExecutable" native="true"/>
|
<widget class="LineEditWithStatus" name="m_tbNodeExecutable" native="true"/>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>NPM executable</string>
|
<string>NPM executable</string>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditWithStatus" name="m_tbNpmExecutable" native="true"/>
|
<widget class="LineEditWithStatus" name="m_tbNpmExecutable" native="true"/>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Package folder </string>
|
<string>Package folder </string>
|
||||||
@ -87,7 +87,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditWithStatus" name="m_tbPackageFolder" native="true"/>
|
<widget class="LineEditWithStatus" name="m_tbPackageFolder" native="true"/>
|
||||||
@ -107,9 +107,16 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="HelpSpoiler" name="m_helpPackages" native="true"/>
|
<widget class="HelpSpoiler" name="m_helpPackages" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QPushButton" name="m_btnDownloadNodejs">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Download Node.js</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user