1import{S as f}from"./SubmitButton-CwcskGz4.js";import{b as g}from"./apiPost-C4xD0A-h.js";import{_ as h,c as r,a as t,F as l,f as a,j as d,k as u,t as m,d as p,b,m as k,r as w,u as x,o as n}from"./app-D-cVr9vr.js";import"./getCSRF-7MinvhD0.js";const v={components:{SubmitButton:f},data(){return{user:null,reason:"",confirmUsername:"",error:null,loading:!1,sent:!1,deletionRequested:!1}},computed:{...k(x)},mounted(){this.user=this.sideprojectorsStore.getCurrUser,this.deletionRequested=this.user.deletion_requested_at!=null},methods:{async submit(){this.error=null,this.loading=!0;let s=await g("/user/request-account-deletion",{reason:this.reason.trim(),confirmUsername:this.confirmUsername.trim()},this.sideprojectorsStore.getToken);if(this.loading=!1,!s.ok){this.error=s.body&&s.body.error?s.body.error:"Something went wrong. Please try again.";return}this.sent=!0}}},S={key:0,class:"mt-4 p-6 rounded border bg-white border pr-10 dark:bg-gray-800 dark:border-gray-700 dark:text-white"},U={class:"form-line"},_=["disabled"],q={class:"label-line dark:text-white"},j={class:"form-line"},B=["disabled"],V={key:0,class:"input-error"},C={class:"button-line"};function R(s,e,T,D,o,y){const c=w("SubmitButton");return n(),r(l,null,[e[9]||(e[9]=t("div",{class:"text-lg ml-2 dark:text-white"}," ðï¸ Â Delete my account ",-1)),o.user!=null?(n(),r("div",S,[o.sent||o.deletionRequested?(n(),r(l,{key:0},[e[2]||(e[2]=t("div",{class:"dark:text-white"},[t("b",null,"Thanks â we have your request.")],-1)),e[3]||(e[3]=t("div",{class:"mt-3 text-gray-600 dark:text-gray-300"}," Your account and your projects will come off the site shortly. If you change your mind, reply to us before then and we will stop it. ",-1))],64)):(n(),r(l,{key:1},[e[6]||(e[6]=t("div",{class:"dark:text-white"}," If you wish to close your account, let us know below. It comes off the site a few minutes later. ",-1)),e[7]||(e[7]=t("div",{class:"mt-3 text-gray-600 dark:text-gray-300"}," Please understand that this means your data comes off the site: your projects, your comments and your conversations all stop showing. Any membership you pay for stops billing at the end of the period you have already paid for. ",-1)),e[8]||(e[8]=t("div",{class:"label-line dark:text-white"},[a("Why are you leaving? "),t("span",{class:"text-gray-500 dark:text-gray-400 font-normal"},"(optional)")],-1)),t("div",U,[d(t("textarea",{"onUpdate:modelValue":e[0]||(e[0]=i=>o.reason=i),class:"input-standard h-24",disabled:o.loading},null,8,_),[[u,o.reason]])]),t("div",q,[e[4]||(e[4]=a("Type your username ")),t("b",null,m(o.user.username),1),e[5]||(e[5]=a(" to confirm"))]),t("div",j,[d(t("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=i=>o.confirmUsername=i),ref:"confirmUsername",class:"input-standard",disabled:o.loading},null,8,B),[[u,o.confirmUsername]]),o.error!==null?(n(),r("div",V,m(o.error),1)):p("",!0)]),t("div",C,[b(c,{onClick:y.submit,loading:o.loading,label:"Request account deletion",isFullWidth:!0,color:"red"},null,8,["onClick","loading"])])],64))])):p("",!0)],64)}const A=h(v,[["render",R]]);export{A as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.