Monorepo for Tangled tangled.org

appview/settings: add account management UI for tngl.sh users #1151

merged opened by oyster.cafe targeting master from appview-acc-mgmt-ui

tngl.sh users should be able to:

  • change handle
  • deactivate account
  • delete account
  • change password
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mgu4bwsml322
+2 -24
Interdiff #0 โ†’ #1
appview/config/config.go

This file has not been changed.

+1 -7
appview/knots/knots.go
··· 71 k.Pages.Knots(w, pages.KnotsParams{ 72 LoggedInUser: user, 73 Registrations: registrations, 74 - IsTnglSh: k.isTnglShUser(user.Pds()), 75 }) 76 } 77 ··· 134 Members: members, 135 Repos: repoMap, 136 IsOwner: true, 137 - IsTnglSh: k.isTnglShUser(user.Pds()), 138 }) 139 } 140 ··· 681 682 // ok 683 k.Pages.HxRefresh(w) 684 - } 685 - 686 - func (k *Knots) isTnglShUser(pdsHost string) bool { 687 - return k.Config.Pds.IsTnglShUser(pdsHost) 688 - }
··· 71 k.Pages.Knots(w, pages.KnotsParams{ 72 LoggedInUser: user, 73 Registrations: registrations, 74 }) 75 } 76 ··· 133 Members: members, 134 Repos: repoMap, 135 IsOwner: true, 136 }) 137 } 138 ··· 679 680 // ok 681 k.Pages.HxRefresh(w) 682 + }
appview/oauth/handler.go

This file has not been changed.

appview/oauth/oauth.go

This file has not been changed.

appview/pages/htmx.go

This file has not been changed.

-7
appview/pages/pages.go
··· 406 type UserKeysSettingsParams struct { 407 LoggedInUser *oauth.MultiAccountUser 408 PubKeys []models.PublicKey 409 - IsTnglSh bool 410 Tab string 411 } 412 ··· 418 type UserEmailsSettingsParams struct { 419 LoggedInUser *oauth.MultiAccountUser 420 Emails []models.Email 421 - IsTnglSh bool 422 Tab string 423 } 424 ··· 430 type UserNotificationSettingsParams struct { 431 LoggedInUser *oauth.MultiAccountUser 432 Preferences *models.NotificationPreferences 433 - IsTnglSh bool 434 Tab string 435 } 436 ··· 465 type KnotsParams struct { 466 LoggedInUser *oauth.MultiAccountUser 467 Registrations []models.Registration 468 - IsTnglSh bool 469 Tab string 470 } 471 ··· 480 Members []string 481 Repos map[string][]models.Repo 482 IsOwner bool 483 - IsTnglSh bool 484 Tab string 485 } 486 ··· 499 type SpindlesParams struct { 500 LoggedInUser *oauth.MultiAccountUser 501 Spindles []models.Spindle 502 - IsTnglSh bool 503 Tab string 504 } 505 ··· 522 Spindle models.Spindle 523 Members []string 524 Repos map[string][]models.Repo 525 - IsTnglSh bool 526 Tab string 527 } 528
··· 406 type UserKeysSettingsParams struct { 407 LoggedInUser *oauth.MultiAccountUser 408 PubKeys []models.PublicKey 409 Tab string 410 } 411 ··· 417 type UserEmailsSettingsParams struct { 418 LoggedInUser *oauth.MultiAccountUser 419 Emails []models.Email 420 Tab string 421 } 422 ··· 428 type UserNotificationSettingsParams struct { 429 LoggedInUser *oauth.MultiAccountUser 430 Preferences *models.NotificationPreferences 431 Tab string 432 } 433 ··· 462 type KnotsParams struct { 463 LoggedInUser *oauth.MultiAccountUser 464 Registrations []models.Registration 465 Tab string 466 } 467 ··· 476 Members []string 477 Repos map[string][]models.Repo 478 IsOwner bool 479 Tab string 480 } 481 ··· 494 type SpindlesParams struct { 495 LoggedInUser *oauth.MultiAccountUser 496 Spindles []models.Spindle 497 Tab string 498 } 499 ··· 516 Spindle models.Spindle 517 Members []string 518 Repos map[string][]models.Repo 519 Tab string 520 } 521
appview/pages/templates/user/settings/profile.html

