alroyso 3 years ago
parent
commit
6c3326cae3

+ 3 - 1
SProxy/CNetWork.cpp

@@ -3,7 +3,7 @@
 #include <nlohmann/json.hpp>
 
 #include <fmt/format.h>
-
+#include "Logger.h"
 
 CNetWork::CNetWork() : m_http_ret(http_f)
 {
@@ -220,6 +220,8 @@ std::string CNetWork::PostUrl(std::string path, std::vector<cpr::Pair> parame, s
 		{
 			break;
 		}
+
+		Logger::getSingletonPtr()->INFO("ÖØÊÔ" + std::to_string(count) + "´ÎÊý");
 		count--;
 
 

+ 9 - 2
SProxy/CServerList.cpp

@@ -83,7 +83,7 @@ bool CServerList::Init(std::string data)
 	}
 	catch (...)
 	{
-		this->m_error_msg = L"解析数据错误";
+		this->m_error_msg = L"解析数据错误,点击右上角刷新";
 		return false;
 	}
 }
@@ -105,6 +105,13 @@ void CServerList::MinimumSelectNode()
 
 	if (!t.empty())
 	{
-		node_name = t[0].name;
+		for each (CServerListMode itme in t)
+		{
+			if (itme.online_users > 0)
+			{
+				node_name = itme.name;
+				break;
+			} 
+		}
 	}
 }

+ 4 - 3
SProxy/Logger.cpp

@@ -7,7 +7,7 @@ Logger::Logger() {
 	// 默认构造函数
 	this->target = terminal;
 	this->level = debug;
-	cout << "[WELCOME] " << __FILE__ << " " << currTime() << " : " << "=== Start logging ===" << endl;
+	cout << "[SProxy] " << __FILE__ << " " << currTime() << " : " << "=== Start logging ===" << endl;
 }
 
 void Logger::Init(log_target target, log_level level, string path)
@@ -15,13 +15,14 @@ void Logger::Init(log_target target, log_level level, string path)
 	this->target = target;
 	if (path.empty())
 	{
-		this->path = std::filesystem::current_path().string() + "\\log\\log.log";
+		this->path = std::filesystem::current_path().string() + "\\log\\log.txt";
 	}
