diff --git a/Bridge/HttpBridgeActivity.cs b/Bridge/HttpBridgeActivity.cs
index 8037099..913df4e 100644
--- a/Bridge/HttpBridgeActivity.cs
+++ b/Bridge/HttpBridgeActivity.cs
@@ -2,7 +2,7 @@
using UMC.Data;
using UMC.Net;
using UMC.Web;
-
+using UMC.Web.UI;
namespace UMC.Host
{
@@ -222,55 +222,49 @@ namespace UMC.Host
HttpBridgeClient.Stop();
}
}
+ // UMC.Web.UIDialog.AsyncDialog(this.Context, "Info", gg =>
+ // {
+ var style = new UIStyle();
+ style.Name("icon").Color(isbridge ? 0x09bb07 : 0xead848).Size(104).Font("wdk");
+ style.Name("title").Color(0x333).Size(20);
+ style.BgColor(0xfafcff).Height(200).AlignCenter();
- UMC.Web.UIDialog.AsyncDialog(this.Context, "Info", gg =>
- {
- var style = new UIStyle();
- style.Name("icon").Color(isbridge ? 0x09bb07 : 0xead848).Size(104).Font("wdk");
- style.Name("title").Color(0x333).Size(20);
- style.BgColor(0xfafcff).Height(200).AlignCenter();
+ var desc = new UMC.Web.WebMeta().Put("title", isbridge ? "Web VPN已经开启" : (data["tip"] ?? "无可用的流量,请充值")).Put("icon", isbridge ? "\uEA06" : "\uEA05");
- var fom = new Web.UIFormDialog() { Title = "Web VPN" };
- if (HttpBridgeClient.IsRunning)
- fom.Menu("关停", request.Model, request.Command, "Stop");
- var desc = new UMC.Web.WebMeta().Put("title", isbridge ? "Web VPN已经开启" : (data["tip"] ?? "无可用的流量,请充值")).Put("icon", isbridge ? "\uEA06" : "\uEA05");
+
+ UISection ui = UISection.Create(new UIHeader().Desc(desc, "{icon}\n{title}", style), new UITitle("Web VPN"));
- fom.Config.Put("Header", new UIHeader().Desc(desc, "{icon}\n{title}", style));
-
- var caption = data["caption"];
-
- fom.Add(UICell.UI("所属账户", String.IsNullOrEmpty(caption) ? "[点击完善]" : caption, new UIClick("Name").Send("System", "License")));
+ var caption = data["caption"];
- var bridgeSrc = data["bridgeSrc"];
-
- if (String.IsNullOrEmpty(bridgeSrc) == false)
- {
+ ui.AddCell("所属账户", String.IsNullOrEmpty(caption) ? "[点击完善]" : caption, new UIClick("Name").Send("System", "License"));
- fom.Add(UICell.UI("VPN节点", data["bridgeNode"] ?? "default", UIClick.Url(new Uri(bridgeSrc))));//.Send("System", "License")));
- }
- else
- {
- fom.Add(UICell.UI("VPN节点", data["bridgeNode"] ?? "default", new UIClick("BridgeSrc").Send(request.Model, request.Command))); ;
- }
+ var bridgeSrc = data["bridgeSrc"];
- var opts = new ListItemCollection();
- fom.AddTextValue("Web VPN", opts);
+ if (String.IsNullOrEmpty(bridgeSrc) == false)
+ {
- fom.Config.Put("Action", new UIClick("Recharge").Send(request));
+ ui.AddCell("VPN节点", data["bridgeNode"] ?? "default", UIClick.Url(new Uri(bridgeSrc)));//.Send("System", "License")));
+ }
+ else
+ {
+ ui.AddCell("VPN节点", data["bridgeNode"] ?? "default", new UIClick("BridgeSrc").Send(request.Model, request.Command)); ;
+ }
- opts.Put("剩余流量", data["allowSize"])
- .Put("上行流量", data["inputSize"])
- .Put("下行流量", data["outputSize"])
- .Put("流量过期", data["expireTime"]);
- fom.AddPrompt("注意:流量过期后,剩余流量将会清零");
- fom.Submit("去充值", $"{request.Model}.{request.Command}");
- fom.Add(UICell.UI("联系官方", "让天才工程师为你服务", new UIClick("Contact").Send("System", "License")));
+ ui.NewSection("Web VPN").AddCell("剩余流量", data["allowSize"])
+ .AddCell("上行流量", data["inputSize"])
+ .AddCell("下行流量", data["outputSize"])
+ .AddCell("流量过期", data["expireTime"]).Footer.Put("text", "注意:流量过期后,剩余流量将会清零");
+
+
+ ui.UIFootBar = new UIFootBar() { IsFixed = true };
+ ui.UIFootBar.AddText(
+ new UIEventText(HttpBridgeClient.IsRunning ? "关停" : "开启").Click(new UIClick(HttpBridgeClient.IsRunning ? "Stop" : "Start").Send(request.Model, request.Command)), new UIEventText("去充值").Style(new UIStyle().BgColor()).Click(new UIClick("Recharge").Send(request)));
- return fom;
- });
+ ui.NewSection().AddCell("联系官方", "让天才工程师为你服务", new UIClick("Contact").Send("System", "License"));
+ ui.SendTo($"{request.Model}.{request.Command}", this.Context, false);
}
break;
diff --git a/UMC.Host.csproj b/UMC.Host.csproj
index da89fdb..1f0bc27 100644
--- a/UMC.Host.csproj
+++ b/UMC.Host.csproj
@@ -43,11 +43,11 @@
-
-
+
-
+
+
\ No newline at end of file