mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 10:14:13 +02:00
hide download/view/chat buttons if the demo is delete/there is no chat
This commit is contained in:
parent
3e3804181c
commit
89eb98529b
1 changed files with 15 additions and 11 deletions
|
|
@ -101,17 +101,21 @@ impl Page for DemoPage {
|
||||||
span.time { (self.demo.duration()) }
|
span.time { (self.demo.duration()) }
|
||||||
}
|
}
|
||||||
p.demo-download {
|
p.demo-download {
|
||||||
a.button.button-primary href = (self.demo.url) download = (self.demo.name) rel = "nofollow" { "Download" }
|
@if !self.demo.url.is_empty() {
|
||||||
a.button href = (self.demo.viewer_url()) rel = "nofollow" { "View" }
|
a.button.button-primary href = (self.demo.url) download = (self.demo.name) rel = "nofollow" { "Download" }
|
||||||
details.chat {
|
a.button href = (self.demo.viewer_url()) rel = "nofollow" { "View" }
|
||||||
summary.button.button-tertiary { "Toggle Chat" }
|
}
|
||||||
div {
|
@if !self.demo.chat.is_empty() {
|
||||||
table.chat {
|
details.chat {
|
||||||
@for chat in &self.demo.chat {
|
summary.button.button-tertiary { "Toggle Chat" }
|
||||||
tr {
|
div {
|
||||||
td.user { (chat.from) }
|
table.chat {
|
||||||
td.message { (chat.text) }
|
@for chat in &self.demo.chat {
|
||||||
td.duration { (chat.time()) }
|
tr {
|
||||||
|
td.user { (chat.from) }
|
||||||
|
td.message { (chat.text) }
|
||||||
|
td.duration { (chat.time()) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue