-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
147 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
projects/test-app/src/app/components/content/actor-header/actor-header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
projects/test-app/src/app/components/content/actor-toolbar/actor-toolbar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 36 additions & 4 deletions
40
projects/test-app/src/app/forum/forum-index/forum-index.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
<div> | ||
<div class="relative mb-4"> | ||
<a [routerLink]="['post']" class="btn btn-primary" href="#">Post</a> | ||
<div class="sticky top-20 bg-base-100 bg-opacity-70"> | ||
<div class="flex"> | ||
<div class="flex flex-grow items-center"> | ||
Pagination list | ||
</div> | ||
<div class="flex-none"> | ||
<button class="btn btn-primary" [disabled]="isPosting" (click)="isPosting = true" *ngIf="canPost"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" /> | ||
</svg> | ||
<span>New Post</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div *ngIf="isPosting" class="card bg-base-200 shadow-md"> | ||
<div class="card-body p-2 sm:p-4"> | ||
<div class="mb-3"> | ||
<label for="addressee" class="block text-sm font-medium text-gray-700">Title</label> | ||
<input [(ngModel)]="name" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 mt-1 block w-full sm:text-sm border border-gray-300 rounded-md p-2" placeholder="#Title"> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="content" class="block text-sm font-medium text-gray-700">Content</label> | ||
<textarea name="content" #postbox rows="3" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 mt-1 w-full sm:text-sm border border-gray-300 rounded-md hidden" placeholder="Enter your message here"></textarea> | ||
<div class="NgxEditor__Wrapper"> | ||
<ngx-editor-menu [editor]="editor"></ngx-editor-menu> | ||
<ngx-editor [editor]="editor" [(ngModel)]="html" [placeholder]="'Type here...'"></ngx-editor> | ||
</div> | ||
</div> | ||
<div class="card-actions justify-end"> | ||
<button class="btn btn-outline" (click)="isPosting = false">Cancel</button> | ||
<button class="btn btn-primary" (click)="postMessage()">Post</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<div *ngFor="let post of posts$ | async" class="mb-3"> | ||
<app-note [post]="post"></app-note> | ||
<app-note [post]="post" [excludeAuthors]="(forum$ | async)?.id"></app-note> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { IsArrayPipe } from './is-array.pipe'; | ||
|
||
describe('IsArrayPipe', () => { | ||
it('create an instance', () => { | ||
const pipe = new IsArrayPipe(); | ||
expect(pipe).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
@Pipe({ | ||
name: 'isArray', | ||
standalone: true | ||
}) | ||
export class IsArrayPipe implements PipeTransform { | ||
|
||
transform(value: unknown, ..._args: unknown[]): unknown { | ||
return Array.isArray(value); | ||
} | ||
|
||
} |