diff --git a/internal/views/account.templ b/internal/views/account.templ
index 00d4a99..5b51190 100644
--- a/internal/views/account.templ
+++ b/internal/views/account.templ
@@ -89,222 +89,8 @@ templ (v Account) Profile() {
}
}
-templ (v Account) Settings(section string, settings any) {
- @Page(v.Nav()) {
-
-
-
-
-
- switch section {
- case "profile":
- @v.EditForm()
- case "privacy":
- @v.PrivacyForm(settings.(models.PrivacySettings))
- case "avatar":
- @v.AvatarForm()
- case "appearance":
- @v.AppearanceForm(settings.(models.AppearanceSettings))
- case "clubs":
- @v.MembershipOverview(models.AccountKindClub)
- case "organizations":
- @v.MembershipOverview(models.AccountKindOrganization)
- }
-
-
-
- switch section {
- case "profile":
-
- View Public Profile
-
- case "privacy":
- @v.PrivacyContext()
- case "organizations":
- @v.MembershipContext(models.AccountKindOrganization)
- case "clubs":
- @v.MembershipContext(models.AccountKindClub)
- }
-
-
- }
-}
-
-templ (v Account) PrivacyForm(val models.PrivacySettings) {
- @Form("privacy", FormAttrs{
- Action: named.URLFor("settings-save", "privacy"),
-
- }) {
- @InputRadioGroup("location", InputAttrs{
- Label: "Show location on profile?",
- Values: []InputValue{
- {Value: "public", Label: "Yes", HelpText: "Anyone can see your location"},
- {Value: "protected", Label: "Users Only", HelpText: "Only users with an account will see your location"},
- {Value: "private", Label: "No", HelpText: "Your location won't be directly visible on your profile"},
- },
- Value: val.Location,
- HelpText: "Control how your location is shared.",
- })
- @InputRadioGroup("visibility", InputAttrs{
- Label: "Profile visiblity",
- Values: []InputValue{
- {Value: "public", Label: "Yes", HelpText: "Anyone can see your profile"},
- {Value: "protected", Label: "Users Only", HelpText: "Only users with an account can see your profile"},
- {Value: "private", Label: "Private", HelpText: "Don't show up in any search results"},
- },
- Value: val.Visiblility,
- HelpText: "Manage overall profile visiblity.",
- })
- @InputSubmit(InputAttrs{
- Value: "Save",
- })
- }
-}
-
-templ (v Account) AppearanceForm(val models.AppearanceSettings) {
- @Form("appearance", FormAttrs{
- Action: named.URLFor("settings-save", "appearance"),
- }) {
- @InputRadioGroup("activity-graphs", InputAttrs{
- Label: "Activity Graph",
- Values: []InputValue{
- {Value: "on", Label: "Enable activity graphs", HelpText: "Show the activity graph on your profile?"},
- {Value: "off", Label: "Disable Activity Graph", HelpText: "Show the activity graph on your profile?"},
- },
- Value: val.ActivityGraphs,
- })
- @InputSubmit(InputAttrs{
- Value: "Save",
- })
- }
-}
-
-templ (v Account) PrivacyContext() {
-
-
A note about privacy
-
- It's important to remember that, while we will do our best to enforce
- these privacy settings, your callsign is an identifier with the FCC or
- other government agency.
-
-
- Government records are generally publicly available and
- much of the information will be accessible according to the laws in your country.
-
-
-}
-
-templ (v Account) AvatarForm() {
-
- Your avatar is managed with gravatar, a service that links your
- email address with an image of your choosing.
-
-}
-
-templ (v Account) MembershipOverview(kind models.AccountKind) {
- if len(v.Memberships) == 0 {
- Looks like you don't have any memberships yet.
- Wanna join a club?
-