+ 
 	this->level = level;
 	string tmp = "";  // 双引号下的常量不能直接相加,所以用一个string类型做转换
 	string welcome_dialog = tmp + "[SProxy] " + __FILE__ + " " + currTime() + " : " + "=== Start logging ===\n";
 	if (target != terminal) {
-		this->outfile.open(path, ios::out | ios::app);   // 打开输出文件
+		this->outfile.open(this->path, ios::out | ios::app);   // 打开输出文件
 		this->outfile << welcome_dialog;
 	}
 	if (target != file) {

BIN
SProxy/MainDlg.cpp


BIN
SProxy/MainDlg.h


BIN
SProxy/SProxy.cpp


BIN
SProxy/res/resource.h


+ 13 - 3
SProxy/uires/xml/dlg_login.xml

@@ -1,7 +1,7 @@
 <SOUI name="mainWindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16"  width="414" height="536" margin="5,5,5,5"  resizable="1" wndType="appMain"
 appWnd="1"
 >
-  <root skin="bg-home_png" cache="1">
+  <root skin="skin_bguser" cache="1">
     <caption pos="0,0,-0,30" show="1" font="adding:0">
       <text pos="29,9">@string/title</text>
       <imgbtn name="btn_close" skin="_skin.sys.btn.close"    pos="-45,0" tip="close" animate="1"/>
@@ -13,7 +13,7 @@ appWnd="1"
 
                 <img skin="skin_user"/>
 
-                <edit name="edit_username" size="247,35" extend="20,0,0,0" colorText="#ffffff"  cueText="Username"/>
+                <edit name="edit_username" size="247,35" extend="20,0,0,0" colorText="#ffffff"  cueText="邮箱"/>
 
             </window>
 
@@ -26,7 +26,7 @@ appWnd="1"
 
                 <img skin="skin_password"/>
 
-                <edit name="edit_password" size="247,35" extend="20,0,0,0" colorText="#ffffff"  cueText="Password"/>
+                <edit name="edit_password" size="247,35" extend="20,0,0,0" colorText="#ffffff"  cueText="密码"/>
 
             </window>
 
@@ -35,6 +35,16 @@ appWnd="1"
 
             <imgbtn name="onlogin" skin="skin_btnborder"  colorText="#A79BB8" font="adding:12,bold:1"  extend="0,50,0,0">登录</imgbtn>
 
+
+            <window size="-2,35" layout="hbox"   gravity="center"  extend="0,10,44,0">
+
+                  <link href="https://user.vipone.xyz/register"   colorText="#A79BB8" font="adding:12,bold:1"  extend="130,0,0,0">注册</link>
+
+                  <link href="https://user.vipone.xyz/reset"   colorText="#A79BB8" font="adding:12,bold:1"  extend="10,0,0,0">忘记密码</link>
+
+            </window>
+          
+
             <text colorText="#ffffff88" font="adding:5,bold:1" extend="10,25,0,0" >登录服务器选择</text>
 
             <tabtypecontrol name="nodeclass" size="400,45" gravity="center" extend="47,25,44,0"/>

+ 1 - 1
SProxy/uires/xml/dlg_main.xml

@@ -1,7 +1,7 @@
 <SOUI name="loginwindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16"  width="414" height="736" margin="5,5,5,5"  resizable="0" wndType="appMain"
 appWnd="1"
 >
-  <root skin="bg-home_png" cache="1">
+  <root skin="skin_bguser" cache="1">
 
     <tabctrl name="tabmain" size="-2,-2" extend="0,0,0,0" colorBkgnd="" interpolator="Decelerate" curSel="0" focusable="0" animateSteps="30" animateType="1" tabHeight="0" tabSkin="" text-y="" iconSkin="" icon-x="" colorTextHover="#ff0000" fontHover="italic:1">
       <page>

+ 5 - 4
SProxy/uires/xml/page_home.xml

@@ -1,7 +1,8 @@
     
     <include>
             <caption pos="0,0,-0,30" show="1" font="adding:0">
-            <text pos="29,9">@string/title</text>
+            <!-- <text pos="29,9">@string/title</text> -->
+              <imgbtn name="OnRefresh" skin="skin_imgress" pos="29,0" tip="刷新线路" animate="1"/>
             <imgbtn name="btn_close" skin="_skin.sys.btn.close"    pos="-45,0" tip="close" animate="1"/>
             </caption>
         
@@ -30,11 +31,11 @@
                 
                 <window size="-2,-1" layout="vbox"   gravity="center"  extend="0,20,0,0">
                     <text name="text_touch" colorText="#ffffff88" font="adding:5,bold:1" extend="0,0,0,0" >消息</text>
-                    <imgbtn name="connect_touch" skin="skin_btnswitchoff" extend="0,11,0,0" tip="Touch to connect" animate="1"/>
+                    <imgbtn name="connect_touch"  skin="skin_btnswitchoff" extend="0,11,0,0" tip="Touch to connect" animate="1"/>
 
                 </window>
 
-                    <window name="selectnode" size="230,59" layout="hbox"  skin="skin_btnselection"  gravity="center" extend="0,10,0,0"> 
+                    <window name="selectnode" size="200,45" layout="hbox"  skin="skin_btnselection"  gravity="center" extend="0,10,0,0"> 
                             <img skin="skin_default" extend="10,0,0,0"/>
                             <text name="node_name" colorText="#D8D8D8"  extend="5,0,0,0" font="adding:5,bold:1">智能选线</text>
                             <text name="node_delay" colorText="#D8D8D8" extend="15,0,0,0" ></text>
@@ -45,7 +46,7 @@
                 <tabtypecontrol name="routemode" size="400,45" gravity="center" extend="47,5,44,0"/>
 
                 <window size="220,-1" layout="vbox" gravity="center" extend="0,15,0,0">     
-                    <link name="app_version" colorText="#707070"  extend="5,0,0,0" >版本号:正在检测1.0.7</link> 
+                    <link name="app_version" colorText="#707070"  extend="5,0,0,0" >版本号:正在检测...</link> 
                 </window>
                 
             </window>