aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-21 20:47:30 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-21 20:47:30 +0200
commit539e48e3547040c05a84abc796b1778ab5472a8d (patch)
tree0629898ab932e84a423a63c8004052022452010b /server/src/routes/ui
parentb6139239e35d05621603a2b419bff4c0dc9cdf40 (diff)
downloadjellything-539e48e3547040c05a84abc796b1778ab5472a8d.tar
jellything-539e48e3547040c05a84abc796b1778ab5472a8d.tar.bz2
jellything-539e48e3547040c05a84abc796b1778ab5472a8d.tar.zst
back button only when js
Diffstat (limited to 'server/src/routes/ui')
-rw-r--r--server/src/routes/ui/layout.rs6
-rw-r--r--server/src/routes/ui/node.rs1
-rw-r--r--server/src/routes/ui/player.rs1
3 files changed, 1 insertions, 7 deletions
diff --git a/server/src/routes/ui/layout.rs b/server/src/routes/ui/layout.rs
index 1c47247..cdac09c 100644
--- a/server/src/routes/ui/layout.rs
+++ b/server/src/routes/ui/layout.rs
@@ -27,7 +27,7 @@ use rocket::{
use std::io::Cursor;
markup::define! {
- Layout<'a, Main: Render>(title: String, main: Main, class: Option<&'a str>, session: Option<Session>, show_back: bool) {
+ Layout<'a, Main: Render>(title: String, main: Main, class: Option<&'a str>, session: Option<Session>) {
@markup::doctype()
html {
head {
@@ -37,7 +37,6 @@ markup::define! {
}
body[class=class.unwrap_or("")] {
nav {
- @if *show_back { a[href="javascript:history.back()"] { "<- Back" } } " "
h1 { a[href="/"] { @CONF.brand } } " "
@if let Some(_) = session {
a[href=uri!(r_library_node("library"))] { "My Library" } " "
@@ -80,7 +79,6 @@ pub type DynLayoutPage<'a> = LayoutPage<markup::DynRender<'a>>;
pub struct LayoutPage<T> {
pub title: String,
pub class: Option<&'static str>,
- pub show_back: bool,
pub content: T,
}
@@ -90,7 +88,6 @@ impl Default for LayoutPage<DynRender<'_>> {
class: None,
content: markup::new!(),
title: String::new(),
- show_back: false,
}
}
}
@@ -103,7 +100,6 @@ impl<'r, Main: Render> Responder<'r, 'static> for LayoutPage<Main> {
let session = block_on(req.guard::<Option<Session>>()).unwrap();
let mut out = String::new();
Layout {
- show_back: self.show_back,
main: self.content,
title: self.title,
class: self.class.as_deref(),
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index 773daa4..6256c77 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -72,7 +72,6 @@ pub async fn r_library_node_filter<'a>(
Ok(Either::Left(LayoutPage {
title: node.title.to_string(),
- show_back: true, //- !matches!(node.kind, NodeKind::Collection),
content: markup::new! {
@NodePage { node: &node, id: &id, children: &children, filter: &filter }
},
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs
index 4a636e6..d3a3342 100644
--- a/server/src/routes/ui/player.rs
+++ b/server/src/routes/ui/player.rs
@@ -70,7 +70,6 @@ pub fn r_player<'a>(
}
@conf
},
- show_back: true,
..Default::default()
})
}