From d834377825d530f17b6d91ea7d47c65f5ae8ed56 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 5 Oct 2019 15:57:05 +0800 Subject: [PATCH 1/7] =?UTF-8?q?build(appveyor):=20=E6=89=93=E5=8C=85?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=9B=B4=E6=94=B9=E4=B8=BA=E8=87=AA=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 17a26892..c44b5534 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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: From b2c1c0869b07bd264369a7c480dc7e45e2c7772b Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 5 Oct 2019 17:18:58 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat(#I12VKZ):=20=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E8=B7=9F=E9=9A=8F=E5=89=8D=E5=8F=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=9B=BE=E6=A0=87=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12VKZ #Issue link #I12VKZ --- src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs | 4 ++++ src/admin/Bootstrap.Admin/Models/ModelBase.cs | 7 ++----- .../Bootstrap.Admin/Views/Shared/_Layout.cshtml | 7 ++++--- src/admin/Bootstrap.DataAccess/Dict.cs | 1 - src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs | 13 +++++++++++++ 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs b/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs index 925b99f6..724168bc 100644 --- a/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -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); } } diff --git a/src/admin/Bootstrap.Admin/Models/ModelBase.cs b/src/admin/Bootstrap.Admin/Models/ModelBase.cs index 8f5da079..9defc37c 100644 --- a/src/admin/Bootstrap.Admin/Models/ModelBase.cs +++ b/src/admin/Bootstrap.Admin/Models/ModelBase.cs @@ -28,12 +28,9 @@ namespace Bootstrap.Admin.Models } /// - /// 默认构造函数 + /// 获取 网站 logo 小图标 /// - public ModelBase() : this("0") - { - - } + public string WebSiteLogo { get; protected set; } = "~/favicon.ico"; /// /// 获取 网站标题 diff --git a/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml b/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml index 9e830cd2..454169a3 100644 --- a/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml @@ -1,11 +1,12 @@ - +@model ModelBase + - - + + @ViewBag.Title @RenderSection("css", false) diff --git a/src/admin/Bootstrap.DataAccess/Dict.cs b/src/admin/Bootstrap.DataAccess/Dict.cs index 66de0427..f395dfbf 100644 --- a/src/admin/Bootstrap.DataAccess/Dict.cs +++ b/src/admin/Bootstrap.DataAccess/Dict.cs @@ -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; } diff --git a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs index 7ba70dc8..055e855c 100644 --- a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs +++ b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs @@ -31,6 +31,19 @@ namespace Bootstrap.DataAccess private static IEnumerable RetrieveProtectedDicts() => RetrieveDicts().Where(d => d.Define == 0 || d.Category == "测试平台"); + /// + /// 获取网站 logo 小图标 + /// + /// + /// + 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"; + } + /// /// 删除字典中的数据 /// From 8d769bc6a07c2e94f8fa54101e9678f0fbe2436d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 5 Oct 2019 17:38:35 +0800 Subject: [PATCH 3/7] =?UTF-8?q?db(#I12VKZ):=20=E5=AD=97=E5=85=B8=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=89=8D=E5=8F=B0=E7=BD=91=E7=AB=99=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12VKZ #Issue link#I12VKZ --- db/MongoDB/Dicts.js | 6 ++++++ db/MySQL/initData.sql | 1 + db/Postgresql/initData.sql | 1 + db/SQLite/InitData.sql | 1 + db/SqlServer/InitData.sql | 1 + src/admin/Bootstrap.Admin/BootstrapAdmin.db | Bin 110592 -> 110592 bytes 6 files changed, 10 insertions(+) diff --git a/db/MongoDB/Dicts.js b/db/MongoDB/Dicts.js index ccf9f6b2..25c1f12e 100644 --- a/db/MongoDB/Dicts.js +++ b/db/MongoDB/Dicts.js @@ -281,5 +281,11 @@ "Name": "自动锁屏", "Code": "0", "Define": NumberInt(0) + }, + { + "Category": "测试平台", + "Name": "网站图标", + "Code": "http://localhost:49185/favicon.ico", + "Define": NumberInt(1) } ]; \ No newline at end of file diff --git a/db/MySQL/initData.sql b/db/MySQL/initData.sql index 32e693a6..b425cbed 100644 --- a/db/MySQL/initData.sql +++ b/db/MySQL/initData.sql @@ -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); diff --git a/db/Postgresql/initData.sql b/db/Postgresql/initData.sql index 2762c29c..017796ad 100644 --- a/db/Postgresql/initData.sql +++ b/db/Postgresql/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); diff --git a/db/SQLite/InitData.sql b/db/SQLite/InitData.sql index 5aedae78..14bbe97e 100644 --- a/db/SQLite/InitData.sql +++ b/db/SQLite/InitData.sql @@ -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); diff --git a/db/SqlServer/InitData.sql b/db/SqlServer/InitData.sql index 9f92aa78..2ad45ddc 100644 --- a/db/SqlServer/InitData.sql +++ b/db/SqlServer/InitData.sql @@ -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 diff --git a/src/admin/Bootstrap.Admin/BootstrapAdmin.db b/src/admin/Bootstrap.Admin/BootstrapAdmin.db index 764248e799b1567658ef1489219aefb72543134f..92bac051f67f5ae6909b6d418da3573f7ad806ac 100644 GIT binary patch delta 118 zcmZp8z}E19ZGtqT^h6nFM(K?SOU^SJuuqxHej%QTeadD*0UdTv2Lm<+Rn Date: Sat, 5 Oct 2019 20:36:12 +0800 Subject: [PATCH 4/7] =?UTF-8?q?doc:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/MongoDB/install.sh | 3 ++- db/MySQL/install.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/db/MongoDB/install.sh b/db/MongoDB/install.sh index 8e8ff90b..f205230b 100644 --- a/db/MongoDB/install.sh +++ b/db/MongoDB/install.sh @@ -1,3 +1,4 @@ +#! /bin/bash # init mongodb data mongo ./init.js -mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())" \ No newline at end of file +mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())" diff --git a/db/MySQL/install.sh b/db/MySQL/install.sh index 5ea364d5..0b254f7a 100644 --- a/db/MySQL/install.sh +++ b/db/MySQL/install.sh @@ -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 From 6f1d7018ce179e63fc85d22510225e6512d796a6 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 5 Oct 2019 22:20:29 +0800 Subject: [PATCH 5/7] =?UTF-8?q?refactor(#I12YES):=20=E8=B0=83=E6=95=B4=20h?= =?UTF-8?q?eader=20=E9=AB=98=E5=BA=A6=E4=B8=BA=2050px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12YES #Issue close #I12YES --- .../Bootstrap.Admin/Views/Home/Index.cshtml | 2 +- src/admin/Bootstrap.Admin/wwwroot/css/lte.css | 19 +++++++++---------- .../Bootstrap.Admin/wwwroot/css/site.css | 2 +- .../Bootstrap.Admin/wwwroot/css/theme.css | 17 ++++++++++------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/admin/Bootstrap.Admin/Views/Home/Index.cshtml b/src/admin/Bootstrap.Admin/Views/Home/Index.cshtml index b65b4f50..4ce3d874 100644 --- a/src/admin/Bootstrap.Admin/Views/Home/Index.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Home/Index.cshtml @@ -9,7 +9,7 @@ left: 0; bottom: 40px; right: 0; - top: 93px; + top: 89px; overflow: hidden; } diff --git a/src/admin/Bootstrap.Admin/wwwroot/css/lte.css b/src/admin/Bootstrap.Admin/wwwroot/css/lte.css index cdb9da1f..00f21fad 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/css/lte.css +++ b/src/admin/Bootstrap.Admin/wwwroot/css/lte.css @@ -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 { diff --git a/src/admin/Bootstrap.Admin/wwwroot/css/site.css b/src/admin/Bootstrap.Admin/wwwroot/css/site.css index 4dd35b3b..fd4cfb45 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/css/site.css +++ b/src/admin/Bootstrap.Admin/wwwroot/css/site.css @@ -111,7 +111,7 @@ left: 0; bottom: 40px; right: 0; - top: 93px; + top: 89px; transition: margin-left .3s ease-in-out; } diff --git a/src/admin/Bootstrap.Admin/wwwroot/css/theme.css b/src/admin/Bootstrap.Admin/wwwroot/css/theme.css index 5c88beec..d56c0dc5 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/css/theme.css +++ b/src/admin/Bootstrap.Admin/wwwroot/css/theme.css @@ -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; } From 5d6b2d531d327da9440b5c9fe04d7b867a84219c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 5 Oct 2019 22:53:39 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix(#I12YF5):=20=E7=A6=81=E6=AD=A2=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=E5=91=88=E7=8E=B0=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12YF5 默认禁止一切动画,网页元素渲染完毕后由 js 脚本开启动画效果 #Issue close #I12YF5 --- src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml | 2 +- src/admin/Bootstrap.Admin/wwwroot/css/site.css | 4 ++++ src/admin/Bootstrap.Admin/wwwroot/js/common-scripts.js | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml b/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml index 9e830cd2..f4094645 100644 --- a/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml @@ -13,7 +13,7 @@ - +