This file has not been changed.

appview/settings/danger.go

This file has not been changed.

-3
appview/settings/settings.go
··· 278 s.Pages.UserNotificationSettings(w, pages.UserNotificationSettingsParams{ 279 LoggedInUser: user, 280 Preferences: prefs, 281 - IsTnglSh: s.isTnglShUser(user.Pds()), 282 }) 283 } 284 ··· 319 s.Pages.UserKeysSettings(w, pages.UserKeysSettingsParams{ 320 LoggedInUser: user, 321 PubKeys: pubKeys, 322 - IsTnglSh: s.isTnglShUser(user.Pds()), 323 }) 324 } 325 ··· 333 s.Pages.UserEmailsSettings(w, pages.UserEmailsSettingsParams{ 334 LoggedInUser: user, 335 Emails: emails, 336 - IsTnglSh: s.isTnglShUser(user.Pds()), 337 }) 338 } 339
··· 278 s.Pages.UserNotificationSettings(w, pages.UserNotificationSettingsParams{ 279 LoggedInUser: user, 280 Preferences: prefs, 281 }) 282 } 283 ··· 318 s.Pages.UserKeysSettings(w, pages.UserKeysSettingsParams{ 319 LoggedInUser: user, 320 PubKeys: pubKeys, 321 }) 322 } 323 ··· 331 s.Pages.UserEmailsSettings(w, pages.UserEmailsSettingsParams{ 332 LoggedInUser: user, 333 Emails: emails, 334 }) 335 } 336
+1 -7
appview/spindles/spindles.go
··· 70 s.Pages.Spindles(w, pages.SpindlesParams{ 71 LoggedInUser: user, 72 Spindles: all, 73 - IsTnglSh: s.isTnglShUser(user.Pds()), 74 Tab: "spindles", 75 }) 76 } ··· 130 Spindle: spindle, 131 Members: members, 132 Repos: repoMap, 133 - IsTnglSh: s.isTnglShUser(user.Pds()), 134 Tab: "spindles", 135 }) 136 } ··· 718 719 // ok 720 s.Pages.HxRefresh(w) 721 - } 722 - 723 - func (s *Spindles) isTnglShUser(pdsHost string) bool { 724 - return s.Config.Pds.IsTnglShUser(pdsHost) 725 - }
··· 70 s.Pages.Spindles(w, pages.SpindlesParams{ 71 LoggedInUser: user, 72 Spindles: all, 73 Tab: "spindles", 74 }) 75 } ··· 129 Spindle: spindle, 130 Members: members, 131 Repos: repoMap, 132 Tab: "spindles", 133 }) 134 } ··· 716 717 // ok 718 s.Pages.HxRefresh(w) 719 + }
appview/state/login.go

This file has not been changed.

History

7 rounds 4 comments
sign up or login to add to the discussion
1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 success
expand
expand 0 comments
1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 success
expand
expand 1 comment
  • this can go in pages.go
1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 success
expand
expand 0 comments
1 commit
expand
appview/settings: add account management UI for tngl.sh users
2/3 failed, 1/3 success
expand
expand 3 comments
  • here could you explain what an elevated auth flow is
  • here why not a template here? does this need to be in htmx.go?
  • here do we need this IsTnglSh bool?
  • here are there any indigo bits to achieve this?
  • here we have defined isTnglShUser once here, and another time here

do we need both?

1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 failed
expand
expand 0 comments
1 commit
expand
appview/settings: add account management UI for tngl.sh users
3/3 success
expand
expand 0 comments