Skip to content

Commit

Permalink
Update the restore routing
Browse files Browse the repository at this point in the history
  • Loading branch information
sp90 committed Jan 7, 2025
1 parent d2af773 commit a85b0eb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
31 changes: 18 additions & 13 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,32 @@ export const routes: Routes = [
},
{
path: 'restore',
loadComponent: () => import('./restore/restore.component'),
},
{
path: 'restore-flow/:id',
loadComponent: () => import('./restore-flow/restore-flow.component'),
children: [
{
path: '',
redirectTo: 'select-files',
pathMatch: 'full',
loadComponent: () => import('./restore/restore.component'),
},
{
path: 'select-files',
loadComponent: () => import('./restore-flow/select-files/select-files.component'),
},
{
path: 'options',
loadComponent: () => import('./restore-flow/options/options.component'),
path: 'from-config',
loadComponent: () => import('./restore/restore-from-config/restore-from-config.component'),
},
],
},
{
path: 'restore-from-files',
loadComponent: () => import('./restore-flow/restore-flow.component'),
loadChildren: () => import('./restore-flow/restore-flow.routes'),
},
{
path: 'restore-draft/:id',
loadComponent: () => import('./restore-flow/restore-flow.component'),
loadChildren: () => import('./restore-flow/restore-flow.routes'),
},
{
path: 'restore/:id',
loadComponent: () => import('./restore-flow/restore-flow.component'),
loadChildren: () => import('./restore-flow/restore-flow.routes'),
},
{
path: 'settings',
loadComponent: () => import('./settings/settings.component'),
Expand Down
14 changes: 7 additions & 7 deletions src/app/restore/restore.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
<section>
<h2 i18n>Where do you want to restore from?</h2>

<!-- <spk-card class="type-a">
<spk-card class="type-a">
<img src="assets/images/backup.png" alt="" width="48px" />
<div class="text">
<h3>Direct restore from backup files</h3>
<p>Point to your backup files and restore from there.</p>
</div>
<button spk-button [routerLink]="['/restore-flow']">
<button spk-button [routerLink]="['/restore-from-files']">
Start
<spk-icon>play-circle</spk-icon>
</button>
</spk-card> -->
</spk-card>

<!-- <spk-card class="type-a">
<spk-card class="type-a">
<img src="assets/images/restore.png" alt="" width="48px" />
<div class="text">
<h3>Restore from configuration</h3>
<p>Load destination from an exported job or a storage provider</p>
</div>
<button spk-button>
<button spk-button [routerLink]="['/restore/from-config']">
Start
<spk-icon>play-circle</spk-icon>
</button>
</spk-card>

<spk-divider>Or existing</spk-divider> -->
<spk-divider>Or existing</spk-divider>

@defer (when !backupsLoading()) {
@if (backups().length) {
Expand All @@ -43,7 +43,7 @@ <h3 i18n>Restore {{ backup.Backup?.Name ?? 'Backup name missing' }}</h3>
</p>
</div>

<button spk-button [routerLink]="['/restore-flow', backup.Backup?.ID]" i18n>
<button spk-button [routerLink]="['/restore', backup.Backup?.ID]" i18n>
Restore
<spk-icon>arrow-right</spk-icon>
</button>
Expand Down
2 changes: 2 additions & 0 deletions src/app/restore/restore.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { RouterLink } from '@angular/router';
import {
SparkleButtonComponent,
SparkleCardComponent,
SparkleDividerComponent,
SparkleIconComponent,
SparkleProgressBarComponent,
} from '@sparkle-ui/core';
Expand All @@ -16,6 +17,7 @@ import { BackupsState } from '../core/states/backups.state';
StatusBarComponent,
SparkleCardComponent,
SparkleButtonComponent,
SparkleDividerComponent,
SparkleIconComponent,
SparkleProgressBarComponent,
RouterLink,
Expand Down

0 comments on commit a85b0eb

Please sign in to comment.