修改BUG:个人中心网站样式与网站设置网站样式分开处理 closed #IVBF3
#Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=IVBF3
This commit is contained in:
parent
6d2772b7ac
commit
bc82933c07
|
@ -19,7 +19,8 @@ namespace Bootstrap.Admin.Models
|
|||
DisplayName = user.DisplayName;
|
||||
UserName = user.UserName;
|
||||
AppCode = user.App;
|
||||
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
|
||||
Css = user.Css;
|
||||
ActiveCss = string.IsNullOrEmpty(Css) ? Theme : Css;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -37,9 +38,19 @@ namespace Bootstrap.Admin.Models
|
|||
/// </summary>
|
||||
public string Icon { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取/设置 个人网站样式
|
||||
/// </summary>
|
||||
public string Css { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 当前设置的默认应用
|
||||
/// </summary>
|
||||
public string AppCode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 当前样式
|
||||
/// </summary>
|
||||
public string ActiveCss { get; }
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ namespace Bootstrap.Admin.Models
|
|||
public string Footer { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 网站样式全局设置
|
||||
/// </summary>
|
||||
public string Theme { get; protected set; }
|
||||
|
||||
|
|
|
@ -102,11 +102,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">网站皮肤</div>
|
||||
<div class="card-header">网站样式</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<span>注意:本设置将覆盖<b><a class="badge-pill" href="./Settings">网站设置</a></b>中已经设置的网站样式</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="btn-group" role="group">
|
||||
<button id="css" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.Theme">默认样式</button>
|
||||
<button id="css" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.Css">默认样式</button>
|
||||
<div class="dropdown-menu">
|
||||
<a href="#" data-val="">默认样式</a>
|
||||
@foreach (var css in Model.Themes)
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
<div class="card">
|
||||
<div class="card-header">网站样式</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<span>注意:如果<b><a class="badge-pill" href="./Profiles">个人中心</a></b>中已经设置了网站样式,此处设置对当前用户不生效,对其他用户生效</span>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<div class="btn-group" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@model ModelBase
|
||||
@model HeaderBarModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
|||
<link href="~/css/theme-responsive.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/site.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/site-responsive.css" rel="stylesheet" asp-append-version="true" />
|
||||
@if (!string.IsNullOrEmpty(Model.Theme))
|
||||
@if (!string.IsNullOrEmpty(Model.ActiveCss))
|
||||
{
|
||||
<link href="~/css/@Model.Theme" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/@Model.ActiveCss" rel="stylesheet" asp-append-version="true" />
|
||||
}
|
||||
}
|
||||
@section javascript {
|
||||
|
|
Loading…
Reference in New Issue