You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
4.3 KiB

var C=Object.defineProperty;var x=(t,e,s)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var a=(t,e,s)=>x(t,typeof e!="symbol"?e+"":e,s);import{V as k,f as S,C as A,_ as D,g as w,h as r,i as p,j as o,w as $,k as u,l as P,t as b,m as v,v as m,F as V,x as d}from"./index-BLqts8WY.js";import{u as _}from"./index-CsfPLOYu.js";import{Q as N}from"./QuickNav-DgCyvgDx.js";import{G as B,aI as R}from"./index-MyY_xqVN.js";var T=Object.defineProperty,O=Object.getOwnPropertyDescriptor,j=(t,e,s,n)=>{for(var i=n>1?void 0:n?O(e,s):e,c=t.length-1,l;c>=0;c--)(l=t[c])&&(i=(n?l(e,s,i):l(i))||i);return n&&i&&T(e,s,i),i};let y=class extends k{constructor(){super(...arguments);a(this,"$notify");a(this,"activeAccount",null);a(this,"numAccounts",0);a(this,"showCopiedDeri",!1);a(this,"showCopiedSeed",!1);a(this,"showSeed",!1)}async created(){try{const n=(await S()).activeDid||"";this.numAccounts=await B(),this.activeAccount=await R(n)}catch(s){console.error("Got an error loading an identifier:",s),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"Got an error loading your seed data."},-1)}}doCopyTwoSecRedo(s,n){n(),_().copy(s).then(()=>setTimeout(n,2e3))}};y=j([A({components:{QuickNav:N}})],y);const E={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={class:"text-lg text-center font-light relative px-7"},Q={class:"flex justify-between py-2"},G={key:0},H={key:0},I={class:"bg-slate-100 rounded-md overflow-hidden p-4 mb-4"},W={key:0,class:"text-center text-slate-700 mt-2"},Y={class:"text-sm text-green-500"},L={class:"text-sm text-green-500"},q={key:1};function z(t,e,s,n,i,c){const l=w("QuickNav"),f=w("fa"),g=w("router-link");return d(),r(V,null,[p(l,{selected:"Profile"}),o("section",E,[o("div",F,[o("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=h=>t.$router.back())},[p(f,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=o("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Seed Backup ",-1)),o("div",Q,[e[5]||(e[5]=o("span",null,null,-1)),o("span",null,[p(g,{to:{name:"help"},class:"text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"},{default:$(()=>e[4]||(e[4]=[u(" Help ")])),_:1})])]),t.activeAccount?(d(),r("div",G,[e[9]||(e[9]=o("p",{class:"text-center mb-4"},[o("b",{class:"text-red-600"},"BEWARE!"),u(" Anyone who has this seed phrase will be able impersonate you and take over any digital holdings based on it. Reveal it when you are somewhere private, when only you can see your screen, and record it somewhere only you have access. A password manager is a good idea, and so is a piece of paper in a vault. "),o("i",null,"We recommend you do NOT take a screenshot or send it to any online service.")],-1)),t.numAccounts>1?(d(),r("p",H,e[6]||(e[6]=[o("b",{class:"text-orange-600"},"Note:",-1),u(" You have more than one identifier stored in this browser. If they are all based on the same seed as the current identifier, this one backup is sufficient, as long as you also record the derivation path. However, if you have different seeds for other identifiers, you will have to back them up separately. ")]))):P("",!0),o("div",I,[t.showSeed?(d(),r("p",W,[u(b(t.activeAccount.mnemonic)+" ",1),v(o("button",{onClick:e[1]||(e[1]=h=>t.doCopyTwoSecRedo(t.activeAccount.mnemonic,()=>t.showCopiedSeed=!t.showCopiedSeed))},[p(f,{icon:"copy",class:"text-slate-400 fa-fw"})],512),[[m,!t.showCopiedSeed]]),v(o("span",Y," Copied ",512),[[m,t.showCopiedSeed]]),e[7]||(e[7]=o("br",null,null,-1)),e[8]||(e[8]=o("br",null,null,-1)),u(" Derivation Path: "+b(t.activeAccount.derivationPath)+" ",1),v(o("button",{onClick:e[2]||(e[2]=h=>t.doCopyTwoSecRedo(t.activeAccount.derivationPath,()=>t.showCopiedDeri=!t.showCopiedDeri))},[p(f,{icon:"copy",class:"text-slate-400 fa-fw"})],512),[[m,!t.showCopiedDeri]]),v(o("span",L,"Copied",512),[[m,t.showCopiedDeri]])])):(d(),r("button",{key:1,class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md",onClick:e[3]||(e[3]=h=>t.showSeed=!0)}," Reveal my Seed Phrase "))])])):(d(),r("div",q,"You do not have an active identity."))])],64)}const ee=D(y,[["render",z]]);export{ee as default};