1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-22 03:21:10 +00:00
This commit is contained in:
Felix Ableitner 2024-11-12 23:40:17 +01:00
parent 21c77c2f24
commit 0e7a45306d
3 changed files with 26 additions and 10 deletions

View file

@ -66,7 +66,12 @@ pub fn Nav() -> impl IntoView {
<A href="/article/create">"Create Article"</A> <A href="/article/create">"Create Article"</A>
</li> </li>
<li> <li>
<A href="/notifications">"Notifications "<span class="indicator-item indicator-end badge badge-neutral">{notification_count}</span></A> <A href="/notifications">
"Notifications "
<span class="indicator-item indicator-end badge badge-neutral">
{notification_count}
</span>
</A>
</li> </li>
</Show> </Show>
<li> <li>

View file

@ -28,16 +28,25 @@ pub fn Notifications() -> impl IntoView {
.map(|n| { .map(|n| {
use Notification::*; use Notification::*;
let (link, title) = match n { let (link, title) = match n {
EditConflict(c) => (format!( EditConflict(c) => {
"{}/edit/{}", (
article_link(&c.article), format!("{}/edit/{}", article_link(&c.article), c.id.0),
c.id.0) format!(
, format!("Conflict: {} - {}", article_title(&c.article), c.summary)), "Conflict: {} - {}",
ArticleApprovalRequired(a) => (article_link(&a), format!("Approval required: {}", a.title)), article_title(&c.article),
c.summary,
),
)
}
ArticleApprovalRequired(a) => {
(
article_link(&a),
format!("Approval required: {}", a.title),
)
}
}; };
// TODO: need buttons to approve/reject new article, also makes sense to discard edit conflict
view! { view! {
// TODO: need buttons to approve/reject new article, also makes sense to discard edit conflict
<li> <li>
<a class="link text-lg" href=link> <a class="link text-lg" href=link>
{title} {title}

View file

@ -38,7 +38,9 @@ pub fn UserProfile() -> impl IntoView {
.get() .get()
.map(|person: DbPerson| { .map(|person: DbPerson| {
view! { view! {
<h1 class="text-4xl font-bold font-serif my-6 grow flex-auto">{user_title(&person)}</h1> <h1 class="text-4xl font-bold font-serif my-6 grow flex-auto">
{user_title(&person)}
</h1>
<p>TODO: create actual user profile</p> <p>TODO: create actual user profile</p>
} }
}) })