-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
本次更新内容较多,相对于0.9版本改动如下: 1.增加友链可见性的修改 2.增加自助申请页面 3.增加文章接口和过滤器 4.修复大量BUG和性能问题 5.使用Logger代替输出 6.移除无用功能(GatherLog) 7.增加toast提示框 8.首页可以预览博主最近动态 9.优化各种细节问题 10.优化代码风格 ...
- Loading branch information
Drizzle
committed
May 29, 2023
1 parent
9238469
commit e70229d
Showing
14 changed files
with
252 additions
and
171 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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeInspection/PencilsConfiguration/ActualSeverity/@EntryValue">INFO</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=dearain/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lantin/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Typecho/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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 was deleted.
Oops, something went wrong.
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,65 @@ | ||
@page "/Apply" | ||
@using Moments.Service | ||
@using Moments.Model | ||
@inject FriendService FriendService | ||
@inject IJSRuntime JsRuntime | ||
<div style="text-align: center;padding: 20px"> | ||
<div class="input-group mb-3"> | ||
<span class="input-group-text">标题*</span> | ||
<input @bind="_item.Name" type="text" class="form-control"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<span class="input-group-text">简介</span> | ||
<input @bind="_item.Info" type="text" class="form-control"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<span class="input-group-text">LOGO</span> | ||
<input @bind="_item.Avatar" type="text" class="form-control"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<span class="input-group-text">链接*</span> | ||
<input @bind="_item.Link" type="text" class="form-control"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<span class="input-group-text">Feed</span> | ||
<input @bind="_item.Rss" type="text" class="form-control"> | ||
|
||
<select class="form-select" @bind="_item.Rule"> | ||
@foreach (var item in Enum.GetNames(typeof(Rule))) | ||
{ | ||
<option value="@item">@item</option> | ||
} | ||
</select> | ||
|
||
</div> | ||
|
||
<div class="input-group mb-3"> | ||
<span class="input-group-text">验证链接</span> | ||
<input @bind="_item.VerifyUrl" type="text" class="form-control"> | ||
</div> | ||
<div class="form-text">验证链接可以填写您的站点的收录本站的内页地址</div> | ||
<button class="mt-5 btn btn-primary" @onclick="Submit">申请</button> | ||
</div> | ||
|
||
@code | ||
{ | ||
readonly Friend _item = new (); | ||
|
||
async Task Submit() | ||
{ | ||
if (_item.Link is null) | ||
{ | ||
await JsRuntime.InvokeVoidAsync("alert", "请填写带*的必填项目!"); | ||
return; | ||
} | ||
var temp = FriendService.First(x => x.Link == _item.Link); | ||
if (temp is not null) | ||
{ | ||
await JsRuntime.InvokeVoidAsync("alert", "请勿重复提交!"); | ||
return; | ||
} | ||
_item.Visible = false; | ||
FriendService.Add(_item); | ||
await JsRuntime.InvokeVoidAsync("alert", "提交申请成功!"); | ||
} | ||
} |
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
Oops, something went wrong.