finish share link + save work
continuous-integration/drone/push Build is passing Details

pull/15/head
Matis MAZINGUE 10 months ago
parent dc6c7d7e96
commit b3f0b01427

@ -37,6 +37,7 @@ import {
closeBracketsKeymap,
} from '@codemirror/autocomplete';
import { lintKeymap } from '@codemirror/lint';
import { Router } from '@angular/router';
import { WorkService } from '../../services/work.service';
import { Work } from '../../models/work.model';
@ -142,6 +143,7 @@ export class EditorComponent {
];
constructor(
private router: Router,
private codeExecutionService: CodeExecutionService,
protected workService: WorkService
) {}
@ -238,7 +240,10 @@ export class EditorComponent {
);
}
else {
this.addToDatabase();
const link = this.addToDatabase();
const url = `/work/${link}`;
this.router.navigateByUrl(url);
}
}

@ -1,13 +1,15 @@
<h2>Works</h2>
<div style="margin-left: 30px">
<h2>Works</h2>
<h3>Last Work</h3>
<div *ngFor="let work of works | slice: -1">
<app-work-list-detail [work]="work"></app-work-list-detail>
</div>
<h3>All Works</h3>
<div class="all-works">
<div *ngFor="let work of works">
<h3>Last Work</h3>
<div *ngFor="let work of works | slice: -1">
<app-work-list-detail [work]="work"></app-work-list-detail>
</div>
<h3>All Works</h3>
<div class="all-works">
<div *ngFor="let work of works">
<app-work-list-detail [work]="work"></app-work-list-detail>
</div>
</div>
</div>

Loading…
Cancel
Save