28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
@use crate::{templates::{layouts::home, profiles::view}, profiles::Profile};
|
|
@use hyaenidae_accounts::LogoutState;
|
|
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title}, Button, Card};
|
|
|
|
@(profiles: &[Profile], logout: LogoutState)
|
|
|
|
@:home("Switch Profile", "Select the profile you wish to use", &Some(logout), {}, {
|
|
@for profile in profiles {
|
|
@:card(&Card::full_width().classes(&["account-page"]), {
|
|
@:view("card-top", profile)
|
|
@:card_body({
|
|
<form method="POST" action="/profiles/change">
|
|
<input type="hidden" name="profile_id" value="@profile.id()" />
|
|
@:button_group(&[&Button::primary(&format!("Select {}", profile.name()))])
|
|
</form>
|
|
})
|
|
})
|
|
}
|
|
@:card(&Card::full_width().classes(&["account-page"]), {
|
|
@:card_title({ Create a New Profile })
|
|
@:card_body({
|
|
@:button_group(&[
|
|
Button::primary_outline("Create").href("/profiles/create/handle"),
|
|
])
|
|
})
|
|
})
|
|
})
|