feat: added 'clear site list' button (#1747) (#1753)

* feat: added 'clear site list' button (#1747)

* chore: rename 'Export/Import Sites' to 'Additional options'

---------

Co-authored-by: MrMirDan <58086007+MrMirDan@users.noreply.github.com>
This commit is contained in:
Nethius
2025-08-01 11:37:56 +08:00
committed by GitHub
parent 174e85a20a
commit 0531508a75
5 changed files with 48 additions and 1 deletions
+10
View File
@@ -83,6 +83,16 @@ void SitesModel::removeSite(QModelIndex index)
endRemoveRows();
}
void SitesModel::removeSites()
{
beginResetModel();
m_settings->removeAllVpnSites(m_currentRouteMode);
fillSites();
endResetModel();
}
int SitesModel::getRouteMode()
{
return m_currentRouteMode;
+1
View File
@@ -28,6 +28,7 @@ public slots:
bool addSite(const QString &hostname, const QString &ip);
void addSites(const QMap<QString, QString> &sites, bool replaceExisting);
void removeSite(QModelIndex index);
void removeSites();
int getRouteMode();
void setRouteMode(int routeMode);