Skip to content

Commit

Permalink
Add "Abstract" field for Text Mini App
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Oct 20, 2024
1 parent c405369 commit dc85a49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/src/app/apps/app/text/text-dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<mat-form-field appearance="outline" class="full-width">
<input matInput placeholder="Image" maxlength="200" [(ngModel)]="data.image" />
</mat-form-field>
<mat-form-field appearance="outline" class="full-width">
<textarea matInput placeholder="Abstract" [(ngModel)]="data.abstract"></textarea>
<!-- <input matInput placeholder="Abstract" maxlength="200" [(ngModel)]="data.abstract" /> -->
</mat-form-field>
<div class="editor">
<app-text-editor [(content)]="data.body"></app-text-editor>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/src/app/apps/app/text/text-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TextEditorComponent } from '../../../shared/components/text-editor/text
export interface DialogData {
title: string;
body: string;
abstract: string;
background: string;
collaborators: string[];
labels: string[];
Expand Down
2 changes: 1 addition & 1 deletion app/src/app/apps/app/text/text.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<mat-card-content class="note-body" (click)="editText(entry)">
@if (entry.data.image) {
<img [src]="entry.data.image" class="text-image" />
} @if(entry.data.abstract) {{{ entry.data.abstract }} } @else {{{ entry.data.body | stripHtml : 200 }}
}
{{ entry.data.body | stripHtml : 200 }}
</mat-card-content>
<mat-card-footer>
<button
Expand Down
1 change: 1 addition & 0 deletions app/src/app/apps/app/text/text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export class TextComponent implements OnDestroy {
let data: DialogData = {
title: entry.data.title,
body: entry.data.body,
abstract: entry.data.abstract,
background: entry.data.background,
collaborators: [],
labels: [''],
Expand Down

0 comments on commit dc85a49

Please sign in to comment.