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: 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/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/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/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 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 764248e7..92bac051 100644 Binary files a/src/admin/Bootstrap.Admin/BootstrapAdmin.db and b/src/admin/Bootstrap.Admin/BootstrapAdmin.db differ 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/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/Views/Shared/_Layout.cshtml b/src/admin/Bootstrap.Admin/Views/Shared/_Layout.cshtml index 9e830cd2..6351f08a 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) @@ -13,7 +14,7 @@ - +