feat: add visible flag for works

This commit is contained in:
kdletters
2026-05-27 19:30:10 +08:00
parent a7bba70ca5
commit 8e96c8a67c
29 changed files with 198 additions and 12 deletions

View File

@@ -20,6 +20,7 @@ pub fn jump_hop_gallery_view(ctx: &AnonymousViewContext) -> Vec<JumpHopGalleryVi
.jump_hop_work_profile()
.by_jump_hop_work_publication_status()
.filter(JUMP_HOP_PUBLICATION_PUBLISHED)
.filter(|row| row.visible)
.filter_map(|row| match build_gallery_view_row(&row) {
Ok(item) => Some(item),
Err(error) => {
@@ -401,6 +402,7 @@ fn compile_jump_hop_draft_tx(
play_count: 0,
updated_at: compiled_at,
published_at: None,
visible: true,
};
upsert_work(ctx, row);
replace_session(
@@ -1163,6 +1165,7 @@ fn clone_work(row: &JumpHopWorkProfileRow) -> JumpHopWorkProfileRow {
play_count: row.play_count,
updated_at: row.updated_at,
published_at: row.published_at,
visible: row.visible,
}
}