blob: 792894eac147c570e28901c68d3f28e24677fd7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
pub mod login;
pub mod message;
pub mod node_page;
pub mod props;
pub mod stats;
use crate::{
RenderInfo,
components::{
login::{AccountLogin, AccountLogout, AccountSetPassword},
message::Message,
node_page::NodePage,
},
};
use jellycommon::{jellyobject::Object, *};
use markup::define;
define! {
View<'a>(ri: &'a RenderInfo<'a>, view: Object<'a>) {
@if let Some(message) = view.get(VIEW_MESSAGE) {
@Message { ri, message }
}
@if let Some(nku) = view.get(VIEW_NODE_PAGE) {
@NodePage { ri, nku }
}
@if let Some(()) = view.get(VIEW_ACCOUNT_LOGIN) {
@AccountLogin { ri }
}
@if let Some(()) = view.get(VIEW_ACCOUNT_LOGOUT) {
@AccountLogout{ ri }
}
@if let Some(session) = view.get(VIEW_ACCOUNT_SET_PASSWORD) {
@AccountSetPassword { ri, session }
}
}
}
|