Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add delete account frontend #532

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tushar-saxena-yral
Copy link
Contributor

@tushar-saxena-yral tushar-saxena-yral commented Nov 25, 2024

Closes yral-dapp/hot-or-not-backend-canister#429

  • Create account and help page
  • Move TnC and Privacy Policy and logout
  • Add delete account option
  • Confirming normal delete logs the user out
  • Perma delete is not implemented
  • There's purposeful duplication in styling, will refactor after ui is validated

Copy link
Contributor

@rupansh-sekar-yral rupansh-sekar-yral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor change

let show_confirm_perma_delete_modal = create_rw_signal(false);

view! {
<ShadowOverlay show=show_confirm_delete_modal>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the delete modal to a separate component so the AccountHelp component is easier to read

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aye, on it

view! {
<ShadowOverlay show=show_confirm_delete_modal>
<ShadowOverlay show=show>
<div class="flex flex-col gap-4 p-6 mx-6 w-full lg:w-1/2 max-h-[65%] rounded-xl bg-neutral-900">
<h2 class="text-white font-bold text-2xl text-center">Are you sure you want to delete your account?</h2>
<a class="bg-[#E2017B] text-white px-0 py-3 rounded-full text-center" href="/logout">Yes</a>
Copy link
Contributor

@rupansh-sekar-yral rupansh-sekar-yral Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use pre-existing color classes instead of hardcoding
bg-primary-600

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understood

#[component]
fn ConfirmPermaDeleteModal(#[prop(into)] show: RwSignal<bool>) -> impl IntoView {
view! {
<ShadowOverlay show=show>
<div class="flex flex-col gap-4 p-6 mx-6 w-full lg:w-1/2 max-h-[65%] rounded-xl bg-neutral-900">
<h2 class="text-white font-bold text-2xl text-center">Do you want to permanently delete your account?</h2>
<button class="bg-[#E2017B] text-white px-0 py-3 rounded-full" on:click=move |_| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@rupansh-sekar-yral
Copy link
Contributor

@tushar-saxena-yral this is ready to merge right?

@tushar-saxena-yral
Copy link
Contributor Author

The frontend is ready, but the perma delete flow is not worked on at all. so i am not sure if it makes sense to merge it right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability for users to delete things- Web app (Frontend)
2 participants