[frontend/pages] Add warning banners to migration page

This commit is contained in:
pancakes 2025-03-24 01:19:47 +10:00
parent c2fa48f51d
commit a8dcabd8ad
No known key found for this signature in database
2 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,6 @@
.warning-banner { .warning-banner {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
margin: 1rem auto auto; margin: 1rem auto;
border: 1px solid var(--warning-color); border: 1px solid var(--warning-color);
color: var(--warning-color); color: var(--warning-color);
border-radius: 0.5rem; border-radius: 0.5rem;

View file

@ -35,8 +35,14 @@
} }
else else
{ {
<WarningBanner>
@Loc["Migrating your account will only move your followers from the old account to the new account. No other user data such as notes or bookmarks will be moved."]
</WarningBanner>
<div class="section"> <div class="section">
<h3>@Loc["Move current account to new account"]</h3> <h3>@Loc["Migrate current account to new account"]</h3>
<WarningBanner>
@Loc["Make sure you've set up an alias for this account on your new account before migrating."]
</WarningBanner>
<input class="input" placeholder="@("@new@example.com")" autocomplete="off" @bind="@MoveTo" @oninput="() => ResetButtonState(MoveButton)"/> <input class="input" placeholder="@("@new@example.com")" autocomplete="off" @bind="@MoveTo" @oninput="() => ResetButtonState(MoveButton)"/>
<StateButton OnClick="Migrate" ExtraClasses="button" @ref="MoveButton"> <StateButton OnClick="Migrate" ExtraClasses="button" @ref="MoveButton">
<Initial> <Initial>
@ -55,7 +61,10 @@
</StateButton> </StateButton>
</div> </div>
<div class="section"> <div class="section">
<h3>@Loc["Move to this account from an older account"]</h3> <h3>@Loc["Migrate to this account from an older account"]</h3>
<WarningBanner>
@Loc["This will set an alias of your old account so that you can move from that account to this current one. Do this BEFORE migrating from your older account."]
</WarningBanner>
<div class="aliases"> <div class="aliases">
@foreach (var alias in Status.Aliases) @foreach (var alias in Status.Aliases)
{ {