feat: Added file formatting

This commit is contained in:
2025-06-11 11:56:39 +02:00
parent 772fc52cf6
commit a25a90c0d7
164 changed files with 4163 additions and 3242 deletions

View File

@@ -1,32 +1,35 @@
import { Component, Inject } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { Component, Inject } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'
@Component({
selector: 'app-edit-post',
templateUrl: './edit-post.component.html',
styleUrls: ['./edit-post.component.scss'],
standalone: false
selector: 'app-edit-post',
templateUrl: './edit-post.component.html',
styleUrls: ['./edit-post.component.scss'],
standalone: false,
})
export class NewPostComponent {
form: FormGroup;
constructor (public dialogRef: MatDialogRef<NewPostComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
form: FormGroup
constructor(
public dialogRef: MatDialogRef<NewPostComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) {
if (data == null) {
data = {
title:"",
content:"",
title: '',
content: '',
}
}
this.form = new FormGroup({
title: new FormControl(data.title),
content: new FormControl(data.content)
content: new FormControl(data.content),
})
}
protected makePost() {
this.dialogRef.close({
title: this.form.get('title')?.value,
content: this.form.get('content')?.value
content: this.form.get('content')?.value,
})
}
}