From e8b2c1606ffeecb9a495c84fe717442b4f50cb47 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Thu, 2 Sep 2021 21:08:56 +0800 Subject: [PATCH] Add default value to client os (#86) * add default value for clientos * update CI * update icon format * change the icon format --- .github/workflows/pre-release.yml | 5 +---- GPClient/gpclient.cpp | 8 ++++---- GPClient/resources.qrc | 2 +- GPClient/settings_icon.png | Bin 0 -> 1104 bytes GPClient/settings_icon.svg | 15 --------------- 5 files changed, 6 insertions(+), 24 deletions(-) create mode 100644 GPClient/settings_icon.png delete mode 100644 GPClient/settings_icon.svg diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index aa6c14b..a19eb21 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -1,10 +1,7 @@ name: Pre Release on: - workflow_run: - workflows: ["Build"] - branches: [master] - types: [completed] + workflow_dispatch: jobs: pre-release: diff --git a/GPClient/gpclient.cpp b/GPClient/gpclient.cpp index 18dc4ce..966f4bf 100644 --- a/GPClient/gpclient.cpp +++ b/GPClient/gpclient.cpp @@ -50,7 +50,7 @@ GPClient::~GPClient() void GPClient::setupSettings() { settingsButton = new QPushButton(this); - settingsButton->setIcon(QIcon(":/images/settings_icon.svg")); + settingsButton->setIcon(QIcon(":/images/settings_icon.png")); settingsButton->setFixedSize(QSize(28, 28)); QRect rect = this->geometry(); @@ -68,7 +68,7 @@ void GPClient::setupSettings() void GPClient::onSettingsButtonClicked() { settingsDialog->setExtraArgs(settings::get("extraArgs", "").toString()); - settingsDialog->setClientos(settings::get("clientos", "").toString()); + settingsDialog->setClientos(settings::get("clientos", "Linux").toString()); settingsDialog->show(); } @@ -278,7 +278,7 @@ void GPClient::doConnect() // Login to the portal interface to get the portal config and preferred gateway void GPClient::portalLogin() { - PortalAuthenticator *portalAuth = new PortalAuthenticator(portal(), settings::get("clientos", "").toString()); + PortalAuthenticator *portalAuth = new PortalAuthenticator(portal(), settings::get("clientos", "Linux").toString()); connect(portalAuth, &PortalAuthenticator::success, this, &GPClient::onPortalSuccess); // Prelogin failed on the portal interface, try to treat the portal as a gateway interface @@ -356,7 +356,7 @@ void GPClient::gatewayLogin() PLOGI << "Performing gateway login..."; GatewayAuthenticatorParams params = GatewayAuthenticatorParams::fromPortalConfigResponse(portalConfig); - params.setClientos(settings::get("clientos", "").toString()); + params.setClientos(settings::get("clientos", "Linux").toString()); GatewayAuthenticator *gatewayAuth = new GatewayAuthenticator(currentGateway().address(), params); diff --git a/GPClient/resources.qrc b/GPClient/resources.qrc index f6ee3f6..a04e163 100644 --- a/GPClient/resources.qrc +++ b/GPClient/resources.qrc @@ -6,6 +6,6 @@ not_connected.png radio_unselected.png radio_selected.png - settings_icon.svg + settings_icon.png diff --git a/GPClient/settings_icon.png b/GPClient/settings_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..619a88257b31ced6e396c419e7fd49e5a40de3e0 GIT binary patch literal 1104 zcmV-W1h4yvP)AP2o=5~$5<;-)!iq#J8VzDmR1ndPU}a-d ziECJB#VryGDG7qO#5JfUE>YEl)^G9sBh%^3oH=vOX}jo~e4GBK-+P`pGjq=Q=0LA{ z)uYv?yE~vz5ilAk0KNflfWIz`h5=Q;HlUvi1D_@VM}TKQHV`eqWuVli;Yi@Q&*Uwz z#->3|gMbr2JDtJ8Vx|q#VZf6JgKNN48z#U+I$p#iF~`(&2=G8*@&~9vu6|mL20kc! zf^o*c50DNwXc&G5%2W8{0e3ZgvcNeYKNVF@1Asf4re2h5dTr6n9|gA(SVn?bAp_h< z3FnPuQ9`&p;GIV9vmtPOfJ44EJ5;7q4dA?}NeH-5Gw+BHxTAqKuT-W5z-S?~yp4Stip z5$0QgHbnTr03QLz4UNVi&q*fY_fLlTqx3#$!@)ok=C@2O;gH)c z3`E-zkaI z51E`>9d*zoz5$a>;QX2ZTMwgAU=EQ^Hw;EJ40GxPWT{W*ER(fjsR9?lrO)FoiRM zEJErUw&Cv6xiW16mm0Fn0bCZ?=>RSjWThj(TAxP-`y1xq1^lmI4P&Ur#n6#IZyWH? za{g+hSgq6n+>GGWh)&t`Xa{BoO@bpBR~0^nyeL)xbusP2)D-f!UBG_LJaOs^>{B(G zOXn-|2iP2FR~phTE-GU@ZH{CcipMO2><+wt_zElzX*WXCczT>Eu*V|g0)-dl$jB>rTHFmm@iamOZNj2m>4_!4IN%p@I`IOsD{*p2wpYFC0{sIn Wpd^b - - - - - - -