1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-21 21:11:09 +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>
</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>
</Show>
<li>

View file

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

View file

@ -38,7 +38,9 @@ pub fn UserProfile() -> impl IntoView {
.get()
.map(|person: DbPerson| {
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>
}
})