diff --git a/land-server/src/server/dash/manage.rs b/land-server/src/server/dash/manage.rs index 6d78e0d1..b56eed0c 100644 --- a/land-server/src/server/dash/manage.rs +++ b/land-server/src/server/dash/manage.rs @@ -87,10 +87,10 @@ pub async fn options( Ok(( csrf, RenderHtml( - "manage.hbs", + "manage/options.hbs", engine, Vars { - page: PageVars::new("Manage", "/manage", "manage"), + page: PageVars::new("Manage Options", "/manage/options", "manage"), user, csrf_token, tokens, @@ -170,3 +170,32 @@ pub async fn update_prom_env( land_kernel::prom::set_env(prom_env).await?; Ok(redirect_response("/settings/manage/options")) } + +/// projects is a handler for GET /manage/projects +pub async fn projects( + csrf: CsrfToken, + Extension(user): Extension, + engine: TemplateEngine, +) -> Result { + #[derive(Serialize)] + struct Vars { + page: PageVars, + user: SessionUser, + csrf_token: String, + } + let csrf_token = csrf.authenticity_token()?; + + Ok(( + csrf, + RenderHtml( + "manage/projects.hbs", + engine, + Vars { + page: PageVars::new("Manage Projects", "/manage/projects", "manage"), + user, + csrf_token, + }, + ), + ) + .into_response()) +} diff --git a/land-server/src/server/dash/mod.rs b/land-server/src/server/dash/mod.rs index 21cd0077..4a4d37b9 100644 --- a/land-server/src/server/dash/mod.rs +++ b/land-server/src/server/dash/mod.rs @@ -83,6 +83,7 @@ pub fn router(assets_dir: &str) -> Result { "/settings/manage/update-prom-env", post(manage::update_prom_env), ) + .route("/settings/manage/projects", get(manage::projects)) .nest_service("/static", ServeDir::new(static_assets_dir)) .layer(CsrfLayer::new(config)) .with_state(Engine::from(hbs)) diff --git a/land-server/tpls/manage.hbs b/land-server/tpls/manage/options.hbs similarity index 98% rename from land-server/tpls/manage.hbs rename to land-server/tpls/manage/options.hbs index 4fa7950e..60c0df98 100644 --- a/land-server/tpls/manage.hbs +++ b/land-server/tpls/manage/options.hbs @@ -9,7 +9,8 @@ {{> partials/nav.hbs}}
diff --git a/land-server/tpls/manage/projects.hbs b/land-server/tpls/manage/projects.hbs new file mode 100644 index 00000000..7b25de62 --- /dev/null +++ b/land-server/tpls/manage/projects.hbs @@ -0,0 +1,76 @@ + + + + + {{> partials/head.hbs}} + + + + {{> partials/nav.hbs}} +
+ +
+
+
+
Projects
+

All projects.

+
+
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
NameLangUserURLTrafficUpdatedOps
+

+ prize-gilt-19 +

+

via playground

+
jsFuXiaoHei + prize-gilt-19.127-0-0-1.nip.io + + 1 week + ago + + Redeploy + Forbidden +
+
+
+ {{> partials/footer.hbs}} + + + \ No newline at end of file