From bc82933c071afeed34d72d6cac54752b43fe9ecd Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 12 Apr 2019 17:39:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=BD=91=E7=AB=99=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8E=E7=BD=91=E7=AB=99=E8=AE=BE=E7=BD=AE=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=88=86=E5=BC=80=E5=A4=84=E7=90=86=20closed?= =?UTF-8?q?=20#IVBF3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=IVBF3 --- Bootstrap.Admin/Models/HeaderBarModel.cs | 99 ++++++++++--------- Bootstrap.Admin/Models/ModelBase.cs | 80 +++++++-------- Bootstrap.Admin/Views/Admin/Profiles.cshtml | 7 +- Bootstrap.Admin/Views/Admin/Settings.cshtml | 3 + .../Views/Shared/_Bootstrap.cshtml | 72 +++++++------- 5 files changed, 139 insertions(+), 122 deletions(-) diff --git a/Bootstrap.Admin/Models/HeaderBarModel.cs b/Bootstrap.Admin/Models/HeaderBarModel.cs index 73925e1f..af7585e1 100644 --- a/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -1,45 +1,56 @@ -using Bootstrap.DataAccess; -using System.Security.Principal; - -namespace Bootstrap.Admin.Models -{ - /// - /// - /// - public class HeaderBarModel : ModelBase - { - /// - /// - /// - /// - public HeaderBarModel(IIdentity identity) - { - var user = UserHelper.RetrieveUserByUserName(identity.Name); - Icon = string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon); - DisplayName = user.DisplayName; - UserName = user.UserName; - AppCode = user.App; - if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css; - } - - /// - /// - /// - public string UserName { get; } - - /// - /// - /// - public string DisplayName { get; } - - /// - /// 获得/设置 用户头像地址 - /// - public string Icon { get; } - - /// - /// 获得 当前设置的默认应用 - /// - public string AppCode { get; } - } +using Bootstrap.DataAccess; +using System.Security.Principal; + +namespace Bootstrap.Admin.Models +{ + /// + /// + /// + public class HeaderBarModel : ModelBase + { + /// + /// + /// + /// + public HeaderBarModel(IIdentity identity) + { + var user = UserHelper.RetrieveUserByUserName(identity.Name); + Icon = string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon); + DisplayName = user.DisplayName; + UserName = user.UserName; + AppCode = user.App; + Css = user.Css; + ActiveCss = string.IsNullOrEmpty(Css) ? Theme : Css; + } + + /// + /// + /// + public string UserName { get; } + + /// + /// + /// + public string DisplayName { get; } + + /// + /// 获得/设置 用户头像地址 + /// + public string Icon { get; } + + /// + /// 获取/设置 个人网站样式 + /// + public string Css { get; } + + /// + /// 获得 当前设置的默认应用 + /// + public string AppCode { get; } + + /// + /// 获得 当前样式 + /// + public string ActiveCss { get; } + } } \ No newline at end of file diff --git a/Bootstrap.Admin/Models/ModelBase.cs b/Bootstrap.Admin/Models/ModelBase.cs index 1b55d0e6..c778ea2b 100644 --- a/Bootstrap.Admin/Models/ModelBase.cs +++ b/Bootstrap.Admin/Models/ModelBase.cs @@ -1,41 +1,41 @@ -using Bootstrap.DataAccess; - -namespace Bootstrap.Admin.Models -{ - /// - /// - /// - public class ModelBase - { - /// - /// - /// - public ModelBase() - { - Title = DictHelper.RetrieveWebTitle(); - Footer = DictHelper.RetrieveWebFooter(); - Theme = DictHelper.RetrieveActiveTheme(); - IsDemo = DictHelper.RetrieveSystemModel(); - } - - /// - /// - /// - public string Title { get; private set; } - - /// - /// - /// - public string Footer { get; private set; } - - /// - /// - /// - public string Theme { get; protected set; } - - /// - /// 是否为演示系统 - /// - public bool IsDemo { get; protected set; } - } +using Bootstrap.DataAccess; + +namespace Bootstrap.Admin.Models +{ + /// + /// + /// + public class ModelBase + { + /// + /// + /// + public ModelBase() + { + Title = DictHelper.RetrieveWebTitle(); + Footer = DictHelper.RetrieveWebFooter(); + Theme = DictHelper.RetrieveActiveTheme(); + IsDemo = DictHelper.RetrieveSystemModel(); + } + + /// + /// + /// + public string Title { get; private set; } + + /// + /// + /// + public string Footer { get; private set; } + + /// + /// 网站样式全局设置 + /// + public string Theme { get; protected set; } + + /// + /// 是否为演示系统 + /// + public bool IsDemo { get; protected set; } + } } \ No newline at end of file diff --git a/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/Bootstrap.Admin/Views/Admin/Profiles.cshtml index d70433a9..3d862b15 100644 --- a/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -102,11 +102,14 @@
-
网站皮肤
+
网站样式
+
- +