From e7febc7c7e9ce606cece0cab5ca8b16e3463cdc9 Mon Sep 17 00:00:00 2001 From: trisua Date: Tue, 8 Jul 2025 15:33:51 -0400 Subject: [PATCH] add: allow direct "atto://" links to work for script tags --- crates/app/src/public/html/littleweb/domain.lisp | 3 ++- crates/app/src/public/html/littleweb/service.lisp | 3 ++- crates/app/src/routes/api/v1/domains.rs | 3 ++- crates/core/src/database/domains.rs | 2 +- crates/core/src/database/services.rs | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/app/src/public/html/littleweb/domain.lisp b/crates/app/src/public/html/littleweb/domain.lisp index 96d2da7..d4bc359 100644 --- a/crates/app/src/public/html/littleweb/domain.lisp +++ b/crates/app/src/public/html/littleweb/domain.lisp @@ -121,8 +121,9 @@ ; data (div ("class" "w-full") - ("style" "max-width: 100%; overflow: auto") + ("style" "max-width: 100%; overflow: auto; min-height: 512px") (table + ("class" "w-full") (thead (tr (th (text "Name")) diff --git a/crates/app/src/public/html/littleweb/service.lisp b/crates/app/src/public/html/littleweb/service.lisp index 8ef12e1..7cd9597 100644 --- a/crates/app/src/public/html/littleweb/service.lisp +++ b/crates/app/src/public/html/littleweb/service.lisp @@ -89,8 +89,9 @@ ; directory browser (div ("class" "w-full") - ("style" "max-width: 100%; overflow: auto") + ("style" "max-width: 100%; overflow: auto; min-height: 512px") (table + ("class" "w-full") (thead (tr (th (text "Name")) diff --git a/crates/app/src/routes/api/v1/domains.rs b/crates/app/src/routes/api/v1/domains.rs index 8cfd9dc..f9949db 100644 --- a/crates/app/src/routes/api/v1/domains.rs +++ b/crates/app/src/routes/api/v1/domains.rs @@ -154,7 +154,8 @@ pub async fn get_file_request( ) } else { f.content - }, + } + .replace("atto://", "/api/v1/net/atto://"), )), None => { return Err(( diff --git a/crates/core/src/database/domains.rs b/crates/core/src/database/domains.rs index 672de1c..737bd5f 100644 --- a/crates/core/src/database/domains.rs +++ b/crates/core/src/database/domains.rs @@ -74,7 +74,7 @@ impl DataManager { Ok(res.unwrap()) } - const MAXIMUM_FREE_DOMAINS: usize = 5; + const MAXIMUM_FREE_DOMAINS: usize = 10; /// Create a new domain in the database. /// diff --git a/crates/core/src/database/services.rs b/crates/core/src/database/services.rs index adadf7e..f28460d 100644 --- a/crates/core/src/database/services.rs +++ b/crates/core/src/database/services.rs @@ -45,7 +45,7 @@ impl DataManager { Ok(res.unwrap()) } - const MAXIMUM_FREE_SERVICES: usize = 5; + const MAXIMUM_FREE_SERVICES: usize = 10; /// Create a new service in the database. ///