1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-25 20:11:10 +00:00

add headings

This commit is contained in:
Felix Ableitner 2024-02-01 12:23:51 +01:00
parent 90f174bf53
commit 1dc984025a
4 changed files with 12 additions and 5 deletions

View file

@ -20,7 +20,7 @@ use axum::Extension;
use axum::Form; use axum::Form;
use axum::Json; use axum::Json;
use axum_macros::debug_handler; use axum_macros::debug_handler;
use chrono::{Utc}; use chrono::Utc;
use diffy::create_patch; use diffy::create_patch;
/// Create a new article with empty text, and federate it to followers. /// Create a new article with empty text, and federate it to followers.

View file

@ -41,6 +41,7 @@ pub fn CreateArticle() -> impl IntoView {
}); });
view! { view! {
<h1>Create new Article</h1>
<Show <Show
when=move || create_response.get().is_some() when=move || create_response.get().is_some()
fallback=move || { fallback=move || {

View file

@ -19,6 +19,7 @@ pub fn ListArticles() -> impl IntoView {
); );
view! { view! {
<h1>Most recently edited Articles</h1>
<Suspense fallback=|| view! { "Loading..." }> <Suspense fallback=|| view! { "Loading..." }>
<fieldset on:input=move |ev| { <fieldset on:input=move |ev| {
let val = ev let val = ev

View file

@ -3,7 +3,9 @@ extern crate ibis_lib;
mod common; mod common;
use crate::common::{TestData, TEST_ARTICLE_DEFAULT_TEXT}; use crate::common::{TestData, TEST_ARTICLE_DEFAULT_TEXT};
use ibis_lib::common::{ArticleView, EditArticleData, ForkArticleData, GetArticleData, ListArticlesData}; use ibis_lib::common::{
ArticleView, EditArticleData, ForkArticleData, GetArticleData, ListArticlesData,
};
use ibis_lib::common::{CreateArticleData, SearchArticleData}; use ibis_lib::common::{CreateArticleData, SearchArticleData};
use ibis_lib::common::{LoginUserData, RegisterUserData}; use ibis_lib::common::{LoginUserData, RegisterUserData};
use ibis_lib::frontend::error::MyResult; use ibis_lib::frontend::error::MyResult;
@ -59,9 +61,12 @@ async fn test_create_read_and_edit_local_article() -> MyResult<()> {
assert_eq!(1, search_res.len()); assert_eq!(1, search_res.len());
assert_eq!(edit_res.article, search_res[0]); assert_eq!(edit_res.article, search_res[0]);
let list_articles = data.alpha.list_articles(ListArticlesData { let list_articles = data
only_local: Some(false), .alpha
}).await?; .list_articles(ListArticlesData {
only_local: Some(false),
})
.await?;
assert_eq!(1, list_articles.len()); assert_eq!(1, list_articles.len());
assert_eq!(edit_res.article, list_articles[0]); assert_eq!(edit_res.article, list_articles[0]);