Handle Clean up & More info #2

merged
opened by baileytownsend.dev targeting main from bugfix/HandleCleanup
  • Clean up some of the odd Unicode characters that show up if you copy your handle from your profile
  • Added info on how to sign in after
  • Added some tips to help with Invalid Handle
Changed files
+43 -5
public
src
+5
index.html
··· 34 34 askForPlcToken: false, 35 35 plcToken: null, 36 36 plcStatus: null, 37 + done: false, 37 38 //advance 38 39 showAdvance: false, 39 40 createNewAccount: true, ··· 108 109 this.plcStatus = 'Signing PLC operation...'; 109 110 await window.Migrator.signPlcOperation(this.plcToken); 110 111 this.plcStatus = 'PLC operation signed successfully! Your account has been MOOved to the new PDS.'; 112 + this.done = true; 111 113 // this.askForPlcToken = false; 112 114 } catch (error) { 113 115 this.error = error.message; ··· 248 250 </div> 249 251 <div x-show="error" x-text="error" class="error-message"></div> 250 252 <div x-show="plcStatus" x-text="plcStatus" class="status-message"></div> 253 + <div x-show="done" class="status-message">Congratulations! You have MOOved to a new PDS! Remember to use 254 + your new PDS URL under "Hosting provider" when logging in on Bluesky. Can find more detail information 255 + <a href="http://localhost:5173/info.html#cant-login">here.</a></div> 251 256 <div> 252 257 <button type="submit">Sign the papers</button> 253 258 </div>
+32 -2
public/info.html
··· 13 13 </head> 14 14 <body> 15 15 <div class="container"> 16 - <h1>PDS MOOver</h1> 16 + <h1><a href="/">PDS MOOver </a></h1> 17 17 <div class="cow-image"> 18 18 <img src="/moo.webp" alt="Cartoon milk cow" style="max-width: 100%; max-height: 100%; object-fit: contain;"> 19 19 </div> ··· 43 43 <h3>Table of contents</h3> 44 44 <ol> 45 45 <li><a href="#precautions">Precautions</a></li> 46 + <li><a href="#cant-login">I can't log in?/Says my account is deactivated?</a></li> 47 + <li><a href="#invalid-handle">My account says Invalid Handle?</a></li> 46 48 <li><a href="#help">!!!!!HELP!!!!!</a></li> 47 49 <li><a href="#why">Why doesn't PDS MOOver have xyz?</a></li> 48 50 <li><a href="#done">Alright account migrated, now what?</a></li> ··· 72 74 </p> 73 75 </section> 74 76 77 + <section id="cant-login" class="section" style="text-align:left"> 78 + <h2>I can't log in?/Says my account is deactivated?</h2> 79 + <p>When you move to a non Bluesky PDS you have to do an extra step on login.</p> 80 + <ol> 81 + <li>On the Sign in screen for <a href="https://bsky.app">bsky.app</a> or on the app click the top input 82 + titled "Hosting provider" and has a globe icon and says Bluesky Social" 83 + </li> 84 + <li>Click the tab labeled custom</li> 85 + <li>In the input for server address you put the same URL you used for the new PDS URL with the https:// 86 + like so <code>https://example.com</code></li> 87 + <li>Click done and enter your new handle(or email) and password</li> 88 + </ol> 89 + </section> 90 + 91 + <section id="invalid-handle" class="section" style="text-align:left"> 92 + <h2>My account says Invalid Handle?</h2> 93 + <p>It's a bit of a bug sometimes. I'm not sure what causes it, but usually mentioning your handle in a post 94 + or reply fixes it. 95 + Like <code>@fullhandle.newpds.com</code>, may or may not highlight it blue and autofill it but make sure 96 + you have the 97 + full handle and the @ like that. Can also check your handle with the <a 98 + href="https://bsky-debug.app/handle">Bluesky Debug Page</a>. If you see green, and it says one 99 + of 100 + them pass you should be fine and just may take a while to update.</p> 101 + </section> 102 + 75 103 <section id="help" class="section" style="text-align:left"> 76 104 <h2>!!!!!HELP!!!!!</h2> 77 105 <p>If you're having issues with PDS MOOver first of all, I'm very sorry. I have tested this to the best of ··· 83 111 if it created the account, repo is there but some blobs are missing. You can uncheck everything but 84 112 "Migrate Missing Blobs", "Migrate Prefs", and "Migrate PLC record" and it will pick up after the account 85 113 repo migration. It is odd in the fact that all the fields are required. That's just to cut down on logic 86 - to hopefully cut down on bugs. If you don't ever see the "Please enter your PLC Token" you can just 114 + to hopefully cut down on bugs. If you don't ever see the "Please enter your PLC Token" and enter the 115 + token sent to your email, you can just 87 116 forget about it and call it a day if it's too much. Your old account is still active and working.</p> 88 117 </section> 89 118 119 + 90 120 <section id="why" class="section" style="text-align:left"> 91 121 <h2>Why doesn't PDS MOOver have xyz?</h2> 92 122 <p>PDS MOOver was designed to pretty much be the goat account migration with a UI. Like in this <a
+6 -3
src/pdsmoover.js
··· 59 59 * @param {string|null} twoFactorCode - Optional, but needed if it fails with 2fa required 60 60 */ 61 61 async migrate(oldHandle, password, newPdsUrl, newEmail, newHandle, inviteCode, statusUpdateHandler = null, twoFactorCode = null) { 62 + 63 + //Copying the handle from bsky website adds some random unicodes on 64 + oldHandle = oldHandle.replace('@', '').trim().replace(/[\u202A\u202C\u200E\u200F\u2066-\u2069]/g, ''); 62 65 //Resolves the did and finds the did document for the old PDS 63 66 safeStatusUpdate(statusUpdateHandler, 'Resolving old PDS'); 64 67 const usersDid = await handleResolver.resolve(oldHandle); ··· 185 188 186 189 for (const recordBlob of missingBlobs.data.blobs) { 187 190 try { 188 - //TODO may move the status update here but would have it only update like every 10 191 + 189 192 const blobRes = await oldAgent.com.atproto.sync.getBlob({ 190 193 did: usersDid, 191 194 cid: recordBlob.cid, ··· 198 201 } 199 202 missingUploadedBlobs++; 200 203 } catch (error) { 201 - //TODO silently logging for now will do a missing blobs later 204 + //TODO silently logging prob should list them so user can manually download 202 205 console.error(error); 203 - this.missingBlobs.push(cid); 206 + this.missingBlobs.push(recordBlob.cid); 204 207 } 205 208 } 206 209 missingBlobCursor = missingBlobs.data.cursor;