Skip to content

Commit

Permalink
Fix changelog no_link
Browse files Browse the repository at this point in the history
  • Loading branch information
Celeo committed Oct 16, 2024
1 parent 3e2102f commit 4ac4945
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vzdv-site/src/endpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ async fn page_feedback_form_post(
Ok(Redirect::to("/feedback"))
}

async fn page_changelog(State(state): State<Arc<AppState>>) -> Result<Html<String>, AppError> {
async fn page_changelog(
State(state): State<Arc<AppState>>,
session: Session,
) -> Result<Html<String>, AppError> {
let user_info: Option<UserInfo> = session.get(SESSION_USER_INFO_KEY).await?;
let template = state.templates.get_template("changelog")?;
let rendered = template.render(context! { no_links => true })?;
let rendered = template.render(context! { user_info })?;
Ok(Html(rendered))
}

Expand Down
11 changes: 11 additions & 0 deletions vzdv-site/templates/changelog.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@

<hr>

<div class="card shadow mb-3">
<div class="card-body">
<h5 class="card-title">2024-10-16</h5>
<div class="card-text">
<ul>
<li>Fix top-nav not showing on changelog page</li>
</ul>
</div>
</div>
</div>

<div class="card shadow mb-3">
<div class="card-body">
<h5 class="card-title">2024-10-14</h5>
Expand Down

0 comments on commit 4ac4945

Please sign in to comment.