-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 更改控制器名称为 LoginController * refactor: 增加 AccountLogout 路由 * doc: 增加文档注释 * chore: 更新脚本路径 * refactor: 更新登录逻辑 * refactor: 精简代码 * chore: 更新登录跳转脚本 * chore: 增加弹窗支持 * chore: 增加健康检查支持 * refactor: 增强 AdminTable 参数 * refactor: 禁用扩展按钮 * revert: 撤销更改 * refactor: 使用原生 Table 实现功能
- Loading branch information
Showing
12 changed files
with
110 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/blazor/admin/BootstrapAdmin.Web/Components/Components/AdminLogin.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/blazor/admin/BootstrapAdmin.Web/Components/Components/AdminLoginGitee.razor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { execute } from "../../_content/BootstrapBlazor/modules/ajax.js" | ||
|
||
export async function login(url, userName, rememberMe) { | ||
var password = document.querySelector('input[type="password"]').value; | ||
await execute({ | ||
url: url, | ||
method: 'POST', | ||
toJson: false, | ||
data: { | ||
userName, | ||
password, | ||
rememberMe | ||
} | ||
}); | ||
location.href = "/"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 37 additions & 35 deletions
72
src/blazor/admin/BootstrapAdmin.Web/Components/Layout/MainLayout.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/blazor/admin/BootstrapAdmin.Web/Components/Pages/Account/Logout.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. | ||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information. | ||
// Website: https://admin.blazor.zone | ||
|
||
using BootstrapAdmin.Web.Components.Layout; | ||
|
||
namespace BootstrapAdmin.Web.Components.Pages.Account; | ||
|
||
/// <summary> | ||
/// Login 组件 | ||
/// </summary> | ||
[Layout(typeof(LoginLayout))] | ||
[Route("/Account/Logout")] | ||
public class Logout : ComponentBase | ||
{ | ||
[Inject, NotNull] | ||
private NavigationManager? NavigationManager { get; set; } | ||
|
||
/// <summary> | ||
/// <inheritdoc/> | ||
/// </summary> | ||
/// <param name="firstRender"></param> | ||
protected override void OnAfterRender(bool firstRender) | ||
{ | ||
base.OnAfterRender(firstRender); | ||
|
||
NavigationManager.NavigateTo("Login/Logout", true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters