Correction
continuous-integration/drone/push Build is passing Details

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

@ -51,11 +51,6 @@
</svg>
</button>
</div>
<div class="param-editor">
<button class="button-icon" type="button" (click)="addToDatabase()">
{{ 'Editor.Add' | translate }}
</button>
</div>
<div class="param-editor">
<button
class="btn-share"

@ -82,7 +82,7 @@ const basicSetup: Extension = (() => [
],
})
export class EditorComponent {
APP_URL = 'http://localhost:4200/'; // à retirer
APP_URL = 'http://localhost:4200'; // à retirer
@Input() currentWork!: Work;
isLoaded: boolean = false; // Pour vérifier si le chargement est terminé
@ -208,9 +208,9 @@ export class EditorComponent {
}
shareButtonClicked() {
const link = this.addToDatabase();
const link = this.currentWork ? this.currentWork.link : this.addToDatabase();
const url = `${this.APP_URL}/work/${link}`;
const ok = TranslateModule;
// Vérifiez si l'API clipboard est disponible
if (navigator.clipboard) {
navigator.clipboard
@ -230,11 +230,16 @@ export class EditorComponent {
}
saveButtonClicked() {
this.workService.updateWork(
String(this.currentWork.id_work),
this.editorContent,
this.selectedLanguage.name
);
if (this.currentWork) {
this.workService.updateWork(
String(this.currentWork.id_work),
this.editorContent,
this.selectedLanguage.name
);
}
else {
this.addToDatabase();
}
}
protected readonly console = console;

@ -150,7 +150,7 @@
},
"Editor": {
"Share": "Partager",
"Save": "Sauvergarder",
"Save": "Sauvegarder",
"Run": "EXECUTER",
"Add": "AJOUTER A LA BDD"
}

Loading…
Cancel
Save