@@ -293,13 +293,11 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
293293 } }
294294 style = { { width : "600px" } }
295295 >
296- { isOngoing ? (
297- < div className = { Classes . DIALOG_BODY } >
296+ < div className = { Classes . DIALOG_BODY } >
297+ { isOngoing ? (
298298 < p > Migrating relations, please wait</ p >
299- </ div >
300- ) : (
301- < >
302- < div className = { Classes . DIALOG_BODY } >
299+ ) : (
300+ < >
303301 < p >
304302 Activating the faster relations system will migrate all
305303 previously created relations and newly created relations will
@@ -308,58 +306,56 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
308306 deleted; however, they will not be accessible until you
309307 reactivate the faster relation system.
310308 </ p >
311- { activeRelationMigration === RelationMigrationDialog . activate ? (
312- < div className = "flex justify-center" >
313- < div className = "mt-1 inline-block align-middle" >
314- < Label className = "!my-0 pr-2" > Relations</ Label >
315- </ div >
316- < pre className = "m-0 p-1.5 pt-2" > { numExistingRelations } </ pre >
309+ { activeRelationMigration ===
310+ RelationMigrationDialog . reactivate ? (
311+ < div className = "flex flex-col items-center" >
312+ < Label className = "font-semibold" > Relations</ Label >
313+ < pre className = "m-0 rounded border border-gray-300 bg-gray-50 p-2 text-center" >
314+ { numExistingRelations }
315+ </ pre >
317316 </ div >
318- ) : (
319- ""
320- ) }
321- </ div >
322- < div className = { Classes . DIALOG_FOOTER } >
323- < div className = { Classes . DIALOG_FOOTER_ACTIONS } >
324- < Button
325- small
326- onClick = { ( ) => {
327- setActiveRelationMigration ( RelationMigrationDialog . none ) ;
328- } }
329- >
330- Cancel
331- </ Button >
332- { activeRelationMigration ===
333- RelationMigrationDialog . reactivate ? (
334- < Button
335- small
336- intent = { Intent . PRIMARY }
337- onClick = { ( ) => {
338- setStoredRelations ( true ) ;
339- setActiveRelationMigration ( RelationMigrationDialog . none ) ;
340- } }
341- >
342- Reactivate without Migration
343- </ Button >
344- ) : (
345- ""
346- ) }
317+ ) : null }
318+ </ >
319+ ) }
320+ </ div >
321+ { ! isOngoing && (
322+ < div className = { Classes . DIALOG_FOOTER } >
323+ < div className = { Classes . DIALOG_FOOTER_ACTIONS } >
324+ < Button
325+ small
326+ onClick = { ( ) => {
327+ setActiveRelationMigration ( RelationMigrationDialog . none ) ;
328+ } }
329+ >
330+ Cancel
331+ </ Button >
332+ { activeRelationMigration ===
333+ RelationMigrationDialog . reactivate ? (
347334 < Button
348335 small
349336 intent = { Intent . PRIMARY }
350337 onClick = { ( ) => {
351- setIsOngoing ( true ) ;
352- void startMigration ( ) ;
338+ setStoredRelations ( true ) ;
339+ setActiveRelationMigration ( RelationMigrationDialog . none ) ;
353340 } }
354341 >
355- { activeRelationMigration ===
356- RelationMigrationDialog . reactivate
357- ? "Migrate again and Reactivate"
358- : "Activate and Migrate" }
342+ Reactivate without Migration
359343 </ Button >
360- </ div >
344+ ) : null }
345+ < Button
346+ small
347+ intent = { Intent . PRIMARY }
348+ onClick = { ( ) => {
349+ setIsOngoing ( true ) ;
350+ void startMigration ( ) ;
351+ } }
352+ >
353+ { activeRelationMigration === RelationMigrationDialog . reactivate
354+ ? "Migrate again and Reactivate"
355+ : "Activate and Migrate" }
356+ </ Button >
361357 </ div >
362- </ >
358+ </ div >
363359 ) }
364360 </ Dialog >
365361 < Dialog
0 commit comments