@use crate::{templates::{layouts::home, profiles::{banner, icon, view}}, profiles::ProfileState}; @use hyaenidae_accounts::LogoutState; @use hyaenidae_toolkit::{templates::{button, button_group, card, card_body, card_title, file_input, text_input, statics::{button_js, file_input_js}}, Button, Card}; @(state: &ProfileState, logout: LogoutState) @:home("Profile Settings", &format!("{}'s profile", state.profile.name()), &Some(logout), { }, { @:view("standalone account-page", &state.profile) @:card(&Card::full_width().classes(&["account-page"]), { @:card_title({ Update Profile }) @:card_body({

Update Bio

Update the name that appears by your posts and on the top of your profile, and the description that appears on your profile page.

@:text_input(&state.display_name) @:text_input(&state.description)
@:button_group(&[&Button::primary("Save")])
}) @:card_body({
@if let Some(error) = &state.icon_error {

@error

}
@if let Some(key) = state.profile.icon_key() {
@:icon(key, state.profile.name())
} else {

No icon set

}

New Icon

This icon appears at the top of your profile, and next to any submissions or comments you create

@:file_input(&state.icon) @:button(&Button::primary("Save"))
}) @:card_body({
@if let Some(error) = &state.banner_error {

@error

}
@if let Some(key) = state.profile.banner_key() {
@:banner(key, state.profile.name())
} else {

No banner set

}

New Banner

This banner appears at the top of your profile on the profile page

@:file_input(&state.banner) @:button(&Button::primary("Save"))
}) @:card_body({
@if let Some(error) = &state.login_required_error {

@error

}

Require Login

Choose whether your profile is visible to everyone, or only logged-in users.

@:button_group(&[&Button::primary("Save")])
}) }) })