add: ProfileStyle products
This commit is contained in:
parent
077e9252e3
commit
95cb889080
19 changed files with 525 additions and 54 deletions
|
@ -232,6 +232,7 @@ pub fn profile_context(
|
|||
user: &Option<User>,
|
||||
profile: &User,
|
||||
communities: &Vec<Community>,
|
||||
applied_configurations: Vec<String>,
|
||||
is_self: bool,
|
||||
is_following: bool,
|
||||
is_following_you: bool,
|
||||
|
@ -244,6 +245,7 @@ pub fn profile_context(
|
|||
context.insert("is_following_you", &is_following_you);
|
||||
context.insert("is_blocking", &is_blocking);
|
||||
context.insert("warning_hash", &hash(profile.settings.warning.clone()));
|
||||
context.insert("applied_configurations", &applied_configurations);
|
||||
|
||||
context.insert(
|
||||
"is_supporter",
|
||||
|
@ -376,6 +378,10 @@ pub async fn posts_request(
|
|||
&user,
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -492,6 +498,10 @@ pub async fn replies_request(
|
|||
&user,
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -604,6 +614,10 @@ pub async fn media_request(
|
|||
&user,
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -690,9 +704,13 @@ pub async fn shop_request(
|
|||
context.insert("page", &props.page);
|
||||
profile_context(
|
||||
&mut context,
|
||||
&Some(user),
|
||||
&Some(user.clone()),
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &Some(user)).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -784,9 +802,13 @@ pub async fn outbox_request(
|
|||
context.insert("page", &props.page);
|
||||
profile_context(
|
||||
&mut context,
|
||||
&Some(user),
|
||||
&Some(user.clone()),
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &Some(user)).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -896,6 +918,10 @@ pub async fn following_request(
|
|||
&user,
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
@ -1005,6 +1031,10 @@ pub async fn followers_request(
|
|||
&user,
|
||||
&other_user,
|
||||
&communities,
|
||||
match data.0.get_applied_configurations(&other_user).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
is_self,
|
||||
is_following,
|
||||
is_following_you,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue