Skip to content

Commit 457276f

Browse files
committed
chore: clean codes
1 parent 0c0a2ac commit 457276f

23 files changed

+321
-130
lines changed

ui/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ Thumbs.db
4343

4444
.angular
4545

46-
.nx/cache
46+
.nx/cache
47+
.nx/workspace-data

ui/.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/dist
44
/coverage
55

6-
/.nx/cache
6+
/.nx/cache
7+
/.nx/workspace-data

ui/apps/todolist/src/app/app.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import { User } from './core/user.model';
1010
import { Observable } from 'rxjs';
1111

1212
@Component({
13-
selector: 'app-root',
14-
templateUrl: './app.component.html',
15-
styleUrls: ['./app.component.css'],
13+
selector: 'app-root',
14+
templateUrl: './app.component.html',
15+
styleUrls: ['./app.component.css'],
16+
standalone: false
1617
})
1718
export class AppComponent implements OnInit {
1819
title = 'todolist';

ui/apps/todolist/src/app/auth/signin/signin.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { Router } from '@angular/router';
44
import { Subscription } from 'rxjs';
55

66
@Component({
7-
selector: 'app-signin',
8-
templateUrl: './signin.component.html',
9-
styleUrls: ['./signin.component.css'],
7+
selector: 'app-signin',
8+
templateUrl: './signin.component.html',
9+
styleUrls: ['./signin.component.css'],
10+
standalone: false
1011
})
1112
export class SigninComponent implements OnInit {
1213
username = '';

ui/apps/todolist/src/app/dialog/dialog.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
22
import { MatDialogRef } from '@angular/material/dialog';
33

44
@Component({
5-
templateUrl: 'dialog.component.html'
5+
templateUrl: 'dialog.component.html',
6+
standalone: false
67
})
78
export class DialogComponent {
89
avatars = new Array(16).fill(0).map((_, i) => `svg-${i + 1}`);

ui/apps/todolist/src/app/home/home.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { Component, OnInit } from '@angular/core';
22

33
@Component({
4-
selector: 'app-home',
5-
templateUrl: './home.component.html',
6-
styleUrls: ['./home.component.css']
4+
selector: 'app-home',
5+
templateUrl: './home.component.html',
6+
styleUrls: ['./home.component.css'],
7+
standalone: false
78
})
89
export class HomeComponent implements OnInit {
910
constructor() {}

ui/apps/todolist/src/app/post/edit-post/edit-post.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { Post } from '../shared/post.model';
55
import { PostService } from '../shared/post.service';
66

77
@Component({
8-
selector: 'app-edit-post',
9-
templateUrl: './edit-post.component.html',
10-
styleUrls: ['./edit-post.component.css']
8+
selector: 'app-edit-post',
9+
templateUrl: './edit-post.component.html',
10+
styleUrls: ['./edit-post.component.css'],
11+
standalone: false
1112
})
1213
export class EditPostComponent implements OnInit, OnDestroy {
1314
post: Post = { title: '', content: '' };

ui/apps/todolist/src/app/post/new-post/new-post.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { Post } from '../shared/post.model';
55
import { PostService } from '../shared/post.service';
66

77
@Component({
8-
selector: 'app-new-post',
9-
templateUrl: './new-post.component.html',
10-
styleUrls: ['./new-post.component.css']
8+
selector: 'app-new-post',
9+
templateUrl: './new-post.component.html',
10+
styleUrls: ['./new-post.component.css'],
11+
standalone: false
1112
})
1213
export class NewPostComponent implements OnInit, OnDestroy {
1314
post: Post = { title: '', content: '' };

ui/apps/todolist/src/app/post/post-details/comment/comment-form.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { Post } from '../../shared/post.model';
44
import { PostService } from '../../shared/post.service';
55

66
@Component({
7-
selector: 'app-comment-form',
8-
templateUrl: './comment-form.component.html',
9-
styleUrls: ['./comment-form.component.css'],
7+
selector: 'app-comment-form',
8+
templateUrl: './comment-form.component.html',
9+
styleUrls: ['./comment-form.component.css'],
10+
standalone: false
1011
})
1112
export class CommentFormComponent implements OnInit {
1213
@Input() post: Post;

ui/apps/todolist/src/app/post/post-details/comment/comment-list-item.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { Component, OnInit, Input } from '@angular/core';
33
import { Comment } from '../../shared/comment.model';
44

55
@Component({
6-
selector: 'app-comment-list-item',
7-
templateUrl: './comment-list-item.component.html',
8-
styleUrls: ['./comment-list-item.component.css']
6+
selector: 'app-comment-list-item',
7+
templateUrl: './comment-list-item.component.html',
8+
styleUrls: ['./comment-list-item.component.css'],
9+
standalone: false
910
})
1011
export class CommentListItemComponent implements OnInit {
1112

ui/apps/todolist/src/app/post/post-details/comment/comment-list.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { Comment } from '../../shared/comment.model';
55

66

77
@Component({
8-
selector: 'app-comment-list',
9-
templateUrl: './comment-list.component.html',
10-
styleUrls: ['./comment-list.component.css']
8+
selector: 'app-comment-list',
9+
templateUrl: './comment-list.component.html',
10+
styleUrls: ['./comment-list.component.css'],
11+
standalone: false
1112
})
1213
export class CommentListComponent implements OnInit, OnChanges {
1314

ui/apps/todolist/src/app/post/post-details/comment/comment-panel.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { Comment } from '../../shared/comment.model';
44
import { PostService } from '../../shared/post.service';
55

66
@Component({
7-
selector: 'app-comment-panel',
8-
templateUrl: './comment-panel.component.html',
9-
styleUrls: ['./comment-panel.component.css']
7+
selector: 'app-comment-panel',
8+
templateUrl: './comment-panel.component.html',
9+
styleUrls: ['./comment-panel.component.css'],
10+
standalone: false
1011
})
1112
export class CommentPanelComponent implements OnInit {
1213

ui/apps/todolist/src/app/post/post-details/post-details-panel/post-details-panel.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { Component, OnInit, OnChanges, Input, SimpleChange } from '@angular/core
33
import { Post } from '../../shared/post.model';
44

55
@Component({
6-
selector: 'app-post-details-panel',
7-
templateUrl: './post-details-panel.component.html',
8-
styleUrls: ['./post-details-panel.component.css']
6+
selector: 'app-post-details-panel',
7+
templateUrl: './post-details-panel.component.html',
8+
styleUrls: ['./post-details-panel.component.css'],
9+
standalone: false
910
})
1011
export class PostDetailsPanelComponent implements OnInit, OnChanges {
1112

ui/apps/todolist/src/app/post/post-details/post-details.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import { Post } from '../shared/post.model';
88
import { Comment } from '../shared/comment.model';
99

1010
@Component({
11-
selector: 'app-post-details',
12-
templateUrl: './post-details.component.html',
13-
styleUrls: ['./post-details.component.css']
11+
selector: 'app-post-details',
12+
templateUrl: './post-details.component.html',
13+
styleUrls: ['./post-details.component.css'],
14+
standalone: false
1415
})
1516
export class PostDetailsComponent implements OnInit, OnDestroy {
1617

ui/apps/todolist/src/app/post/post-list/post-list.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import { Post } from '../shared/post.model';
66
import { PostService } from '../shared/post.service';
77

88
@Component({
9-
selector: 'app-post-list',
10-
templateUrl: './post-list.component.html',
11-
styleUrls: ['./post-list.component.css']
9+
selector: 'app-post-list',
10+
templateUrl: './post-list.component.html',
11+
styleUrls: ['./post-list.component.css'],
12+
standalone: false
1213
})
1314
export class PostListComponent implements OnInit, OnDestroy {
1415

ui/apps/todolist/src/app/post/shared/post-form/post-form.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { Post } from '../post.model';
55
import { PostService } from '../post.service';
66

77
@Component({
8-
selector: 'app-post-form',
9-
templateUrl: './post-form.component.html',
10-
styleUrls: ['./post-form.component.css'],
8+
selector: 'app-post-form',
9+
templateUrl: './post-form.component.html',
10+
styleUrls: ['./post-form.component.css'],
11+
standalone: false
1112
})
1213
export class PostFormComponent implements OnInit, OnDestroy {
1314
@Input() post: Post = { title: '', content: '' };

ui/apps/todolist/src/app/shared/nl2br.pipe.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Pipe, PipeTransform } from '@angular/core';
22

33
@Pipe({
4-
name: 'nl2br'
4+
name: 'nl2br',
5+
standalone: false
56
})
67
export class Nl2brPipe implements PipeTransform {
78

ui/apps/todolist/src/app/shared/show-authed.directive.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import {
77
} from '@angular/core';
88
import { AuthService } from '../core/auth.service';
99

10-
@Directive({ selector: '[showAuthed]' })
10+
@Directive({
11+
selector: '[showAuthed]',
12+
standalone: false
13+
})
1114
export class ShowAuthedDirective implements OnInit {
1215
constructor(
1316
private templateRef: TemplateRef<any>,

ui/apps/todolist/src/app/user/profile/profile.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { Component, OnInit } from '@angular/core';
22

33
@Component({
4-
selector: 'app-profile',
5-
templateUrl: './profile.component.html',
6-
styleUrls: ['./profile.component.css']
4+
selector: 'app-profile',
5+
templateUrl: './profile.component.html',
6+
styleUrls: ['./profile.component.css'],
7+
standalone: false
78
})
89
export class ProfileComponent implements OnInit {
910

ui/jest.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getJestProjects } from '@nx/jest';
1+
import { getJestProjectsAsync } from '@nx/jest';
22

3-
export default {
4-
projects: getJestProjects(),
5-
};
3+
export default async () => ({
4+
projects: await getJestProjectsAsync(),
5+
});

0 commit comments

Comments
 (0)