Merge branch 'dev' into pre-release
This commit is contained in:
commit
b2c2a889ca
|
@ -32,7 +32,7 @@ test_script:
|
|||
- ps: >-
|
||||
.\appveyor.test.ps1
|
||||
artifacts:
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\netcoreapp2.2\publish\
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\netcoreapp3.0\publish\
|
||||
name: BootstrapAdmin
|
||||
type: WebDeployPackage
|
||||
deploy:
|
||||
|
|
|
@ -281,5 +281,11 @@
|
|||
"Name": "自动锁屏",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "网站图标",
|
||||
"Code": "http://localhost:49185/favicon.ico",
|
||||
"Define": NumberInt(1)
|
||||
}
|
||||
];
|
|
@ -1,3 +1,4 @@
|
|||
#! /bin/bash
|
||||
# init mongodb data
|
||||
mongo ./init.js
|
||||
mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"
|
||||
mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"
|
||||
|
|
|
@ -157,6 +157,7 @@ Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站
|
|||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.ico', 1);
|
||||
|
||||
Delete from Navigations where Application = 2;
|
||||
INSERT into Navigations (ParentId, Name, `Order`, Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
mysql -e "drop database if exists BootstrapAdmin; create database BootstrapAdmin;" -uroot
|
||||
mysql -hlocalhost -uroot -DBootstrapAdmin < ~/src/Longbow/BootstrapAdmin/DatabaseScripts/MySQL/install.sql
|
||||
mysql -hlocalhost -uroot -DBootstrapAdmin < ~/src/Longbow/BootstrapAdmin/DatabaseScripts/MySQL/initData.sql
|
||||
|
|
|
@ -158,6 +158,7 @@ Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站
|
|||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.ico', 1);
|
||||
|
||||
Delete from Navigations where Application = '2';
|
||||
INSERT into Navigations (ParentId, Name, "order", Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);
|
||||
|
|
|
@ -163,6 +163,7 @@ Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网
|
|||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.ico', 1);
|
||||
|
||||
Delete from [Navigations] where Application = 2;
|
||||
INSERT into [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);
|
||||
|
|
|
@ -170,6 +170,7 @@ Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站页脚', N
|
|||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'http://localhost:50852/Admin/Index', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', N'http://localhost:49185/favicon.ico', 1);
|
||||
|
||||
-- 菜单
|
||||
DELETE FROM Navigations Where [Application] = @AppId
|
||||
|
|
Binary file not shown.
|
@ -28,6 +28,10 @@ namespace Bootstrap.Admin.Models
|
|||
// 通过 AppCode 获取用户默认应用的标题
|
||||
Title = DictHelper.RetrieveWebTitle(AppId);
|
||||
Footer = DictHelper.RetrieveWebFooter(AppId);
|
||||
|
||||
// feat: https://gitee.com/LongbowEnterprise/dashboard/issues?id=I12VKZ
|
||||
// 后台系统网站图标跟随个人中心设置的默认应用站点的展示
|
||||
WebSiteLogo = DictHelper.RetrieveWebLogo(AppId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,9 @@ namespace Bootstrap.Admin.Models
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 默认构造函数
|
||||
/// 获取 网站 logo 小图标
|
||||
/// </summary>
|
||||
public ModelBase() : this("0")
|
||||
{
|
||||
|
||||
}
|
||||
public string WebSiteLogo { get; protected set; } = "~/favicon.ico";
|
||||
|
||||
/// <summary>
|
||||
/// 获取 网站标题
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
left: 0;
|
||||
bottom: 40px;
|
||||
right: 0;
|
||||
top: 93px;
|
||||
top: 89px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
@model ModelBase
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="icon" href="~/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" href="@Url.Content(Model.WebSiteLogo)" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="@Url.Content(Model.WebSiteLogo)" type="image/x-icon" />
|
||||
<link rel="apple-touch-icon" href="~/favicon.png"/>
|
||||
<title>@ViewBag.Title</title>
|
||||
@RenderSection("css", false)
|
||||
|
@ -13,7 +14,7 @@
|
|||
<link href="../css/IE8.css" rel="stylesheet" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<body class="trans-mute">
|
||||
<!--[if lt IE 10 ]>
|
||||
<div id="ieAlert" class="alert alert-danger alert-dismissible">
|
||||
<div>当前浏览器版本太低,不支持本系统,请升级到至少IE10 <a href="../browser/IE10.exe" target="_blank">本地下载</a> <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" target="_blank">微软下载</a>,或者使用Chrome浏览器 <a href="../browser/ChromeSetup.exe" target="_blank">本地下载</a></div>
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
border-radius: 4px;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
|
||||
.userinfo .username {
|
||||
|
@ -56,6 +55,9 @@
|
|||
|
||||
.userinfo .dropdown-toggle {
|
||||
border-radius: 0;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.userinfo .dropdown-toggle, .userinfo .dropdown-toggle:hover, .userinfo.show .dropdown-toggle, .header .nav a, .header .nav a:hover {
|
||||
|
@ -116,12 +118,12 @@
|
|||
}
|
||||
|
||||
.userinfo.show .dropdown-menu {
|
||||
margin-top: 4px;
|
||||
margin-top: 5px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
aside, .main-content {
|
||||
top: 55px;
|
||||
top: 51px;
|
||||
}
|
||||
|
||||
aside {
|
||||
|
@ -129,7 +131,7 @@ aside {
|
|||
}
|
||||
|
||||
aside .nav-brand, .sidebar-open aside:hover .nav-brand {
|
||||
height: 55px;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
padding: 0 0.625rem;
|
||||
}
|
||||
|
@ -182,10 +184,6 @@ aside {
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 0.625rem 1rem;
|
||||
}
|
||||
|
||||
/* color */
|
||||
.main-content {
|
||||
background-color: #ecf0f5;
|
||||
|
@ -265,6 +263,7 @@ footer {
|
|||
.header .nav {
|
||||
display: flex;
|
||||
flex: 0 1 auto;
|
||||
height: 3.125rem;
|
||||
}
|
||||
|
||||
.sidebar-toggle-box {
|
||||
|
@ -291,7 +290,7 @@ footer {
|
|||
}
|
||||
|
||||
aside .sidebar, .sidebar-open aside:hover .sidebar {
|
||||
top: 121px;
|
||||
top: 116px;
|
||||
transition: top .3s linear;
|
||||
}
|
||||
|
||||
|
@ -383,7 +382,7 @@ footer {
|
|||
}
|
||||
|
||||
.sidebar-open aside .sidebar {
|
||||
top: 115px;
|
||||
top: 107px;
|
||||
}
|
||||
|
||||
.sidebar-open .main-content {
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
/*Title*/
|
||||
body.trans-mute * {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 0 15px;
|
||||
|
@ -21,7 +25,7 @@
|
|||
font-weight: bold;
|
||||
color: #0077de;
|
||||
background-color: #b5f1b6;
|
||||
padding: 12px 15px;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 4px 4px 0 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -29,7 +33,7 @@
|
|||
.cache-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
padding: 0.5rem 0.625rem;
|
||||
border: 1px solid #eee;
|
||||
border-width: 0 1px 1px 1px;
|
||||
}
|
||||
|
@ -111,7 +115,7 @@
|
|||
left: 0;
|
||||
bottom: 40px;
|
||||
right: 0;
|
||||
top: 93px;
|
||||
top: 89px;
|
||||
transition: margin-left .3s ease-in-out;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ aside .bg, aside .nav-brand, aside .nav-header, .header .nav, .userinfo .dropdow
|
|||
|
||||
.header .nav .dropdown {
|
||||
margin-right: 6px;
|
||||
height: 53px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
@ -89,7 +88,7 @@ aside .bg, aside .nav-brand, aside .nav-header, .header .nav, .userinfo .dropdow
|
|||
|
||||
.userinfo .dropdown-toggle {
|
||||
display: block;
|
||||
padding: 6px;
|
||||
padding: 6px 6px;
|
||||
border-radius: 4px;
|
||||
transition: all .25s linear;
|
||||
}
|
||||
|
@ -186,12 +185,12 @@ aside .bg, aside .nav-brand, aside .nav-header, .header .nav, .userinfo .dropdow
|
|||
|
||||
.nav .dropdown-header {
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
padding: 0.5rem 0.625rem;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.nav .dropdown-footer {
|
||||
padding: 6px 0;
|
||||
padding: 0.375rem 0;
|
||||
background-color: #f1f2f7;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
|
@ -267,7 +266,7 @@ body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-grou
|
|||
|
||||
.sidebar .nav-link {
|
||||
color: #aeb2b7;
|
||||
padding: 10px 10px;
|
||||
padding: 0.5rem 0.625rem;
|
||||
transition: background .3s linear, color .3s linear;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
|
@ -336,7 +335,7 @@ body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-grou
|
|||
display: block;
|
||||
color: #777;
|
||||
flex: 1 1 auto;
|
||||
padding: 12px 0;
|
||||
padding: 0.625rem 0;
|
||||
white-space: nowrap;
|
||||
transition: color .3s linear;
|
||||
}
|
||||
|
@ -353,7 +352,7 @@ aside {
|
|||
transition: transform .3s ease-in-out;
|
||||
transform: translate(-100%);
|
||||
position: absolute;
|
||||
top: 93px;
|
||||
top: 89px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
@ -555,6 +554,10 @@ input.pending {
|
|||
box-shadow: none;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.card .card-header a {
|
||||
color: #797979;
|
||||
}
|
||||
|
|
|
@ -167,6 +167,9 @@
|
|||
})(jQuery);
|
||||
|
||||
$(function () {
|
||||
// enable animoation effect
|
||||
$('body').removeClass('trans-mute');
|
||||
|
||||
// 自动锁屏功能
|
||||
var mousePosition = { screenX: 0, screenY: 0 };
|
||||
var count = 1;
|
||||
|
|
|
@ -69,7 +69,6 @@ namespace Bootstrap.DataAccess
|
|||
{
|
||||
// 优先查找配置的应用程序网站标题
|
||||
var code = DbHelper.RetrieveTitle(appId);
|
||||
|
||||
if (code == "网站标题未设置") code = DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "网站标题" && d.Category == "网站设置" && d.Define == 0)?.Code ?? "后台管理系统";
|
||||
return code;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,19 @@ namespace Bootstrap.DataAccess
|
|||
|
||||
private static IEnumerable<BootstrapDict> RetrieveProtectedDicts() => RetrieveDicts().Where(d => d.Define == 0 || d.Category == "测试平台");
|
||||
|
||||
/// <summary>
|
||||
/// 获取网站 logo 小图标
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveWebLogo(string appId)
|
||||
{
|
||||
// 获取应用程序 logo
|
||||
var ditcs = RetrieveDicts();
|
||||
var platName = ditcs.FirstOrDefault(d => d.Category == "应用程序" && d.Code == appId)?.Name;
|
||||
return ditcs.FirstOrDefault(d => d.Category == platName && d.Name == "网站图标")?.Code ?? $"~/favicon.ico";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除字典中的数据
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue