浏览代码

Merge branch 'login' of jonathan-hinds/JhipsterGroupProject-Client into login

父节点
当前提交
e479e66cfa

+ 117
- 0
jhipster-jdl-3.jh 查看文件

@@ -0,0 +1,117 @@
1
+entity AccountDetails{
2
+    profile Profile,
3
+    firstName String,
4
+    lastName String,
5
+    password Password,
6
+    securityQuestion String,
7
+    securityAnswer SecurityAnswer,
8
+    email String,
9
+    phoneNumber String
10
+}
11
+
12
+entity Profile{
13
+	account AccountDetails,
14
+    profilePic Photo,
15
+    bio String,
16
+    featurePhotos Album,
17
+    private Boolean
18
+}
19
+
20
+entity Post {
21
+    profile Profile,
22
+	comment Comment,
23
+    commentCount Long,
24
+    timeStamp Date,
25
+    scheduleTime Date,
26
+    content String,
27
+    photo Photo,
28
+    video Video,
29
+    memo Memo,
30
+  	likes Long,
31
+    dislikes Long
32
+}
33
+
34
+entity Comment {
35
+	profile Profile,
36
+    timeStamp Date,
37
+    content String,
38
+    likes Long,
39
+    dislikes Long
40
+}
41
+
42
+entity Album{
43
+    photo Photo,
44
+    name String,
45
+    description String,
46
+    creationDate Date
47
+}
48
+
49
+entity Friend{
50
+	user Profile,
51
+    friend Profile,
52
+    status String,
53
+    topFriend Boolean
54
+}
55
+
56
+entity Memo{
57
+	memoURL String,
58
+    size Long,
59
+    type String
60
+}
61
+
62
+entity Video {
63
+    videoURL String,
64
+    size Long,
65
+    type String
66
+}
67
+
68
+entity Photo {
69
+    userId Long,
70
+ 	imageURL String,
71
+    size Long,
72
+    type String
73
+}
74
+
75
+relationship OneToOne {
76
+	AccountDetails to User  
77
+}
78
+
79
+relationship OneToOne {
80
+	User to Profile
81
+}
82
+
83
+relationship OneToMany {
84
+	Profile to Post
85
+}
86
+
87
+relationship OneToMany {
88
+	Post to Comment
89
+}
90
+
91
+relationship OneToMany {
92
+	Profile to Album
93
+}
94
+
95
+relationship ManyToMany {
96
+	Album to Photo
97
+}
98
+
99
+relationship ManyToMany{
100
+	Post to Photo
101
+}
102
+
103
+relationship ManyToMany{
104
+    Post to Video
105
+}
106
+
107
+relationship ManyToMany{
108
+    Post to Memo
109
+}
110
+
111
+relationship OneToMany{
112
+	Profile to Friend{user}
113
+}
114
+
115
+relationship ManyToOne{
116
+	Friend{friend} to Profile
117
+}

+ 1
- 1
src/main/webapp/app/layouts/navbar/navbar.component.html 查看文件

@@ -11,7 +11,7 @@
11 11
     <div class="navbar-collapse collapse" id="navbarResponsive" [ngbCollapse]="isNavbarCollapsed" [ngSwitch]="isAuthenticated()">
12 12
         <ul class="navbar-nav ml-auto">
13 13
             <li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
14
-                <a class="nav-link" routerLink="/" (click)="collapseNavbar()">
14
+                <a class="nav-link" routerLink="/" (click)="collapseNavbar();trace();">
15 15
                     <span>
16 16
                         <fa-icon icon="home"></fa-icon>
17 17
                         <span jhiTranslate="global.menu.home">Home</span>

+ 4
- 1
src/main/webapp/app/layouts/navbar/navbar.component.ts 查看文件

@@ -3,7 +3,6 @@ import { Router } from '@angular/router';
3 3
 import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
4 4
 import { JhiLanguageService } from 'ng-jhipster';
5 5
 import { SessionStorageService } from 'ngx-webstorage';
6
-
7 6
 import { VERSION } from 'app/app.constants';
8 7
 import { JhiLanguageHelper, Principal, LoginModalService, LoginService } from 'app/core';
9 8
 import { ProfileService } from '../profiles/profile.service';
@@ -46,6 +45,10 @@ export class NavbarComponent implements OnInit {
46 45
         });
47 46
     }
48 47
 
48
+    trace() {
49
+        console.log('here you are');
50
+    }
51
+
49 52
     changeLanguage(languageKey: string) {
50 53
         this.sessionStorage.store('locale', languageKey);
51 54
         this.languageService.changeLanguage(languageKey);

+ 3
- 5
src/main/webapp/app/shared/login/login.component.html 查看文件

@@ -1,6 +1,6 @@
1 1
 <div class="modal-header">
2 2
     <h4 class="modal-title" jhiTranslate="login.title">Sign in</h4>
3
-    <button aria-label="Close" data-dismiss="modal" class="close" type="button" (click)="activeModal.dismiss('closed')"><span aria-hidden="true">x</span>
3
+    <button aria-label="Close" data-dismiss="modal" class="close" type="button"><span aria-hidden="true">x</span>
4 4
     </button>
5 5
 </div>
6 6
 <div class="modal-body">
@@ -14,13 +14,11 @@
14 14
             <form class="form" role="form" (ngSubmit)="login()">
15 15
                 <div class="form-group">
16 16
                     <label class="username-label" for="username" jhiTranslate="global.form.username">Login</label>
17
-                    <input type="text" class="form-control" name="username" id="username" placeholder="{{'global.form.username.placeholder' | translate}}"
18
-                    [(ngModel)]="username">
17
+                    <input type="text" class="form-control" name="username" id="username" placeholder="{{'global.form.username.placeholder' | translate}}" [(ngModel)]="username">
19 18
                 </div>
20 19
                 <div class="form-group">
21 20
                     <label for="password" jhiTranslate="login.form.password">Password</label>
22
-                    <input type="password" class="form-control" name="password" id="password" placeholder="{{'login.form.password.placeholder' | translate}}"
23
-                           [(ngModel)]="password">
21
+                    <input type="password" class="form-control" name="password" id="password" placeholder="{{'login.form.password.placeholder' | translate}}" [(ngModel)]="password">
24 22
                 </div>
25 23
                 <div class="form-check">
26 24
                     <label class="form-check-label" for="rememberMe">

+ 5
- 7
src/main/webapp/app/shared/login/login.component.ts 查看文件

@@ -1,5 +1,4 @@
1 1
 import { Component, AfterViewInit, Renderer, ElementRef } from '@angular/core';
2
-import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
3 2
 import { Router } from '@angular/router';
4 3
 import { JhiEventManager } from 'ng-jhipster';
5 4
 
@@ -23,8 +22,7 @@ export class JhiLoginModalComponent implements AfterViewInit {
23 22
         private stateStorageService: StateStorageService,
24 23
         private elementRef: ElementRef,
25 24
         private renderer: Renderer,
26
-        private router: Router,
27
-        public activeModal: NgbActiveModal
25
+        private router: Router // public activeModal: NgbActiveModal
28 26
     ) {
29 27
         this.credentials = {};
30 28
     }
@@ -40,7 +38,7 @@ export class JhiLoginModalComponent implements AfterViewInit {
40 38
             rememberMe: true
41 39
         };
42 40
         this.authenticationError = false;
43
-        this.activeModal.dismiss('cancel');
41
+        // this.activeModal.dismiss('cancel');
44 42
     }
45 43
 
46 44
     login() {
@@ -52,7 +50,7 @@ export class JhiLoginModalComponent implements AfterViewInit {
52 50
             })
53 51
             .then(() => {
54 52
                 this.authenticationError = false;
55
-                this.activeModal.dismiss('login success');
53
+                // this.activeModal.dismiss('login success');
56 54
                 if (this.router.url === '/register' || /^\/activate\//.test(this.router.url) || /^\/reset\//.test(this.router.url)) {
57 55
                     this.router.navigate(['']);
58 56
                 }
@@ -76,12 +74,12 @@ export class JhiLoginModalComponent implements AfterViewInit {
76 74
     }
77 75
 
78 76
     register() {
79
-        this.activeModal.dismiss('to state register');
77
+        // this.activeModal.dismiss('to state register');
80 78
         this.router.navigate(['/register']);
81 79
     }
82 80
 
83 81
     requestResetPassword() {
84
-        this.activeModal.dismiss('to state requestReset');
82
+        // this.activeModal.dismiss('to state requestReset');
85 83
         this.router.navigate(['/reset', 'request']);
86 84
     }
87 85
 }

+ 0
- 2
src/main/webapp/app/shared/login/login.route.ts 查看文件

@@ -1,6 +1,4 @@
1 1
 import { Route } from '@angular/router';
2
-
3
-import { RegisterComponent } from 'app/account';
4 2
 import { JhiLoginModalComponent } from 'app/shared';
5 3
 
6 4
 export const loginRoute: Route = {