mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 03:21:10 +00:00
format
This commit is contained in:
parent
21c77c2f24
commit
0e7a45306d
3 changed files with 26 additions and 10 deletions
|
@ -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>
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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>
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue