unoffical wafrn mirror wafrn.net
atproto social-network activitypub
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'refactor migrate-bluesky page to be a stepper' (#553) from bsky-stepper into development

Reviewed-on: https://codeberg.org/wafrn/wafrn/pulls/553

gabboman 4552affe 89da7c76

+101 -57
+90 -47
packages/frontend/src/app/pages/migrate-bluesky/migrate-bluesky.component.html
··· 1 + <h1>Migrate from bluesky</h1> 1 2 @if (environment().enableBsky) { 2 - <mat-card class="wafrn-container post-card"> 3 - <h1>Migrate from bluesky</h1> 4 - <marquee><h2>READ THIS ONE, ITS IMPORTANT</h2></marquee> 5 - <p>This is important, it's easier than it looks tho. But you need to be aware of what is going to happen</p> 6 - <p 7 - >First of all, if you enabled bluesky on your wafrn account, this action will DESTROY THE BSKY ACCOUNT currently 8 - asociated to your wafrn profile</p 9 - > 10 - <p>Second, this still requires some action on your part!</p> 11 - <p>Once you press the button, the associated wafrn bsky account will be DELETED</p> 12 - <p>If you already pressed it and it was deleted, its ok no worries</p> 3 + <mat-stepper orientation="vertical"> 4 + <mat-step state="prerequisites"> 5 + <ng-template matStepLabel><b>Prerequisites</b></ng-template> 6 + <p>Migrating from Bluesky is relatively easy, but requires your attention!</p> 7 + <p>Let's get some prerequisites out of the way:</p> 8 + <ul> 9 + <li>If you're currently using a wafrn-hosted bsky account, <b>it will be nuked.</b></li> 10 + <li>This doesn't always go smoothly! If any issues occur, reach out to the wafrn team!</li> 11 + <li>If you are using a <code>.bsky.social</code> handle, it will be moved to <code>.{{ environment().bskyPDSUrl }}</code></li> 12 + <li>You cannot use your own PDS. You will be using the Wafrn-hosted one.</li> 13 + </ul> 14 + <p>When you're ready, continue here:</p> 15 + <div> 16 + <button matButton="filled" matStepperNext>Next</button> 17 + </div> 18 + </mat-step> 19 + <mat-step state="unlinking"> 20 + <ng-template matStepLabel><b>Unlinking and deleting the old account</b></ng-template> 21 + <p>First off, we must unlink (and delete) your previous linked bluesky account. This is the Wafrn-hosted one, if you have one.</p> 22 + <p>This will also give you an "invite code", that we'll use in the next steps to move over your existing account. Please write it down!</p> 13 23 @if (!code) { 14 24 <button [disabled]="loading" (click)="loadInviteCode()" mat-flat-button class="w-full"> 15 25 Delete bsky associated account and get invite code 16 26 </button> 17 27 } @else { 18 28 <p>Your invite code is</p> 19 - <p 20 - ><b>{{ code }}</b></p 21 - > 22 - } 23 - <p>Ok now that you have the invite code, you need to MOOVE your bluesky account to our servers</p> 24 - <p>To do it, visit <a target="_blank" href="https://pdsmoover.com">pdsmoover</a></p> 25 - <p>provider: {{ environment().bskyPDSUrl }}</p> 26 - <p>Fill the data bearing in mind that you need to replace the invite code and the provider</p> 27 - <img src="/assets/img/pdsmoover.png" /> 28 - <p 29 - >Once you are done with the MOOVE, you need to log in into bluesky, using the new PROVIDER, and create an 30 - <b>APP PASSWORD</b> in settings</p 31 - > 32 - <p>Now that you have a secure app password that is random, you can fill your bluesky username and password here</p> 33 - <form [hidden]="loading" class="px-3" [formGroup]="bskyForm" (ngSubmit)="linkBskyAccount()"> 34 - <mat-form-field class="w-full"> 35 - <mat-label>New name of account (@accountName.{{environment().bskyPDSUrl}})</mat-label> 36 - <input formControlName="account" type="text" matInput /> 37 - </mat-form-field> 38 - <mat-form-field class="w-full"> 39 - <mat-label>App Password (NOT YOUR PASSWORD, A BLUESKY APP PASSWORD)</mat-label> 40 - <input [type]="isPasswordVisible ? 'text' : 'password'" formControlName="password" matInput /> 41 - <button mat-icon-button matSuffix type="button" (click)="togglePasswordVisibility()"> 42 - <fa-icon [icon]="isPasswordVisible ? faEyeSlash : faEye"></fa-icon> 43 - </button> 44 - <mat-error> Password is required </mat-error> 45 - </mat-form-field> 46 - <button [disabled]="!bskyForm.valid" mat-flat-button color="primary" extended class="w-full border-round-md mt-4"> 47 - <span class="flex gap-2">Link account</span> 48 - </button> 49 - </form> 50 - @if(loading) { 51 - <app-loader> 52 - </app-loader> 53 - } 54 - </mat-card> 29 + <p><b>{{ code }}</b></p> 55 30 } 31 + <p>Got the code? Alright, on to the next step.</p> 32 + <div> 33 + <button matButton="filled" matStepperNext>Next</button> 34 + </div> 35 + </mat-step> 36 + <mat-step state="pdsmoover"> 37 + <ng-template matStepLabel><b>PDSMoover - Actually moving the account</b></ng-template> 38 + <p>Now we'll use an external migration tool, called <a href="https://pdsmoover.com">PDS Moover</a> to do the actual migration part.</p> 39 + <p>For the provider, give them this URL: <code>{{ environment().bskyPDSUrl }}</code></p> 40 + <p>Follow their instructions <i>closely.</i> If something goes wrong, reach out to the Wafrn team and your site admin!</p> 41 + <p>And of course, give PDS Moover the invite code that you wrote down</p> 42 + <p><small>You wrote it down, right? If not, go back.</small></p> 43 + <div> 44 + <button matButton="filled" matStepperNext>Next</button> 45 + </div> 46 + </mat-step> 47 + <mat-step state="linking"> 48 + <ng-template matStepLabel><b>Linking the account to Wafrn</b></ng-template> 49 + <p>If the "MOOVE" went alright, we'll now need to link up the migrated account to Wafrn.</p> 50 + <p>To do this, we log in to the newly migrated account as if it was any other Bluesky account on <a href="https://bsky.app">bsky.app</a>, and create an "App Password"</p> 51 + <p>You'll find the relevant options in Settings > Privacy and Security > App Passwords</p> 52 + <p>Once you've grabbed a new app password, put it in together with the new username here:</p> 53 + <form [hidden]="loading" class="px-3" [formGroup]="bskyForm" (ngSubmit)="linkBskyAccount()"> 54 + <mat-form-field class="w-full"> 55 + <mat-label>New name of account (@accountName.{{environment().bskyPDSUrl}})</mat-label> 56 + <input formControlName="account" type="text" matInput /> 57 + </mat-form-field> 58 + <mat-form-field class="w-full"> 59 + <mat-label>App Password (NOT YOUR PASSWORD, A BLUESKY APP PASSWORD)</mat-label> 60 + <input [type]="isPasswordVisible ? 'text' : 'password'" formControlName="password" matInput /> 61 + <button mat-icon-button matSuffix type="button" (click)="togglePasswordVisibility()"> 62 + <fa-icon [icon]="isPasswordVisible ? faEyeSlash : faEye"></fa-icon> 63 + </button> 64 + <mat-error> Password is required </mat-error> 65 + </mat-form-field> 66 + <button [disabled]="!bskyForm.valid" mat-flat-button color="primary" extended class="w-full border-round-md mt-4"> 67 + <span class="flex gap-2">Link account</span> 68 + </button> 69 + </form> 70 + </mat-step> 71 + <mat-step state="profit"> 72 + <ng-template matStepLabel><b>Profit?</b></ng-template> 73 + <p>Hooray! All should be done! Please verify on your profile that the bluesky handle is visible. Your old Bluesky posts should also start appearing on your profile.</p> 74 + <p>If there was any issues, <i><b>please reach out!</b></i>The Wafrn team and admins of your site are happy to help :)</p> 75 + </mat-step> 76 + <!-- All of these fucking icons straight up don't work --> 77 + 78 + <!-- <ng-template matStepperIcon="prerequisites"> 79 + <mat-icon>done</mat-icon> 80 + </ng-template> 81 + 82 + <ng-template matStepperIcon="unlinking"> 83 + <mat-icon>done</mat-icon> 84 + </ng-template> 85 + 86 + <ng-template matStepperIcon="pdsmoover"> 87 + <mat-icon>done</mat-icon> 88 + </ng-template> 89 + 90 + <ng-template matStepperIcon="linking"> 91 + <mat-icon>done</mat-icon> 92 + </ng-template> 93 + 94 + <ng-template matStepperIcon="profit"> 95 + <mat-icon>done</mat-icon> 96 + </ng-template> --> 97 + </mat-stepper> 98 + }
+8 -7
packages/frontend/src/app/pages/migrate-bluesky/migrate-bluesky.component.ts
··· 1 - 2 1 import { Component, signal, inject } from '@angular/core' 3 2 import { FormsModule, ReactiveFormsModule, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms' 4 3 import { MatButtonModule } from '@angular/material/button' 5 4 import { MatCardModule } from '@angular/material/card' 6 5 import { MatFormFieldModule } from '@angular/material/form-field' 7 6 import { MatInputModule } from '@angular/material/input' 7 + import { MatStepperModule } from '@angular/material/stepper' 8 + import { MatIconModule } from '@angular/material/icon' 8 9 import { FontAwesomeModule } from '@fortawesome/angular-fontawesome' 9 10 import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons' 10 - import { LoaderComponent } from 'src/app/components/loader/loader.component' 11 11 import { EnvironmentService } from 'src/app/services/environment.service' 12 12 import { LoginService } from 'src/app/services/login.service' 13 13 import { MessageService } from 'src/app/services/message.service' ··· 21 21 MatButtonModule, 22 22 MatInputModule, 23 23 MatFormFieldModule, 24 + MatStepperModule, 24 25 FontAwesomeModule, 25 - LoaderComponent 26 - ], 26 + MatIconModule 27 + ], 27 28 templateUrl: './migrate-bluesky.component.html', 28 29 styleUrl: './migrate-bluesky.component.scss' 29 30 }) 30 31 export class MigrateBlueskyComponent { 31 - private environmentService = inject(EnvironmentService); 32 - private loginService = inject(LoginService); 33 - private messageService = inject(MessageService); 32 + private environmentService = inject(EnvironmentService) 33 + private loginService = inject(LoginService) 34 + private messageService = inject(MessageService) 34 35 35 36 environment = signal<any>(EnvironmentService.environment) 36 37
+3 -3
packages/frontend/src/environments/environment.devprod.ts
··· 8 8 production: false, 9 9 maxUploadSize: '250', 10 10 logo: '/assets/logo.png', 11 - baseUrl: 'https://waf.moe/api', 12 - baseMediaUrl: 'https://waf.moe/api/uploads', 13 - externalCacheurl: 'https://waf.moe/api/cache?media=', 11 + baseUrl: 'https://app.wafrn.net/api', 12 + baseMediaUrl: 'https://app.wafrn.net/api/uploads', 13 + externalCacheurl: 'https://app.wafrn.net/api/cache?media=', 14 14 frontUrl: 'http://localhost:4200', 15 15 shortenPosts: 3, 16 16 reviewRegistrations: true,