diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 89617e1..c38ca0a 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,5 +1,5 @@ -import { TestBed, async } from '@angular/core/testing'; -import { AppComponent } from './app.component'; +import {async, TestBed} from '@angular/core/testing'; +import {AppComponent} from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f332f7b..5e15e30 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit } from '@angular/core'; -import { User } from './models/user'; -import { DatasharingService } from './services/datasharing.service'; -import { SelfService } from './services/selfservice/self.service'; +import {Component, OnInit} from '@angular/core'; +import {DatasharingService} from './services/datasharing.service'; +import {SelfService} from './services/selfservice/self.service'; @Component({ selector: 'app-root', @@ -10,12 +9,13 @@ import { SelfService } from './services/selfservice/self.service'; }) export class AppComponent implements OnInit { - constructor(private data: DatasharingService, private selfservice: SelfService) { } + constructor(private data: DatasharingService, private selfservice: SelfService) { + } ngOnInit() { this.data.currentUserInfo.subscribe(user => { if (user.loggedIn !== true) { - this.selfservice.checkIfLoggedIn(); + this.selfservice.checkIfLoggedIn().subscribe(); } }); } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 99d543d..6a32cee 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,43 +1,40 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { RouterModule, Routes } from '@angular/router'; -import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io'; -import { HttpModule } from '@angular/http'; +import {BrowserModule, DomSanitizer} from '@angular/platform-browser'; +import {NgModule} from '@angular/core'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {RouterModule, Routes} from '@angular/router'; +import {SocketIoConfig, SocketIoModule} from 'ngx-socket-io'; +import {HttpModule} from '@angular/http'; -import { AppComponent } from './app.component'; -import { DocumentListComponent } from './components/document-list/document-list.component'; -import { DocumentComponent } from './components/document/document.component'; -import { RegisterComponent } from './components/register/register.component'; -import { LoginComponent } from './components/login/login.component'; -import { ChatComponent } from './components/chat/chat.component'; -import { FriendsComponent } from './components/social/friends/friends.component'; -import { FeedComponent } from './components/feed/feed.component'; -import { HomeComponent } from './components/home/home.component'; -import { SocialComponent } from './components/social/social.component'; -import { GroupsComponent } from './components/social/groups/groups.component'; -import { DialogCreateGroupComponent } from './components/social/groups/groups.component'; -import { DialogCreateEventComponent } from './components/group/group.component'; -import { ChatmanagerComponent } from './components/chatmanager/chatmanager.component'; -import { ChatlistComponent } from './components/chatlist/chatlist.component'; -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'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import {AppComponent} from './app.component'; +import {DocumentListComponent} from './components/document-list/document-list.component'; +import {DocumentComponent} from './components/document/document.component'; +import {RegisterComponent} from './components/register/register.component'; +import {LoginComponent} from './components/login/login.component'; +import {ChatComponent} from './components/chat/chat.component'; +import {FriendsComponent} from './components/social/friends/friends.component'; +import {FeedComponent} from './components/feed/feed.component'; +import {HomeComponent} from './components/home/home.component'; +import {SocialComponent} from './components/social/social.component'; +import {DialogCreateGroupComponent, GroupsComponent} from './components/social/groups/groups.component'; +import {DialogCreateEventComponent, GroupComponent} from './components/group/group.component'; +import {ChatmanagerComponent} from './components/chatmanager/chatmanager.component'; +import {ChatlistComponent} from './components/chatlist/chatlist.component'; +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 {ImprintComponent} from './components/imprint/imprint.component'; +import {AboutComponent} from './components/about/about.component'; +import {ChatcontactsComponent} from './components/chatmanager/chatcontacts/chatcontacts.component'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {MatTableModule} from '@angular/material/table'; -import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import {InfiniteScrollModule} from 'ngx-infinite-scroll'; import {UserlistComponent} from './components/userlist/userlist.component'; -import { MatSliderModule } from '@angular/material/slider'; -import { MatFormFieldModule } from '@angular/material/form-field'; +import {MatSliderModule} from '@angular/material/slider'; +import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; -import { ReactiveFormsModule} from '@angular/forms'; -import {MatIconModule} from '@angular/material/icon'; +import {MatIconModule, MatIconRegistry} from '@angular/material/icon'; import {MatToolbarModule} from '@angular/material/toolbar'; import {MatSidenavModule} from '@angular/material/sidenav'; import {MatTabsModule} from '@angular/material/tabs'; @@ -45,44 +42,39 @@ import {MatCardModule} from '@angular/material/card'; import {MatButtonToggleModule} from '@angular/material/button-toggle'; import {MatSelectModule} from '@angular/material/select'; import {MatCheckboxModule} from '@angular/material/checkbox'; -import { OverlayModule} from '@angular/cdk/overlay'; +import {OverlayModule} from '@angular/cdk/overlay'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import {MatMenuModule} from '@angular/material/menu'; import {MatRippleModule} from '@angular/material/core'; import {MatBadgeModule} from '@angular/material/badge'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { MainNavigationComponent } from './components/main-navigation/main-navigation.component'; -import { LayoutModule } from '@angular/cdk/layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatListModule } from '@angular/material/list'; +import {FlexLayoutModule} from '@angular/flex-layout'; +import {MainNavigationComponent} from './components/main-navigation/main-navigation.component'; +import {LayoutModule} from '@angular/cdk/layout'; +import {MatButtonModule} from '@angular/material/button'; +import {MatListModule} from '@angular/material/list'; import {MatSortModule} from '@angular/material/sort'; -import { SearchComponent } from './components/search/search.component'; -import {DomSanitizer} from '@angular/platform-browser'; -import {MatIconRegistry} from '@angular/material/icon'; +import {SearchComponent} from './components/search/search.component'; import {MatDialogModule} from '@angular/material/dialog'; import {MatTooltipModule} from '@angular/material/tooltip'; import {MatExpansionModule} from '@angular/material/expansion'; import {MatDatepickerModule} from '@angular/material/datepicker'; -import {MatNativeDateModule} from '@angular/material/'; +import {MatNativeDateModule, MatProgressBarModule} from '@angular/material/'; import {MatSnackBarModule} from '@angular/material/snack-bar'; +import {DialogFileUploadComponent} from './components/profile/fileUpload/fileUpload.component'; -// import logo from 'src/assets/gv-new-logo.svg'; -import logo from '!!raw-loader!./gv-new-logo-white.svg'; -import logo_green from '!!raw-loader!./gv-new-logo.svg'; - -const config: SocketIoConfig = { url: 'http://localhost:4444', options: {} }; +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 }, - { path: 'imprint', component: ImprintComponent }, + {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}, + {path: 'imprint', component: ImprintComponent}, ]; @NgModule({ @@ -111,6 +103,7 @@ const appRoutes: Routes = [ GroupComponent, DialogCreateEventComponent, UserlistComponent, + DialogFileUploadComponent, ], imports: [ BrowserModule, @@ -128,7 +121,7 @@ const appRoutes: Routes = [ MatIconModule, BrowserAnimationsModule, MatSliderModule, - MatFormFieldModule , + MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatToolbarModule, @@ -155,16 +148,21 @@ const appRoutes: Routes = [ MatExpansionModule, MatDatepickerModule, MatSnackBarModule, + MatProgressBarModule, + ], + entryComponents: [ + DialogCreateGroupComponent, + DialogCreateEventComponent, + DialogFileUploadComponent ], - entryComponents: [ DialogCreateGroupComponent, DialogCreateEventComponent ], providers: [], bootstrap: [AppComponent] }) export class AppModule { constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) { - iconRegistry.addSvgIconLiteral( - 'logo', sanitizer.bypassSecurityTrustHtml(logo)); - iconRegistry.addSvgIconLiteral( - 'logo_green', sanitizer.bypassSecurityTrustHtml(logo_green)); + iconRegistry.addSvgIcon( + 'logo', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-white.svg')); + iconRegistry.addSvgIcon( + 'logo_green', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-flat.svg')); } - } +} diff --git a/src/app/components/about/about.component.html b/src/app/components/about/about.component.html index 13f59fa..5bf352e 100644 --- a/src/app/components/about/about.component.html +++ b/src/app/components/about/about.component.html @@ -1,72 +1,74 @@
We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet as much as we do.
-There are different levels you can reach through green behaviour. - Collect 100 points to level up! The levels are called: -
-level | -{{level.level}} | -level name | -{{level.name}} | -
---|
There is an always growing list of things you can do, - to support your environment - and earn points to level up at the same time. - You can get a different amount of points - for differnet actions you can see in the list below: -
-points | -{{action.points}} | -action | -{{action.name}} | -
---|
level | +{{level.level}} | +level name | +{{level.name}} | +
---|
There is an always growing list of things you can do, + to support your environment + and earn points to level up at the same time. + You can get a different amount of points + for differnet actions you can see in the list below: +
+description | -{{action.description}} | -points | +{{action.points}} | +
---|
-