Skip to content

Commit 74d208e

Browse files
committed
打赏地址写入配置文件
1 parent 32da1ab commit 74d208e

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

src/ComputerLock/Components/Donation.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
人支持
4343
</MudText>
4444

45-
<MudLink Href="https://jiuling.cc/donation" Color="Color.Secondary" Underline="Underline.None">查看赞赏记录</MudLink>
45+
<MudLink Href="@Resource.DonationPath" Color="Color.Secondary" Underline="Underline.None">查看赞赏记录</MudLink>
4646
</MudStack>
4747
</MudPaper>
4848
</DialogContent>

src/ComputerLock/Components/Donation.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected override async Task OnInitializedAsync()
2525
await base.OnInitializedAsync();
2626
try
2727
{
28-
var json = await HttpClient.GetStringAsync("https://www.jiuling.cc/api/donation/list2");
28+
var json = await HttpClient.GetStringAsync(Resource.DonationListPath);
2929
using JsonDocument doc = JsonDocument.Parse(json);
3030
if (doc.RootElement.ValueKind == JsonValueKind.Array)
3131
{

src/ComputerLock/Resources/Resource.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ComputerLock/Resources/Resource.resx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,16 @@
120120
<data name="AutoUpgradePath" xml:space="preserve">
121121
<value>https://jiuling.cc/api/app/check-update/cdbd0b29d200c61ace8a1ff74605b775/windows</value>
122122
</data>
123+
<data name="DonationListPath" xml:space="preserve">
124+
<value>https://www.jiuling.cc/api/donation/list</value>
125+
</data>
126+
<data name="DonationPath" xml:space="preserve">
127+
<value>https://jiuling.cc/donation</value>
128+
</data>
123129
<data name="GitHubUrl" xml:space="preserve">
124130
<value>https://github.com/JiuLing-zhang/ComputerLock</value>
125131
</data>
126132
<data name="HomePage" xml:space="preserve">
127-
<value>https://jiuling.cc/computer-lock</value>
133+
<value>https://jiuling.cc/computer-lock</value>
128134
</data>
129135
</root>

0 commit comments

Comments
 (0)