diff --git a/src/not_decky/index.rs b/src/not_decky/index.rs index 521a040..5da060a 100644 --- a/src/not_decky/index.rs +++ b/src/not_decky/index.rs @@ -1,6 +1,36 @@ -use actix_web::{get, HttpResponse, Responder}; +use actix_web::{get, HttpResponse, Responder, HttpRequest, Either}; #[get("/")] -pub async fn decky_index() -> impl Responder { - HttpResponse::Ok().body("TODO") +pub async fn decky_index(req: HttpRequest) -> impl Responder { + if req.headers().contains_key("X-Decky-Version") { + // a real store request + Either::Left(actix_web::web::Redirect::to("/plugins").temporary()) + } else { + Either::Right(HttpResponse::Ok() + .insert_header(("Content-Type", "text/html")) + .body(r##" + + + + Not Decky Store + + + + + + + + + + +

Not Decky Store

+

An alternate store implementation for Decky Loader

+

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

+
+ plugins + | code + | GPL v3.0 + +"##)) + } }