mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
disable mux in ui when vision is selected
This commit is contained in:
parent
e98acff889
commit
5ff1ae8de9
@ -22,6 +22,8 @@ public:
|
||||
|
||||
bool onEnd() override;
|
||||
|
||||
QComboBox* flow_;
|
||||
|
||||
private:
|
||||
Ui::EditTrojanVLESS *ui;
|
||||
std::shared_ptr<NekoGui::ProxyEntity> ent;
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "include/global/GuiUtils.hpp"
|
||||
|
||||
#include <QInputDialog>
|
||||
#include <QToolTip>
|
||||
|
||||
#define ADJUST_SIZE runOnUiThread([=] { adjustSize(); adjustPosition(mainwindow); }, this);
|
||||
#define LOAD_TYPE(a) ui->type->addItem(NekoGui::ProfileManager::NewProxyEntity(a)->bean->DisplayType(), a);
|
||||
@ -212,6 +213,16 @@ void DialogEditProfile::typeSelected(const QString &newType) {
|
||||
auto _innerWidget = new EditTrojanVLESS(this);
|
||||
innerWidget = _innerWidget;
|
||||
innerEditor = _innerWidget;
|
||||
connect(_innerWidget->flow_, &QComboBox::currentTextChanged, _innerWidget, [=](const QString &txt)
|
||||
{
|
||||
if (txt == "xtls-rprx-vision")
|
||||
{
|
||||
ui->multiplex->setDisabled(true);
|
||||
} else
|
||||
{
|
||||
ui->multiplex->setDisabled(false);
|
||||
}
|
||||
});
|
||||
} else if (type == "hysteria" || type == "hysteria2" || type == "tuic") {
|
||||
auto _innerWidget = new EditQUIC(this);
|
||||
innerWidget = _innerWidget;
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
EditTrojanVLESS::EditTrojanVLESS(QWidget *parent) : QWidget(parent), ui(new Ui::EditTrojanVLESS) {
|
||||
ui->setupUi(this);
|
||||
flow_ = ui->flow;
|
||||
}
|
||||
|
||||
EditTrojanVLESS::~EditTrojanVLESS() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user