Merge pull request #604 from Qv2ray/dev-api-sys-warning

added a warning for innocent users turning off api subsystem
This commit is contained in:
Qv2ray-dev 2020-05-12 20:25:44 +08:00 committed by GitHub
commit ff865c1fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 0 deletions

View File

@ -1157,7 +1157,15 @@ void PreferencesWindow::on_enableAPI_stateChanged(int arg1)
{ {
LOADINGCHECK LOADINGCHECK
NEEDRESTART NEEDRESTART
CurrentConfig.apiConfig.enableAPI = arg1 == Qt::Checked; CurrentConfig.apiConfig.enableAPI = arg1 == Qt::Checked;
if (arg1 == Qt::Unchecked)
{
const auto msgAPIDisableTitle = tr("Disabling API Subsystem");
const auto msgAPIDisableMsg = tr("Disabling API subsystem will also disable the statistics function of Qv2ray.") + NEWLINE + //
tr("Speed chart and traffic statistics will be disabled.");
QvMessageBoxWarn(this, msgAPIDisableTitle, msgAPIDisableMsg);
}
} }
void PreferencesWindow::on_updateChannelCombo_currentIndexChanged(int index) void PreferencesWindow::on_updateChannelCombo_currentIndexChanged(int index)

View File

@ -1734,6 +1734,18 @@ But could damage your server if improperly used.</source>
For example, for updating subscriptions.</source> For example, for updating subscriptions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Disabling API Subsystem</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Disabling API subsystem will also disable the statistics function of Qv2ray.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Speed chart and traffic statistics will be disabled.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@ -2450,6 +2450,18 @@ For example, for updating subscriptions.</source>
<translation>Qv2ray自体のためのものです <translation>Qv2ray自体のためのものです
</translation> </translation>
</message> </message>
<message>
<source>Disabling API Subsystem</source>
<translation>APIサブシステムを無効</translation>
</message>
<message>
<source>Disabling API subsystem will also disable the statistics function of Qv2ray.</source>
<translation>APIサブシステムを無効にするとQv2rayの統計機能も無効になります</translation>
</message>
<message>
<source>Speed chart and traffic statistics will be disabled.</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@ -2349,6 +2349,18 @@ But could damage your server if improperly used.</source>
For example, for updating subscriptions.</source> For example, for updating subscriptions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Disabling API Subsystem</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Disabling API subsystem will also disable the statistics function of Qv2ray.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Speed chart and traffic statistics will be disabled.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@ -2080,6 +2080,18 @@ For example, for updating subscriptions.</source>
<translation> Qv2ray <translation> Qv2ray
</translation> </translation>
</message> </message>
<message>
<source>Disabling API Subsystem</source>
<translation> API </translation>
</message>
<message>
<source>Disabling API subsystem will also disable the statistics function of Qv2ray.</source>
<translation> API Qv2ray </translation>
</message>
<message>
<source>Speed chart and traffic statistics will be disabled.</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>