diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 4467c78..f332f7b 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -12,31 +12,12 @@ export class AppComponent implements OnInit {
constructor(private data: DatasharingService, private selfservice: SelfService) { }
- userInfo: User;
-
- loggedIn = false;
- userID: number;
- username: string;
- handle: string;
- email: string;
- points: number;
- level: number;
-
- friendIDs: number[];
- groupIDs: number[];
- chatIDs: number[];
-
- requestIDs: number[];
-
ngOnInit() {
this.data.currentUserInfo.subscribe(user => {
- this.userInfo = user;
- console.log(this.userInfo);
- this.data.changeChatIDs(user.chatIDs);
+ if (user.loggedIn !== true) {
+ this.selfservice.checkIfLoggedIn();
+ }
});
- if (this.loggedIn !== true) {
- this.selfservice.checkIfLoggedIn();
- }
}
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 8dcff6a..10631d8 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -23,6 +23,7 @@ import { PostlistComponent } from './components/feed/postlist/postlist.component
import { GraphQLModule } from './graphql.module';
import { HttpClientModule } from '@angular/common/http';
import { ProfileComponent } from './components/profile/profile.component';
+import { GroupComponent } from './components/group/group.component';
import { ImprintComponent } from './components/imprint/imprint.component';
import { AboutComponent } from './components/about/about.component';
import { ChatcontactsComponent } from './components/chatmanager/chatcontacts/chatcontacts.component';
@@ -58,6 +59,8 @@ import { SearchComponent } from './components/search/search.component';
import {DomSanitizer} from '@angular/platform-browser';
import {MatIconRegistry} from '@angular/material/icon';
import {MatDialogModule} from '@angular/material/dialog';
+import {MatTooltipModule} from '@angular/material/tooltip';
+import {MatExpansionModule} from '@angular/material/expansion';
// import logo from 'src/assets/gv-new-logo.svg';
import logo from '!!raw-loader!./gv-new-logo-white.svg';
@@ -68,6 +71,7 @@ const config: SocketIoConfig = { url: 'http://localhost:4444', options: {} };
const appRoutes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'profile/:id', component: ProfileComponent },
+ { path: 'group/:id', component: GroupComponent },
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'about', component: AboutComponent },
@@ -96,7 +100,8 @@ const appRoutes: Routes = [
ProfileComponent,
MainNavigationComponent,
SearchComponent,
- DialogCreateGroupComponent
+ DialogCreateGroupComponent,
+ GroupComponent
],
imports: [
BrowserModule,
@@ -134,6 +139,8 @@ const appRoutes: Routes = [
MatBadgeModule,
MatProgressSpinnerModule,
MatDialogModule,
+ MatTooltipModule,
+ MatExpansionModule
],
entryComponents: [ DialogCreateGroupComponent ],
providers: [],
diff --git a/src/app/components/feed/feed.component.ts b/src/app/components/feed/feed.component.ts
index bd35acb..ef80553 100644
--- a/src/app/components/feed/feed.component.ts
+++ b/src/app/components/feed/feed.component.ts
@@ -43,7 +43,6 @@ export class FeedComponent implements OnInit {
this.feedNew = this.feedService.renderAllPosts(response.json());
this.parentSelectedPostList = this.feedNew;
this.feedMostLiked = this.feedNew;
- console.log(this.feedNew);
});
} else {
this.feedService.getAllPostsRaw().subscribe(response => {
@@ -51,10 +50,8 @@ export class FeedComponent implements OnInit {
this.feedNew = this.feedService.renderAllPosts(response.json());
this.parentSelectedPostList = this.feedNew;
this.feedMostLiked = this.feedNew;
- console.log(this.feedNew);
});
- }
-
+ }
});
}
@@ -69,7 +66,6 @@ export class FeedComponent implements OnInit {
}
showNew() {
- console.log('showNew()');
this.feedService.getAllPostsRawByUserId(this.userId).subscribe(response => {
this.feedNew = this.feedService.renderAllPosts(response.json());
this.parentSelectedPostList = this.feedNew; });
@@ -78,7 +74,6 @@ export class FeedComponent implements OnInit {
}
showMostLiked() {
- console.log('showMostLiked()');
this.feedService.getAllPostsRawByUserId(this.userId).subscribe(response => {
this.feedMostLiked = this.feedService.renderAllPosts(response.json());
this.parentSelectedPostList = this.feedMostLiked; });
@@ -90,7 +85,6 @@ export class FeedComponent implements OnInit {
refresh($event) {
this.feedService.getAllPostsRawByUserId(this.userId).subscribe(response => {
this.parentSelectedPostList = this.feedService.renderAllPosts(response.json());
- console.log('Refresh');
});
}
diff --git a/src/app/components/feed/postlist/postlist.component.html b/src/app/components/feed/postlist/postlist.component.html
index 919f013..6d6d510 100644
--- a/src/app/components/feed/postlist/postlist.component.html
+++ b/src/app/components/feed/postlist/postlist.component.html
@@ -27,7 +27,7 @@
@@ -46,12 +46,12 @@
-