diff --git a/Wherlog/Controls/SettingsCard.razor b/Wherlog/Controls/SettingsCard.razor
new file mode 100644
index 0000000..5878c56
--- /dev/null
+++ b/Wherlog/Controls/SettingsCard.razor
@@ -0,0 +1,18 @@
+@inherits FluentComponentBase
+
+
diff --git a/Wherlog/Controls/SettingsCard.razor.cs b/Wherlog/Controls/SettingsCard.razor.cs
new file mode 100644
index 0000000..7e1742f
--- /dev/null
+++ b/Wherlog/Controls/SettingsCard.razor.cs
@@ -0,0 +1,72 @@
+using Microsoft.AspNetCore.Components;
+using Microsoft.FluentUI.AspNetCore.Components;
+
+namespace Wherlog.Controls
+{
+ public partial class SettingsCard : FluentComponentBase
+ {
+ ///
+ /// Gets or sets the Header.
+ ///
+ [Parameter]
+ public RenderFragment Header { get; set; }
+
+ ///
+ /// Gets or sets the description.
+ ///
+ [Parameter]
+ public RenderFragment Description { get; set; }
+
+ ///
+ /// Gets or sets the icon on the left.
+ ///
+ [Parameter]
+ public RenderFragment Icon { get; set; }
+
+ ///
+ /// Gets or sets the icon that is shown when IsClickEnabled is set to true.
+ ///
+ [Parameter]
+ public RenderFragment ActionIcon { get; set; }
+
+ ///
+ /// Gets or sets the content of a ContentControl.
+ ///
+ [Parameter]
+ public RenderFragment ActionContent { get; set; }
+
+ ///
+ /// Gets or sets the tooltip of the ActionIcon.
+ ///
+ [Parameter]
+ public string ActionIconToolTip { get; set; } = "More";
+
+ ///
+ /// Gets or sets if the card can be clicked.
+ ///
+ [Parameter]
+ public bool IsClickEnabled { get; set; }
+
+ ///
+ /// Gets or sets the alignment of the Content.
+ ///
+ [Parameter]
+ public ContentAlignment ContentAlignment { get; set; }
+ }
+
+ public enum ContentAlignment
+ {
+ ///
+ /// The Content is aligned to the right. Default state.
+ ///
+ Right,
+ ///
+ /// The Content is left-aligned while the Header, HeaderIcon and Description are collapsed. This is commonly used for Content types such as CheckBoxes, RadioButtons and custom layouts.
+ ///
+ Left,
+ ///
+ /// The Content is vertically aligned.
+ ///
+ Vertical
+ }
+}
diff --git a/Wherlog/Controls/SettingsCard.razor.css b/Wherlog/Controls/SettingsCard.razor.css
new file mode 100644
index 0000000..38ebd78
--- /dev/null
+++ b/Wherlog/Controls/SettingsCard.razor.css
@@ -0,0 +1,31 @@
+* {
+ --settings-card-border-thickness: 1px;
+ --settings-card-padding: 16px;
+ --settings-card-description-font-size: 12px;
+ --settings-card-header-icon-max-size: 20px;
+ --settings-card-content-min-width: 240px;
+ --settings-card-header-icon-margin: 0px 20px 0px 2px;
+}
+
+::deep div.root-grid {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+::deep div.icon-holder {
+ max-width: var(--settings-card-header-icon-max-size);
+ max-height: var(--settings-card-header-icon-max-size);
+ margin: var(--settings-card-header-icon-margin);
+}
+
+::deep div.header-panel {
+ display: flex;
+ flex-direction: column;
+ margin: 0px 24px 0px 0px;
+}
+
+::deep span.description {
+ font-size: var(--settings-card-description-font-size);
+ color: var(--neutral-fill-strong-hover);
+}
diff --git a/Wherlog/Models/Post/Interfaces.cs b/Wherlog/Models/Post/Interfaces.cs
index 276faea..93128e1 100644
--- a/Wherlog/Models/Post/Interfaces.cs
+++ b/Wherlog/Models/Post/Interfaces.cs
@@ -32,9 +32,6 @@ public interface IPost
[JsonPropertyName("tags")]
public CateModel[] Tags { get; }
-
- [JsonPropertyName("api")]
- public string Api { get; }
}
public interface IPost
: IInfo where TInfo : IInfo
diff --git a/Wherlog/Models/Post/PostDetailModel.cs b/Wherlog/Models/Post/PostDetailModel.cs
index 16a0fc0..4d33f64 100644
--- a/Wherlog/Models/Post/PostDetailModel.cs
+++ b/Wherlog/Models/Post/PostDetailModel.cs
@@ -4,7 +4,7 @@
namespace Wherlog.Models.Post
{
- public sealed class PostDetailModel : IPost, IApi, IDetail
+ public sealed class PostDetailModel : IPost, IDetail
{
[JsonPropertyName("title")]
public string Title { get; init; }
@@ -41,8 +41,5 @@ public sealed class PostDetailModel : IPost, IApi, IDetail
[JsonPropertyName("tags")]
public CateModel[] Tags { get; init; }
-
- [JsonPropertyName("api")]
- public string Api { get; init; }
}
}
diff --git a/Wherlog/Pages/SettingsPage.razor b/Wherlog/Pages/SettingsPage.razor
index 4e3032a..60110d6 100644
--- a/Wherlog/Pages/SettingsPage.razor
+++ b/Wherlog/Pages/SettingsPage.razor
@@ -11,39 +11,75 @@
@Loc["TitleText"]
-
+
Theme
-
+
+
+
+
+
+ Set the theme of this App.
+
+
+
+
-
+
Language
-
-
- @context.DisplayName
-
-
+
+
+
+
+
+ Select language and restart to change language.
+
+
+
+ @context.DisplayName
+
+
+
+
-
-
Navigate
-
-
- 前往
-
+
+
Others
+
+
+
+
+
+ Navigate to target url.
+
+
+
+ 前往
+
+
+
-
+
Others
-
- Reset
-
+
+
+
+
+
+ Reset settings of this application.
+
+
+ Reset
+
+
+
diff --git a/Wherlog/Wherlog.csproj b/Wherlog/Wherlog.csproj
index 35d50d0..2c22d16 100644
--- a/Wherlog/Wherlog.csproj
+++ b/Wherlog/Wherlog.csproj
@@ -6,7 +6,6 @@
魔法薇ㄦ的书馆网页客户端
git
https://github.com/wherewhere/wherlog
-
service-worker-assets.js
0.0.1
@@ -14,6 +13,7 @@
true
zh-CN
latest
+
service-worker-assets.js
net8.0