use std::sync::OnceLock; use actix_web::{get, HttpResponse, Responder, HttpRequest, Either}; use crate::storage::IStorage; static DESCRIPTOR: OnceLock = OnceLock::new(); #[get("/")] pub async fn decky_index(req: HttpRequest, data: actix_web::web::Data>) -> impl Responder { if req.headers().contains_key("X-Decky-Version") { // a real store request Either::Left(actix_web::web::Redirect::to("/plugins").temporary()) } else { let descriptor = DESCRIPTOR.get_or_init(|| data.descriptor()); Either::Right(HttpResponse::Ok() .insert_header(("Content-Type", "text/html")) .body(format!(r##" Not Decky Store

Not Decky Store

An alternate store implementation for Decky Loader

Maybe one day this page will display plugins in a human readable way...


plugins | version | code | GPL v3.0 | {} "##, descriptor))) } }