htmx by default (#3145)

* htmx by default

* restore the webmanifest

* fixing unused import

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
This commit is contained in:
Firstyear 2024-10-26 11:44:00 +10:00 committed by GitHub
parent b7e682c43f
commit b0824fef18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 1 deletions

View file

@ -16,6 +16,7 @@ test = true
doctest = false doctest = false
[features] [features]
default = ["ui_htmx"]
ui_htmx = [] ui_htmx = []
[dependencies] [dependencies]

View file

@ -280,6 +280,7 @@ pub async fn create_https_server(
.layer(middleware::compression::new()) .layer(middleware::compression::new())
.layer(from_fn(middleware::caching::cache_me_short)) .layer(from_fn(middleware::caching::cache_me_short))
.route("/", get(|| async { Redirect::to("/ui") })) .route("/", get(|| async { Redirect::to("/ui") }))
.route("/manifest.webmanifest", get(manifest::manifest)) // skip_route_check
.nest("/ui", views::view_router()) .nest("/ui", views::view_router())
} else { } else {
Router::new() Router::new()

View file

@ -1,6 +1,5 @@
use kanidm_client::{ClientError, KanidmClient}; use kanidm_client::{ClientError, KanidmClient};
use kanidm_proto::constants::ATTR_DESCRIPTION; use kanidm_proto::constants::ATTR_DESCRIPTION;
use kanidmd_lib::idm::group::Group;
use kanidmd_testkit::{create_user, ADMIN_TEST_PASSWORD, ADMIN_TEST_USER}; use kanidmd_testkit::{create_user, ADMIN_TEST_PASSWORD, ADMIN_TEST_USER};
use serde_json::Value; use serde_json::Value;