♻️ refactor
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-03-04 19:02:05 +01:00
parent 1815d9f461
commit af7b74319a
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 205 additions and 177 deletions

View file

@ -1,7 +1,8 @@
use based::request::{RequestContext, StringResponse};
use based::ui::components::Shell;
use based::ui::components::prelude::Shell;
use based::ui::prelude::*;
use maud::{PreEscaped, Render, html};
use pacco::pkg::package::PackageMetaInfo;
use rocket::{State, get};
use pacco::pkg::{Repository, arch::Architecture};
@ -9,11 +10,12 @@ use pacco::pkg::{Repository, arch::Architecture};
use crate::config::Config;
use crate::routes::ui::arch_card;
#[get("/<repo>?<arch>")]
#[get("/<repo>?<arch>&<sort>")]
pub async fn repo_ui(
repo: &str,
ctx: RequestContext,
arch: Option<&str>,
sort: Option<&str>,
config: &State<Config>,
shell: &State<Shell>,
) -> StringResponse {
@ -27,6 +29,8 @@ pub async fn repo_ui(
repo.list_pkg()
};
// TODO : sortable pkg list
// Repository name and architectures
let repo_info = Margin(
Flex(