-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve post body rendering on Web UI (#106)
Previously, the "Rendered" view was parsed from the raw XML feed on the front-end. The logic on determining which field to show as posts' bodies is arbitrary. Since #100, I changed the logic to recognize more post body types. However, such change was not reflected on the Web UI. This PR updates the Web UI to show the expected body content. Besides, I made some visual tweaks to the Rendered view to show more information including post's publication date, feed's description, etc. In addition, The status bar will now show the number of posts on successful fetches.
- Loading branch information
Showing
5 changed files
with
179 additions
and
76 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use chrono::{DateTime, FixedOffset}; | ||
use serde::Serialize; | ||
|
||
#[derive(Debug, Serialize)] | ||
pub struct FeedPreview { | ||
pub title: String, | ||
pub link: String, | ||
pub description: Option<String>, | ||
pub posts: Vec<PostPreview>, | ||
} | ||
|
||
#[derive(Debug, Serialize)] | ||
pub struct PostPreview { | ||
pub title: String, | ||
pub author: Option<String>, | ||
pub link: String, | ||
pub body: Option<String>, | ||
pub date: Option<DateTime<FixedOffset>>, | ||
} |
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