From a34204e25e8c0331a0bc3cbe1476fad32e8fc866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 7 Jul 2022 12:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9C=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=95=B0=E6=8D=AE=E7=9C=8B=E6=9D=BF=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/configloaders/user_ui_config.go | 13 +++++++----- .../actions/default/settings/user-ui/index.go | 7 +++++++ .../@default/settings/user-nodes/index.html | 1 + .../@default/settings/user-ui/index.html | 21 +++++++++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/internal/configloaders/user_ui_config.go b/internal/configloaders/user_ui_config.go index e85f4207..73fcf71b 100644 --- a/internal/configloaders/user_ui_config.go +++ b/internal/configloaders/user_ui_config.go @@ -84,10 +84,13 @@ func loadUserUIConfig() (*systemconfigs.UserUIConfig, error) { func defaultUserUIConfig() *systemconfigs.UserUIConfig { return &systemconfigs.UserUIConfig{ - ProductName: "GoEdge", - UserSystemName: "GoEdge用户系统", - ShowOpenSourceInfo: true, - ShowVersion: true, - ShowFinance: true, + ProductName: "GoEdge", + UserSystemName: "GoEdge用户系统", + ShowOpenSourceInfo: true, + ShowVersion: true, + ShowFinance: true, + BandwidthUnit: systemconfigs.BandwidthUnitBit, + ShowBandwidthCharts: true, + ShowTrafficCharts: true, } } diff --git a/internal/web/actions/default/settings/user-ui/index.go b/internal/web/actions/default/settings/user-ui/index.go index 6ae2a9b3..a988f29e 100644 --- a/internal/web/actions/default/settings/user-ui/index.go +++ b/internal/web/actions/default/settings/user-ui/index.go @@ -48,6 +48,10 @@ func (this *IndexAction) RunPost(params struct { LogoFile *actions.File TimeZone string + ShowTrafficCharts bool + ShowBandwidthCharts bool + BandwidthUnit string + Must *actions.Must CSRF *actionutils.CSRF }) { @@ -68,6 +72,9 @@ func (this *IndexAction) RunPost(params struct { config.ShowVersion = params.ShowVersion config.Version = params.Version config.ShowFinance = params.ShowFinance + config.ShowTrafficCharts = params.ShowTrafficCharts + config.ShowBandwidthCharts = params.ShowBandwidthCharts + config.BandwidthUnit = params.BandwidthUnit config.TimeZone = params.TimeZone // 上传Favicon文件 diff --git a/web/views/@default/settings/user-nodes/index.html b/web/views/@default/settings/user-nodes/index.html index 04bd00c5..56bbaffd 100644 --- a/web/views/@default/settings/user-nodes/index.html +++ b/web/views/@default/settings/user-nodes/index.html @@ -2,6 +2,7 @@ [添加节点] + [界面设置]

暂时还没有节点。

diff --git a/web/views/@default/settings/user-ui/index.html b/web/views/@default/settings/user-ui/index.html index e793cce8..f7616901 100644 --- a/web/views/@default/settings/user-ui/index.html +++ b/web/views/@default/settings/user-ui/index.html @@ -79,6 +79,27 @@ +

数据看板

+ + + + + + + + + + + + + +
显示流量相关数据和图表
显示带宽相关数据和图表
带宽单位 + +
+

其他