Compare commits

...

26 Commits

Author SHA1 Message Date
Argo Window10 d204f003b8 fix(#I16BFG): 个人中心保存按钮在特殊情况下失效
#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I16BFG
2019-12-06 23:57:10 +08:00
Argo Window10 31618e3782 refactor: 统一字典表 Define 字段显示名称为字典类型 2019-11-29 12:59:52 +08:00
Argo Window10 7417c4909f feat: 同步 longbow-select 组件代码与样式 2019-11-26 11:32:16 +08:00
Argo Windows 91b430aa9c doc: 增加忽略 xml 文件规则 2019-11-01 22:09:05 +08:00
Argo Zhang dca9b0c454
feat(#I12VKZ): 网站图标与前台一致
#Comment
comment #I12VKZ

#Issue
link #I12VKZ
2019-10-07 01:12:20 +08:00
Argo Zhang 9ae9015590
db(#I12VKZ): 增加网站图标跟随前台一致
#Comment
comment #I12VKZ
AdminLTE 样式下侧边栏图标

#Issue
link #I12VKZ
2019-10-07 01:12:15 +08:00
Argo Zhang a9057c3661
refactor(#I12VKZ): 字典名称更改为 favicon
#Comment
comment #I12VKZ
更改字典表网站图标为 favicon

#Issue
link #I12VKZ
2019-10-07 01:12:09 +08:00
Argo Zhang a506134f52
doc: 前台网站增加网站图标 2019-10-07 01:11:50 +08:00
Argo Zhang 4155508d33
style: 微调网站设置 Cache 内容间隙 2019-10-06 20:56:23 +08:00
Argo Zhang ac76e3ebe1
fix(#I12YKG): 角色对菜单授权弹窗增加过滤条件
#Comment
comment #I12YKG

#Issue
link #I12YKG

# Conflicts:
#	src/admin/Bootstrap.Admin/wwwroot/css/theme.css
2019-10-06 20:55:14 +08:00
Argo Zhang a96f5a13ef
refactor: 扩展 bootstrap-toggle 控件支持移动设备 2019-10-06 20:53:26 +08:00
Argo Zhang 781c8e076b
fix(#I12YHP): Error 页面报错
#Comment
comment #I12YHP

#Issue
link #I12YHP #I12VKZ
2019-10-06 20:53:14 +08:00
Argo Zhang 03fa2af477
fix(#I12YF5): 禁止加载时呈现动画
#Comment
comment #I12YF5
默认禁止一切动画,网页元素渲染完毕后由 js 脚本开启动画效果

#Issue
close #I12YF5
2019-10-06 20:52:56 +08:00
Argo Zhang da7f454edd
db(#I12VKZ): 字典表增加前台网站图标
#Comment
comment #I12VKZ

#Issue
link#I12VKZ
2019-10-06 20:52:30 +08:00
Argo Zhang 4b9cf379e1
feat(#I12VKZ): 网站图标跟随前台系统图标变化
#Comment
comment #I12VKZ

#Issue
link #I12VKZ
2019-10-06 20:52:21 +08:00
Argo Zhang 5b7637ec94
fix(#I12XYM): 修复 Safari 浏览器中文输入法状态下无法录入问题
#Comment
comment #I12XYM

#Issue
link #I12XYM
2019-10-06 20:52:02 +08:00
Argo Zhang 1046009edb
build(init): 修复自动部署脚本路径错误
# Conflicts:
#	init.sh
2019-10-05 14:14:51 +08:00
Argo Zhang b1d691315f
build(build): 调整部署脚本 2019-10-04 10:58:51 +08:00
Argo Zhang a5dc1ee9f1
build(deploy): 同步 master 分支部署脚本 2019-10-04 00:01:12 +08:00
Argo Zhang 1ab3cee661
build: 更新发布命令 2019-10-03 23:43:41 +08:00
Argo Zhang c871b87e54
build(init): 增加 CentOS 服务脚本以及初始化 init.sh 命令 2019-10-03 23:42:50 +08:00
Argo Zhang 3c46683393
fix: 发布脚本条件错误 2019-10-03 22:35:54 +08:00
Argo Zhang acd060fb92
build: 更新 Security.Mvc 组件 2019-10-03 19:33:14 +08:00
Argo Zhang 145a5048ee
build: 升级组件到最新版 2019-10-01 16:16:12 +08:00
Argo Zhang 7017843a49
feat(#I12VKS): 登陆页面网站标题与默认应用一致
comment #I12VKS

link #I12VKS

# Conflicts:
#	src/client/Bootstrap.Client/Bootstrap.Client.csproj
2019-10-01 16:06:40 +08:00
Argo Zhang f30189ef44
feat(#I12VKS): 后台网站标题页脚与默认应用一致
comment #I12VKS
已登陆用户后台管理页面显示的网站标题跟页脚与个人中心设置的默认应用内设置的显示一致

link #I12VKS
2019-10-01 16:06:03 +08:00
52 changed files with 419 additions and 182 deletions

2
.gitignore vendored
View File

@ -348,7 +348,7 @@ ASALocalRun/
# Net Core Keys
**/[Kk]eys/*.xml
Bootstrap.Admin.xml
Bootstrap.*.xml
###### -- Custom Ignore Section, Make sure all files you add to the git repo are below this line -- ######

View File

@ -96,6 +96,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "win", "win", "{C6F2DCA0-794
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}"
ProjectSection(SolutionItems) = preProject
deploy-admin.sh = deploy-admin.sh
deploy-client.sh = deploy-client.sh
init.sh = init.sh
publish-admin.sh = publish-admin.sh
publish-client.sh = publish-client.sh
watch-run-admin.sh = watch-run-admin.sh
@ -109,6 +112,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{5F732D4E-133B-
appveyor.yml = appveyor.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{68F7C160-3FB2-4129-8F89-96F78B2DA0A9}"
ProjectSection(SolutionItems) = preProject
services\ba.admin.service = services\ba.admin.service
services\ba.client.service = services\ba.client.service
services\nginx.service = services\nginx.service
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -165,6 +175,7 @@ Global
{C6F2DCA0-7941-4C28-9328-2D495F5DCB00} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
{5F732D4E-133B-4DA6-811B-C369CDC3FB89} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
{68F7C160-3FB2-4129-8F89-96F78B2DA0A9} = {FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {221EAE38-5F75-4391-9A48-E462A9F3B8FC}

View File

@ -17,7 +17,7 @@
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
</Target>
<Target Condition=" '$(TargetFramework)' == 'netcoreapp2.2' " Name="PostBuild" AfterTargets="PostBuildEvent">

View File

@ -281,5 +281,17 @@
"Name": "自动锁屏",
"Code": "0",
"Define": NumberInt(0)
},
{
"Category": "测试平台",
"Name": "favicon",
"Code": "http://localhost:49185/favicon.ico",
"Define": NumberInt(1)
},
{
"Category": "测试平台",
"Name": "网站图标",
"Code": "http://localhost:49185/favicon.png",
"Define": NumberInt(1)
}
];

View File

@ -157,6 +157,8 @@ 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 ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 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);

View File

@ -158,6 +158,8 @@ 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 ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 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);

View File

@ -163,6 +163,8 @@ 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 ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 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);

View File

@ -170,6 +170,8 @@ 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'favicon', N'http://localhost:49185/favicon.ico', 1);
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', 'http://localhost:49185/favicon.png', 1);
-- 菜单
DELETE FROM Navigations Where [Application] = @AppId

13
deploy-admin.sh Normal file
View File

@ -0,0 +1,13 @@
#! /bin/bash
cd ~/BootstrapAdmin
git pull
dotnet publish src/admin/Bootstrap.Admin -c Release
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp2.2/publish/appsettings*.json
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp2.2/publish/BootstrapAdmin.db
systemctl stop ba.admin
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp2.2/publish/* /usr/local/ba/admin/
systemctl start ba.admin
systemctl status ba.admin -l

11
deploy-client.sh Normal file
View File

@ -0,0 +1,11 @@
#! /bin/bash
cd ~/BootstrapAdmin
git pull
dotnet publish src/client/Bootstrap.Client -c Release
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp2.2/publish/appsettings*.json
systemctl stop ba.client
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp2.2/publish/* /usr/local/ba/client/
systemctl start ba.client
systemctl status ba.client -l

14
init.sh Normal file
View File

@ -0,0 +1,14 @@
#! /bin/bash
mkdir /usr/local/ba
mkdir /usr/local/ba/admin
mkdir /usr/local/ba/client
cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/appsettings.json /usr/local/ba/admin
cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/BootstrapAdmin.db /usr/local/ba/admin
cp ~/BootstrapAdmin/src/client/Bootstrap.Client/appsettings.json /usr/local/ba/client
cp ~/BootstrapAdmin/services/* /usr/lib/systemd/system
systemctl enable ba.admin
systemctl enable ba.client
systemctl enable nginx

View File

@ -1,11 +1,3 @@
#! /bin/bash
cd ~/BootstrapAdmin
git pull
dotnet publish src/admin/Bootstrap.Admin -c Release
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp2.2/publish/appsettings*.json
systemctl stop ba.admin
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp2.2/publish/* /usr/local/ba/admin/
systemctl start ba.admin
systemctl status ba.admin

View File

@ -1,11 +1,3 @@
#! /bin/bash
cd ~/BootstrapAdmin
git pull
dotnet publish src/client/Bootstrap.Client -c Release
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp2.2/publish/appsettings*.json
systemctl stop ba.client
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp2.2/publish/* /usr/local/ba/client/
systemctl start ba.client
systemctl status ba.client

15
services/ba.admin.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=Bootstrap Admin Application
[Service]
Type=simple
WorkingDirectory=/usr/local/ba/admin
Environment=ASPNETCORE_ENVIRONMENT=Production
ExecStart=/usr/bin/dotnet Bootstrap.Admin.dll --urls http://localhost:50852
ExecStop=/bin/kill -2 $MAINPID
KillMode=process
Restart=on-failure
RestartSec=1s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,15 @@
[Unit]
Description=Bootstrap Client Application
[Service]
Type=simple
WorkingDirectory=/usr/local/ba/client
Environment=ASPNETCORE_ENVIRONMENT=Production
ExecStart=/usr/bin/dotnet Bootstrap.Client.dll --urls http://localhost:49185
ExecStop=/bin/kill -2 $MAINPID
KillMode=process
Restart=on-failure
RestartSec=1s
[Install]
WantedBy=multi-user.target

16
services/nginx.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@ -11,9 +11,9 @@
<ItemGroup>
<PackageReference Include="Bootstrap.Security.DataAccess" Version="2.2.21" />
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.0.0" />
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.0.1-beta6" />
<PackageReference Include="Longbow.Configuration" Version="2.2.7" />
<PackageReference Include="Longbow.Tasks" Version="2.2.23" />
<PackageReference Include="Longbow.Tasks" Version="2.2.24" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.1.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />

View File

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Configuration;
using System;
using System.Linq;
@ -67,16 +68,17 @@ namespace Bootstrap.Admin.Controllers
/// <summary>
/// 系统登录方法
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
[HttpGet]
public ActionResult Login()
public ActionResult Login([FromQuery] string appId = "0")
{
if (DictHelper.RetrieveSystemModel())
{
ViewBag.UserName = "Admin";
ViewBag.Password = "123789";
}
return User.Identity.IsAuthenticated ? (ActionResult)Redirect("~/Home/Index") : View("Login", new LoginModel());
return User.Identity.IsAuthenticated ? (ActionResult)Redirect("~/Home/Index") : View("Login", new LoginModel(appId));
}
/// <summary>
@ -125,12 +127,13 @@ namespace Bootstrap.Admin.Controllers
/// <param name="userName">User name.</param>
/// <param name="password">Password.</param>
/// <param name="remember">Remember.</param>
/// <param name="appId"></param>
[HttpPost]
public async Task<IActionResult> Login(string userName, string password, string remember)
public async Task<IActionResult> Login(string userName, string password, string remember, string appId = "0")
{
var auth = UserHelper.Authenticate(userName, password);
HttpContext.Log(userName, auth);
return auth ? await SignInAsync(userName, remember == "true") : View("Login", new LoginModel() { AuthFailed = true });
return auth ? await SignInAsync(userName, remember == "true") : View("Login", new LoginModel(appId) { AuthFailed = true });
}
private async Task<IActionResult> SignInAsync(string userName, bool persistent, string authenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme)
@ -163,12 +166,13 @@ namespace Bootstrap.Admin.Controllers
/// <summary>
/// Logout this instance.
/// </summary>
/// <param name="appId"></param>
/// <returns>The logout.</returns>
[HttpGet]
public async Task<IActionResult> Logout()
public async Task<IActionResult> Logout([FromQuery]string appId = "0")
{
await HttpContext.SignOutAsync();
return Redirect(Request.PathBase + CookieAuthenticationDefaults.LoginPath);
return Redirect(QueryHelpers.AddQueryString(Request.PathBase + CookieAuthenticationDefaults.LoginPath, "AppId", appId));
}
/// <summary>

View File

@ -19,7 +19,7 @@ namespace Bootstrap.Admin.Controllers
{
var model = new HeaderBarModel(User.Identity);
if (string.IsNullOrEmpty(model.UserName)) return Redirect(Request.PathBase + CookieAuthenticationDefaults.LogoutPath);
var url = DictHelper.RetrieveHomeUrl(model.AppCode);
var url = DictHelper.RetrieveHomeUrl(model.AppId);
return url.Equals("~/Home/Index", System.StringComparison.OrdinalIgnoreCase) ? (IActionResult)View(model) : Redirect(url);
}

View File

@ -0,0 +1,90 @@
using Bootstrap.DataAccess;
namespace Bootstrap.Admin.Models
{
/// <summary>
/// AdminModel 实体类
/// </summary>
public class AdminModel : ModelBase
{
/// <summary>
/// 默认构造函数
/// </summary>
/// <param name="appId"></param>
public AdminModel(string appId = "0")
{
Title = DictHelper.RetrieveWebTitle(appId);
Footer = DictHelper.RetrieveWebFooter(appId);
Theme = DictHelper.RetrieveActiveTheme();
IsDemo = DictHelper.RetrieveSystemModel();
ShowCardTitle = DictHelper.RetrieveCardTitleStatus() ? "" : "no-card-header";
ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "collapsed";
AllowMobile = DictHelper.RetrieveMobileLogin();
AllowOAuth = DictHelper.RetrieveOAuthLogin();
ShowMobile = AllowMobile ? "" : "mobile";
ShowOAuth = AllowOAuth ? "" : "oauth";
LockScreenPeriod = DictHelper.RetrieveAutoLockScreenPeriod();
EnableAutoLockScreen = DictHelper.RetrieveAutoLockScreen();
}
/// <summary>
/// 获取 网站标题
/// </summary>
public string Title { get; protected set; }
/// <summary>
/// 获取 网站页脚
/// </summary>
public string Footer { get; protected set; }
/// <summary>
/// 网站样式全局设置
/// </summary>
public string Theme { get; protected set; }
/// <summary>
/// 是否为演示系统
/// </summary>
public bool IsDemo { get; protected set; }
/// <summary>
/// 是否显示卡片标题
/// </summary>
public string ShowCardTitle { get; protected set; }
/// <summary>
/// 是否收缩侧边栏
/// </summary>
public string ShowSideBar { get; protected set; }
/// <summary>
/// 获得 是否允许短信验证码登录
/// </summary>
public bool AllowMobile { get; }
/// <summary>
/// 获得 是否允许第三方 OAuth 认证登录
/// </summary>
public bool AllowOAuth { get; }
/// <summary>
/// 获得 是否允许短信验证码登录
/// </summary>
public string ShowMobile { get; }
/// <summary>
/// 获得 是否允许第三方 OAuth 认证登录
/// </summary>
public string ShowOAuth { get; }
/// <summary>
/// 获得 自动锁屏时长 默认 1 分钟 字典表中配置
/// </summary>
public int LockScreenPeriod { get; }
/// <summary>
/// 获得 自动锁屏功能是否自动开启 默认关闭
/// </summary>
public bool EnableAutoLockScreen { get; }
}
}

View File

@ -3,7 +3,7 @@
/// <summary>
///
/// </summary>
public class ErrorModel
public class ErrorModel : ModelBase
{
/// <summary>
///

View File

@ -7,7 +7,7 @@ namespace Bootstrap.Admin.Models
/// <summary>
///
/// </summary>
public class HeaderBarModel : ModelBase
public class HeaderBarModel : AdminModel
{
/// <summary>
///
@ -21,9 +21,17 @@ namespace Bootstrap.Admin.Models
Icon = user.Icon.Contains("://", StringComparison.OrdinalIgnoreCase) ? user.Icon : string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon);
DisplayName = user.DisplayName;
UserName = user.UserName;
AppCode = user.App;
AppId = user.App;
Css = user.Css;
ActiveCss = string.IsNullOrEmpty(Css) ? Theme : Css;
// 通过 AppCode 获取用户默认应用的标题
Title = DictHelper.RetrieveWebTitle(AppId);
Footer = DictHelper.RetrieveWebFooter(AppId);
// feat: https://gitee.com/LongbowEnterprise/dashboard/issues?id=I12VKZ
// 后台系统网站图标跟随个人中心设置的默认应用站点的展示
WebSiteIcon = DictHelper.RetrieveWebIcon(AppId);
}
}
@ -50,7 +58,7 @@ namespace Bootstrap.Admin.Models
/// <summary>
/// 获得 当前设置的默认应用
/// </summary>
public string AppCode { get; }
public string AppId { get; }
/// <summary>
/// 获得 当前样式

View File

@ -5,12 +5,13 @@ namespace Bootstrap.Admin.Models
/// <summary>
/// 登陆页面 Model
/// </summary>
public class LoginModel : ModelBase
public class LoginModel : AdminModel
{
/// <summary>
/// 默认构造函数
/// </summary>
public LoginModel()
/// <param name="appId"></param>
public LoginModel(string appId = "0") : base(appId)
{
ImageLibUrl = DictHelper.RetrieveImagesLibUrl();
}

View File

@ -1,89 +1,13 @@
using Bootstrap.DataAccess;
namespace Bootstrap.Admin.Models
namespace Bootstrap.Admin.Models
{
/// <summary>
/// ModelBase
/// Model 基类
/// </summary>
public class ModelBase
{
/// <summary>
/// 默认构造函数
/// 获取 网站 logo 小图标
/// </summary>
public ModelBase()
{
Title = DictHelper.RetrieveWebTitle();
Footer = DictHelper.RetrieveWebFooter();
Theme = DictHelper.RetrieveActiveTheme();
IsDemo = DictHelper.RetrieveSystemModel();
ShowCardTitle = DictHelper.RetrieveCardTitleStatus() ? "" : "no-card-header";
ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "collapsed";
AllowMobile = DictHelper.RetrieveMobileLogin();
AllowOAuth = DictHelper.RetrieveOAuthLogin();
ShowMobile = AllowMobile ? "" : "mobile";
ShowOAuth = AllowOAuth ? "" : "oauth";
LockScreenPeriod = DictHelper.RetrieveAutoLockScreenPeriod();
EnableAutoLockScreen = DictHelper.RetrieveAutoLockScreen();
}
/// <summary>
/// 获取 网站标题
/// </summary>
public string Title { get; private set; }
/// <summary>
/// 获取 网站页脚
/// </summary>
public string Footer { get; private set; }
/// <summary>
/// 网站样式全局设置
/// </summary>
public string Theme { get; protected set; }
/// <summary>
/// 是否为演示系统
/// </summary>
public bool IsDemo { get; protected set; }
/// <summary>
/// 是否显示卡片标题
/// </summary>
public string ShowCardTitle { get; protected set; }
/// <summary>
/// 是否收缩侧边栏
/// </summary>
public string ShowSideBar { get; protected set; }
/// <summary>
/// 获得 是否允许短信验证码登录
/// </summary>
public bool AllowMobile { get; }
/// <summary>
/// 获得 是否允许第三方 OAuth 认证登录
/// </summary>
public bool AllowOAuth { get; }
/// <summary>
/// 获得 是否允许短信验证码登录
/// </summary>
public string ShowMobile { get; }
/// <summary>
/// 获得 是否允许第三方 OAuth 认证登录
/// </summary>
public string ShowOAuth { get; }
/// <summary>
/// 获得 自动锁屏时长 默认 1 分钟 字典表中配置
/// </summary>
public int LockScreenPeriod { get; }
/// <summary>
/// 获得 自动锁屏功能是否自动开启 默认关闭
/// </summary>
public bool EnableAutoLockScreen { get; }
public string WebSiteIcon { get; protected set; } = "~/favicon.ico";
}
}

View File

@ -8,12 +8,12 @@ using System.Linq;
namespace Bootstrap.Admin.Models
{
/// <summary>
///
/// 侧边栏导航条 Model
/// </summary>
public class NavigatorBarModel : HeaderBarModel
{
/// <summary>
///
/// 构造函数
/// </summary>
/// <param name="controller"></param>
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
@ -21,16 +21,25 @@ namespace Bootstrap.Admin.Models
Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}");
var authApps = AppHelper.RetrievesByUserName(controller.User.Identity.Name);
Applications = DictHelper.RetrieveApps().Where(app => app.Key == "0" || authApps.Any(key => key.Equals(app.Key, StringComparison.OrdinalIgnoreCase)));
// feat: https://gitee.com/LongbowEnterprise/dashboard/issues?id=I12VKZ
// 后台系统网站图标跟随个人中心设置的默认应用站点的展示
WebSiteLogo = DictHelper.RetrieveWebLogo(AppId);
}
/// <summary>
///
/// 获得 网站图标
/// </summary>
public string WebSiteLogo { get; protected set; }
/// <summary>
/// 获得 网站菜单
/// </summary>
public IEnumerable<BootstrapMenu> Navigations { get; private set; }
/// <summary>
///
/// 获得 网站应用程序
/// </summary>
public IEnumerable<KeyValuePair<string, string>> Applications { get; private set; }
}
}
}

View File

@ -110,8 +110,7 @@ namespace Bootstrap.Admin
app.UseHttpsRedirection();
app.UseResponseCompression();
app.UseStaticFiles();
app.UseAuthentication();
app.UseBootstrapAdminAuthorization(RoleHelper.RetrievesByUserName, RoleHelper.RetrievesByUrl, AppHelper.RetrievesByUserName);
app.UseBootstrapAdminAuthentication(RoleHelper.RetrievesByUserName, RoleHelper.RetrievesByUrl, AppHelper.RetrievesByUserName);
app.UseBootstrapHealthChecks();
app.UseOnlineUsers(TraceHelper.Filter, TraceHelper.Save);
app.UseCacheManager();

View File

@ -28,7 +28,7 @@
<input type="text" class="form-control" id="txt_dict_cate" data-provide="typeahead" />
</div>
<div class="form-group col-sm-6 col-md-auto">
<label class="control-label" for="txt_dict_define">字典类</label>
<label class="control-label" for="txt_dict_define">字典类</label>
<input class="form-control" data-toggle="lgbSelect" />
<select data-toggle="lgbSelect" class="d-none" id="txt_dict_define">
<option value="">全部</option>

View File

@ -30,6 +30,7 @@
<script src="~/lib/longbow/longbow.validate.js" asp-append-version="true"></script>
<script src="~/js/profiles.js" asp-append-version="true"></script>
}
<input type="hidden" value="@Model.UserName" id="userName"/>
<div class="card" asp-auth="saveDisplayName">
<div class="card-header">基本资料</div>
<div class="card-body" data-toggle="LgbValidate" data-valid-button="#btnSaveDisplayName">
@ -39,12 +40,12 @@
<form class="form-inline">
<div class="row">
<div class="form-group col-sm-6 col-md-auto">
<label class="control-label" for="userName">登录名称</label>
<input type="text" class="form-control ignore" id="userName" name="userName" value="@Model.UserName" readonly />
<label class="control-label" for="userName1">登录名称</label>
<input type="text" class="form-control ignore" id="userName1" value="@Model.UserName" readonly />
</div>
<div class="form-group col-sm-6 col-md-auto">
<label class="control-label" for="DisplayName">显示名称</label>
<input type="text" class="form-control" id="displayName" name="displayName" value="@Model.DisplayName" placeholder="不可为空20字以内" maxlength="20" data-valid="true" />
<input type="text" class="form-control" id="displayName" value="@Model.DisplayName" placeholder="不可为空20字以内" maxlength="20" data-valid="true" />
</div>
</div>
</form>
@ -87,7 +88,7 @@
<div class="card-body">
<div class="form-group">
<div class="btn-group" role="group">
<button id="app" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.AppCode">未设置</button>
<button id="app" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.AppId">未设置</button>
<div class="dropdown-menu">
@foreach (var app in Model.Applications)
{

View File

@ -1,4 +1,4 @@
@model ModelBase
@model AdminModel
<footer class="position-fixed">
<div><span id="websiteFooter">@Model.Footer</span><span asp-condition="@Model.IsDemo">(演示系统)</span></div>
<a id="gotoTop" href="#" class="go-top" title="返回顶部" data-toggle="tooltip" data-placement="left">

View File

@ -112,7 +112,7 @@
<a href="~/Admin/Notifications"><i class="fa fa-bell"></i>通知<span id="logoutNoti" class="badge badge-pill badge-success"></span></a>
</div>
<div class="dropdown-item">
<a href="~/Account/Logout"><i class="fa fa-key"></i>注销</a>
<a href="~/Account/Logout?appId=@Model.AppId"><i class="fa fa-key"></i>注销</a>
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
<div class="bg"></div>
<div class="nav-brand justify-content-center">
<a href="#">
<img src="~/favicon.png" />
<img src="@Url.Content(@Model.WebSiteLogo)" />
<span>@Model.Title</span>
</a>
</div>

View File

@ -11,6 +11,20 @@
</div>
</div>
<div class="modal-footer">
<div class="flex-fill d-none d-sm-block">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="customRadioInline" checked class="custom-control-input" value="all">
<label class="custom-control-label" for="customRadioInline1">全部</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="customRadioInline" class="custom-control-input" value="system">
<label class="custom-control-label" for="customRadioInline2">系统菜单</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline3" name="customRadioInline" class="custom-control-input" value="custom">
<label class="custom-control-label" for="customRadioInline3">外部菜单</label>
</div>
</div>
<button type="button" class="btn btn-secondary" data-dismiss="modal">
<i class="fa fa-times"></i>
<span>关闭</span>

View File

@ -1,4 +1,4 @@
@model ModelBase
@model AdminModel
@{
Layout = "_Bootstrap";
}

View File

@ -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.WebSiteIcon)" type="image/x-icon" />
<link rel="shortcut icon" href="@Url.Content(Model.WebSiteIcon)" 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>

View File

@ -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;
}

View File

@ -6,7 +6,6 @@
body {
color: #797979;
background: #f1f2f7;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
}
@ -556,34 +555,38 @@ input.pending {
box-shadow: none;
}
.card .card-header a {
color: #797979;
.card-header {
padding: 0.5rem 1rem;
}
.card .card-header a {
color: #797979;
}
.card .card-header a[data-toggle="collapse"] {
display: block;
}
.card .card-header a[data-toggle="collapse"] {
display: block;
.card .card-header a[data-toggle="collapse"] i {
transition: all .25s linear;
}
.card .card-header a[data-toggle="collapse"] i {
transition: all .25s linear;
}
.card .card-header a[data-toggle="collapse"].collapsed i {
transform: rotate(-90deg);
}
.card .card-header a.fa {
transition: color .3s linear;
.card .card-header a[data-toggle="collapse"].collapsed i {
transform: rotate(-90deg);
}
.card .card-header a.fa:hover {
color: #333;
}
.card .card-header i + span {
margin-left: 6px;
.card .card-header a.fa {
transition: color .3s linear;
}
.card .card-header a.fa:hover {
color: #333;
}
.card .card-header i + span {
margin-left: 6px;
}
.card-body .bootstrap-table {
margin-top: -10px;
}
@ -938,3 +941,12 @@ label[for] {
display: inline-block;
margin-left: 0;
}
.custom-control-label {
color: #333;
font-weight: bold;
}
.custom-control-label:before, .custom-control-label::after {
top: 3px;
}

View File

@ -167,6 +167,9 @@
})(jQuery);
$(function () {
// enable animoation effect
$('body').removeClass('trans-mute');
// 自动锁屏功能
var mousePosition = { screenX: 0, screenY: 0 };
var count = 1;

View File

@ -17,7 +17,7 @@ $(function () {
{ title: "字典标签", field: "Category", sortable: true },
{ title: "字典名称", field: "Name", sortable: true },
{ title: "字典代码", field: "Code", sortable: true },
{ title: "字典类", field: "Define", sortable: true, formatter: function (value) { return value === 0 ? "系统使用" : "自定义"; } }
{ title: "字典", field: "Define", sortable: true, formatter: function (value) { return value === 0 ? "系统使用" : "自定义"; } }
],
exportOptions: {
fileName: "数据字典",

View File

@ -155,4 +155,20 @@ $(function () {
});
}).children('.radio').hide();
});
// 菜单弹窗过滤条件
$('.custom-radio').on('click', ':radio', function (e) {
var filter = $(this).val();
if (filter === 'all') {
$nestMenu.find('[data-category]').removeClass('d-none');
}
else if (filter === 'system') {
$nestMenu.find('[data-category]').addClass('d-none');
$nestMenu.find('[data-category="0"]').removeClass('d-none');
}
else if (filter === 'custom') {
$nestMenu.find('[data-category]').addClass('d-none');
$nestMenu.find('[data-category="1"]').removeClass('d-none');
}
});
});

View File

@ -50,6 +50,10 @@
cursor: not-allowed;
}
.form-select.is-disabled .form-select-append {
color: #c0c4cc;
}
.form-select-input {
color: #606266;
outline: none;

View File

@ -75,7 +75,7 @@
// 新控件 <div class="form-select">
this.$ctl = $(lgbSelect.Template).insertBefore(this.$element);
if ($input.attr('data-toggle') === 'lgbSelect') {
this.$input = $input.addClass("form-select-input").attr("aria-haspopup", "true").attr("aria-expanded", "false").attr("data-toggle", "dropdown");
this.$input = $input.addClass("form-select-input").attr("aria-haspopup", "true").attr("aria-expanded", "false").attr("data-toggle", "dropdown").attr("readonly", true);
}
else {
this.$input = $('<input type="text" readonly="readonly" class="form-control form-select-input" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"/>');
@ -114,11 +114,17 @@
// save attributes
var attrs = [];
["id", "data-default-val"].forEach(function (v, index) {
["id", "name", "class", "data-valid", "data-default-val"].forEach(function (v, index) {
var value = that.$element.attr(v);
if (value !== undefined) attrs.push({ name: v, value: value });
});
var disabled = this.$element.prop('disabled');
// set disabled property
if (disabled) {
this.disabled();
}
// replace element select -> input hidden
this.$element.remove();
this.$element = $('<input type="hidden" data-toggle="lgbSelect" />').val(that.val()).insertBefore(this.$input);
@ -139,12 +145,15 @@
this.$input.removeAttr('disabled');
};
_proto.reset = function (value) {
_proto.reset = function (value, init) {
var that = this;
// keep old value
var oldValue = this.$input.attr('value');
// default select value
if (init == undefined) init = true;
// warning: must use attr('value') method instead of val(). otherwise the others input html element will filled by first element value.
// see https://gitee.com/LongbowEnterprise/longbow-select/issues/IZ3BR?from=project-issue
this.$input.attr('value', '').removeClass('is-valid is-invalid');
@ -153,10 +162,12 @@
$.each(value, function (index) {
var $item = $('<a class="dropdown-item" href="#" data-val="' + this.value + '">' + this.text + '</a>');
that.$menus.append($item);
if (this.selected === true || this.value === oldValue || index === 0 || this.value === that.$element.attr('data-default-val')) {
that.$input.attr('value', this.text);
that.$element.val(this.value).attr('data-text', this.text);
$activeItem = $item;
if (init) {
if (this.selected === true || this.value === oldValue || index === 0 || this.value === that.$element.attr('data-default-val')) {
that.$input.attr('value', this.text);
that.$element.val(this.value).attr('data-text', this.text);
$activeItem = $item;
}
}
});
if ($activeItem !== null) $activeItem.addClass('active');

View File

@ -574,5 +574,11 @@
$('.date').lgbDatePicker().on('show hide', function (e) {
e.stopPropagation();
});
// 移动设备支持 bootstrap-toggle 扩展
$('[data-toggle="toggle"]').on('touchend', function (e) {
$(this).tigger('click.bs.toggle');
e.preventDefault();
});
});
})(jQuery);

View File

@ -74,21 +74,23 @@ namespace Bootstrap.DataAccess.MongoDB
}
/// <summary>
///
/// 获得网站标题设置
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public override string RetrieveWebTitle()
public override string RetrieveWebTitle(string appId = "0")
{
var code = RetrieveAppName("网站标题");
var code = RetrieveAppName("网站标题", appId);
if (code == "网站标题未设置") code = DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "网站标题" && d.Category == "网站设置" && d.Define == 0)?.Code ?? "后台管理系统";
return code;
}
/// <summary>
///
/// 获得网站页脚设置
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public override string RetrieveWebFooter()
public override string RetrieveWebFooter(string appId = "0")
{
var code = RetrieveAppName("网站页脚");
if (code == "网站页脚未设置") code = DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "网站页脚" && d.Category == "网站设置" && d.Define == 0)?.Code ?? "2016 © 通用后台管理系统";

View File

@ -11,10 +11,10 @@
<PackageReference Include="Longbow.GiteeAuth" Version="2.2.0" />
<PackageReference Include="Longbow.GitHubAuth" Version="2.2.0" />
<PackageReference Include="Longbow.OAuth" Version="2.2.2" />
<PackageReference Include="Longbow.Logging" Version="2.2.13" />
<PackageReference Include="Longbow.Logging" Version="3.0.0" />
<PackageReference Include="Longbow.PetaPoco" Version="1.0.2" />
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
<PackageReference Include="Longbow.Tasks" Version="2.2.23" />
<PackageReference Include="Longbow.Tasks" Version="2.2.24" />
<PackageReference Include="Longbow.Web" Version="2.2.16" />
<PackageReference Include="Longbow.WeChatAuth" Version="2.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.6" />

View File

@ -63,11 +63,12 @@ namespace Bootstrap.DataAccess
/// <summary>
/// 获取系统网站标题
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public virtual string RetrieveWebTitle()
public virtual string RetrieveWebTitle(string appId = "0")
{
// 优先查找配置的应用程序网站标题
var code = DbHelper.RetrieveTitle();
var code = DbHelper.RetrieveTitle(appId);
if (code == "网站标题未设置") code = DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "网站标题" && d.Category == "网站设置" && d.Define == 0)?.Code ?? "后台管理系统";
return code;
}
@ -75,11 +76,12 @@ namespace Bootstrap.DataAccess
/// <summary>
/// 获取系统网站页脚
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public virtual string RetrieveWebFooter()
public virtual string RetrieveWebFooter(string appId = "0")
{
// 优先查找配置的应用程序网站标题
var code = DbHelper.RetrieveFooter();
var code = DbHelper.RetrieveFooter(appId);
if (code == "网站页脚未设置") code = DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "网站页脚" && d.Category == "网站设置" && d.Define == 0)?.Code ?? "2016 © 通用后台管理系统";
return code;
}

View File

@ -31,6 +31,32 @@ namespace Bootstrap.DataAccess
private static IEnumerable<BootstrapDict> RetrieveProtectedDicts() => RetrieveDicts().Where(d => d.Define == 0 || d.Category == "测试平台");
/// <summary>
/// 获取网站 favicon 图标
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public static string RetrieveWebIcon(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 == "favicon")?.Code ?? $"~/favicon.ico";
}
/// <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.png";
}
/// <summary>
/// 删除字典中的数据
/// </summary>
@ -98,14 +124,16 @@ namespace Bootstrap.DataAccess
/// <summary>
/// 获取站点 Title 配置信息
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public static string RetrieveWebTitle() => DbContextManager.Create<Dict>().RetrieveWebTitle();
public static string RetrieveWebTitle(string appId = "0") => DbContextManager.Create<Dict>().RetrieveWebTitle(appId);
/// <summary>
/// 获取站点 Footer 配置信息
/// </summary>
/// <param name="appId"></param>
/// <returns></returns>
public static string RetrieveWebFooter() => DbContextManager.Create<Dict>().RetrieveWebFooter();
public static string RetrieveWebFooter(string appId = "0") => DbContextManager.Create<Dict>().RetrieveWebFooter(appId);
/// <summary>
/// 获得系统中配置的可以使用的网站样式

View File

@ -9,7 +9,7 @@
<PackageReference Include="Longbow.Cache" Version="2.2.15" />
<PackageReference Include="Longbow.Configuration" Version="2.2.7" />
<PackageReference Include="Longbow.Data" Version="2.3.8" />
<PackageReference Include="Longbow.Logging" Version="2.2.13" />
<PackageReference Include="Longbow.Logging" Version="3.0.0" />
<PackageReference Include="Longbow.Web" Version="2.2.16" />
</ItemGroup>

View File

@ -5,9 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bootstrap.Security.Mvc" Version="2.2.17" />
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.0.1-beta6" />
<PackageReference Include="Longbow.Configuration" Version="2.2.7" />
<PackageReference Include="Longbow.Logging" Version="2.2.13" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />

View File

@ -29,6 +29,7 @@ namespace Bootstrap.Client.Models
var authHost = ConfigurationManager.Get<BootstrapAdminAuthenticationOptions>().AuthHost;
var uriBuilder = new UriBuilder(authHost);
uriBuilder.Path = uriBuilder.Path == "/" ? CookieAuthenticationDefaults.LogoutPath.Value : $"{uriBuilder.Path.TrimEnd('/')}{CookieAuthenticationDefaults.LogoutPath.Value}";
uriBuilder.Query = $"AppId={AppId}";
LogoutUrl = uriBuilder.ToString();
// set Icon

View File

@ -6,7 +6,6 @@
body {
color: #797979;
background: #f1f2f7;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 49 KiB