mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 09:01:09 +00:00
Another run.
This commit is contained in:
parent
804d64f0a2
commit
f35a8d2592
8 changed files with 20 additions and 9 deletions
|
@ -55,6 +55,7 @@ pub fn Nav() -> impl IntoView {
|
|||
set_search_query.update(|v| *v = val);
|
||||
}
|
||||
/>
|
||||
|
||||
<button>Go</button>
|
||||
</form>
|
||||
</li>
|
||||
|
|
|
@ -95,12 +95,14 @@ pub fn ArticleActions() -> impl IntoView {
|
|||
set_new_title.update(|v| *v = val);
|
||||
}
|
||||
/>
|
||||
|
||||
<button
|
||||
disabled=move || new_title.get().is_empty()
|
||||
on:click=move |_| {
|
||||
fork_action.dispatch((article.article.id, new_title.get()))
|
||||
}
|
||||
>
|
||||
|
||||
Fork Article
|
||||
</button>
|
||||
<p>
|
||||
|
|
|
@ -63,7 +63,8 @@ pub fn CreateArticle() -> impl IntoView {
|
|||
let val = event_target_value(&ev);
|
||||
set_text.update(|p| *p = val);
|
||||
}
|
||||
></textarea>
|
||||
>
|
||||
</textarea>
|
||||
<div>
|
||||
<a href="https://commonmark.org/help/" target="blank_">
|
||||
Markdown
|
||||
|
@ -86,6 +87,7 @@ pub fn CreateArticle() -> impl IntoView {
|
|||
set_summary.update(|p| *p = val);
|
||||
}
|
||||
/>
|
||||
|
||||
<button
|
||||
prop:disabled=move || button_is_disabled.get()
|
||||
on:click=move |_| submit_action.dispatch((title.get(), text.get(), summary.get()))
|
||||
|
@ -96,6 +98,7 @@ pub fn CreateArticle() -> impl IntoView {
|
|||
}
|
||||
}
|
||||
>
|
||||
|
||||
<Redirect path=format!("/article/{}", title.get().replace(' ', "_"))/>
|
||||
</Show>
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ pub fn EditArticle() -> impl IntoView {
|
|||
set_summary.update(|p| *p = val);
|
||||
}
|
||||
/>
|
||||
|
||||
<button
|
||||
prop:disabled=move || button_is_disabled.get()
|
||||
on:click=move |_| {
|
||||
|
@ -161,6 +162,7 @@ pub fn EditArticle() -> impl IntoView {
|
|||
))
|
||||
}
|
||||
>
|
||||
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
|
@ -172,6 +174,7 @@ pub fn EditArticle() -> impl IntoView {
|
|||
}
|
||||
}
|
||||
>
|
||||
|
||||
Edit successful!
|
||||
</Show>
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ pub fn ListArticles() -> impl IntoView {
|
|||
articles
|
||||
.get()
|
||||
.map(|a| {
|
||||
a
|
||||
.into_iter()
|
||||
a.into_iter()
|
||||
.map(|a| {
|
||||
view! {
|
||||
<li>
|
||||
|
@ -50,6 +49,7 @@ pub fn ListArticles() -> impl IntoView {
|
|||
.collect::<Vec<_>>()
|
||||
})
|
||||
}}
|
||||
|
||||
</ul>
|
||||
</Suspense>
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ pub fn ReadArticle() -> impl IntoView {
|
|||
<Suspense fallback=|| {
|
||||
view! { "Loading..." }
|
||||
}>
|
||||
|
||||
{
|
||||
let parser = markdown_parser();
|
||||
move || {
|
||||
|
|
|
@ -16,8 +16,7 @@ pub fn Conflicts() -> impl IntoView {
|
|||
conflicts
|
||||
.get()
|
||||
.map(|c| {
|
||||
c
|
||||
.into_iter()
|
||||
c.into_iter()
|
||||
.map(|c| {
|
||||
let link = format!("{}/edit/{}", article_link(&c.article), c.id);
|
||||
view! {
|
||||
|
@ -29,6 +28,7 @@ pub fn Conflicts() -> impl IntoView {
|
|||
.collect::<Vec<_>>()
|
||||
})
|
||||
}}
|
||||
|
||||
</ul>
|
||||
</Suspense>
|
||||
}
|
||||
|
|
|
@ -78,10 +78,11 @@ pub fn Search() -> impl IntoView {
|
|||
}
|
||||
}
|
||||
>
|
||||
|
||||
<ul>
|
||||
|
||||
{// render resolved instance
|
||||
if let Some(instance) = &search_results.instance {
|
||||
// render resolved instance
|
||||
{if let Some(instance) = &search_results.instance {
|
||||
let domain = &instance.domain;
|
||||
vec![
|
||||
view! {
|
||||
|
@ -93,8 +94,8 @@ pub fn Search() -> impl IntoView {
|
|||
} else {
|
||||
vec![]
|
||||
}}
|
||||
{// render articles from resolve/search
|
||||
search_results
|
||||
// render articles from resolve/search
|
||||
{search_results
|
||||
.articles
|
||||
.iter()
|
||||
.map(|a| {
|
||||
|
|
Loading…
Reference in a new issue