update
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-02-16 05:10:18 +01:00
parent 5bee208995
commit f91b4ed6da
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 33 additions and 28 deletions

View file

@ -33,13 +33,12 @@ pub async fn render_page(
// TODO : profile pictures
DropDown(
Avatar("", &user.username).use_initials(),
Column(vec![Link(
DropdownMenu(vec![DropdownMenuEntry(
"/history",
Padding(Text("Video History").medium())
.x(ScreenValue::_4)
.y(ScreenValue::_2),
)
.use_htmx()]),
)]),
)
}))
.no_dropdown(),

View file

@ -3,6 +3,7 @@ use based::request::respond_html;
use based::ui::components::prelude::InfinityScroll;
use based::ui::components::{ColoredSpinner, Shell};
use based::ui::prelude::*;
use based::ui::primitives::div::Center;
use based::{
auth::MaybeUser,
request::{
@ -94,7 +95,7 @@ pub async fn latest_page(
check_private!(conf, user, shell, ctx);
let mut videos: Vec<_> = library
.get_newly_added(24, offset.unwrap_or_default() as i64)
.get_newly_added(21, offset.unwrap_or_default() as i64)
.await;
let has_content = !videos.is_empty();
let video_elements = VerticalVideoGrid(&mut videos).await;
@ -109,7 +110,7 @@ pub async fn latest_page(
ScreenValue::fit,
Margin(InfinityScroll(
ColoredSpinner(Purple::_600),
&format!("/latest?offset={}", offset.unwrap_or_default() + 24),
&format!("/latest?offset={}", offset.unwrap_or_default() + 21),
))
.x(ScreenValue::auto),
)
@ -127,7 +128,7 @@ pub async fn latest_page(
ScreenValue::fit,
Margin(InfinityScroll(
ColoredSpinner(Purple::_600),
&format!("/latest?offset={}", offset.unwrap_or_default() + 24),
&format!("/latest?offset={}", offset.unwrap_or_default() + 21),
))
.x(ScreenValue::auto),
))
@ -171,7 +172,12 @@ pub async fn dir_page(
}
pub async fn is_private_page(shell: &Shell, ctx: RequestContext) -> StringResponse {
page!(shell, ctx, "WatchDogs", Text("This is a private instance"))
page!(
shell,
ctx,
"WatchDogs",
Margin(Center(Text("This is a private instance").bold()._4xl())).top(ScreenValue::_12)
)
}
#[get("/")]

View file

@ -55,9 +55,9 @@ pub async fn watch_page(
Context(Aspect::Video(
Background(
Rounded(
Video().controls().autoplay().width(1080).add_src(
Width(ScreenValue::full, Video().controls().autoplay().width(1080).add_src(
Source(&format!("/video/raw?v={}", video.id), Some("video/mp4".to_string()))
).poster(&format!("/video/thumbnail?v={}", video.id))
).poster(&format!("/video/thumbnail?v={}", video.id)))
).size(Size::Large)
).color(Colors::Black)
))