aboutsummaryrefslogtreecommitdiff
path: root/server/src/ui/account
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-25 23:32:53 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-25 23:32:53 +0100
commit783d3598753bf84756296a2016e5dab30300519b (patch)
treef7eaf276b65de8aab10db21d27e534f775d83167 /server/src/ui/account
parent5075aede44cb8ab2df10e6debba38483e8d11e96 (diff)
downloadjellything-783d3598753bf84756296a2016e5dab30300519b.tar
jellything-783d3598753bf84756296a2016e5dab30300519b.tar.bz2
jellything-783d3598753bf84756296a2016e5dab30300519b.tar.zst
work on login
Diffstat (limited to 'server/src/ui/account')
-rw-r--r--server/src/ui/account/mod.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/server/src/ui/account/mod.rs b/server/src/ui/account/mod.rs
index 429b70a..ec8bd49 100644
--- a/server/src/ui/account/mod.rs
+++ b/server/src/ui/account/mod.rs
@@ -3,12 +3,17 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
-pub mod settings;
+// pub mod settings;
use super::error::MyError;
-use crate::ui::{error::MyResult, home::rocket_uri_macro_r_home};
+use crate::{
+ request_info::RequestInfo,
+ ui::{error::MyResult, home::rocket_uri_macro_r_home},
+};
use anyhow::anyhow;
+use jellycommon::{VIEW_ACCOUNT_LOGIN, jellyobject::Object};
use jellyimport::is_importing;
+use jellyui::render_view;
use rocket::{
FromForm,
form::{Contextual, Form},
@@ -30,16 +35,9 @@ pub struct RegisterForm {
}
#[get("/account/register")]
-pub async fn r_account_register(lang: AcceptLanguage) -> RawHtml<String> {
- let AcceptLanguage(lang) = lang;
- RawHtml(render_page(
- &AccountRegister { lang: &lang },
- RenderInfo {
- importing: false,
- session: None,
- lang,
- },
- ))
+pub async fn r_account_register(ri: RequestInfo<'_>) -> RawHtml<String> {
+ let ob = Object::EMPTY.insert(VIEW_ACCOUNT_LOGIN, ());
+ RawHtml(render_view(ri.render_info(), ob.as_object()))
}
#[derive(FromForm, Serialize, Deserialize)]