Skip to content
This repository was archived by the owner on Apr 26, 2022. It is now read-only.

Commit

Permalink
Some cleanup :-) (tm)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianWeyer committed Sep 17, 2016
1 parent 0d9994f commit c2ad7ed
Show file tree
Hide file tree
Showing 31 changed files with 41 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/BoardZ/app/components/dashboard/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Component, OnInit} from '@angular/core';

import {GamesService} from '../../services/gamesService';
import {PlayersService} from '../../services/playersService';

Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/components/games/details.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component, OnInit} from '@angular/core';
import {Router, ActivatedRoute} from '@angular/router';

import {Game} from '../../models/game';
import {LogService} from '../../services/logService';
import {GamesService} from '../../services/gamesService';
Expand Down
3 changes: 2 additions & 1 deletion src/BoardZ/app/components/games/list.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {Component, OnInit} from '@angular/core';
import {Router, ActivatedRoute} from '@angular/router';

import {Game} from '../../models/game';
import {GamesService} from '../../services/gamesService';
import {NotificationService} from '../../services/notificationService';

@Component({
moduleId: module.id,
selector: 'game-list',
templateUrl: 'list.html'
})

export class GameListComponent implements OnInit {
public games: Game[];

Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/components/header/header.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Component, OnInit} from '@angular/core';

import {Notification} from '../../models/notification';
import {LoginService} from '../../services/loginService';
import {TokenService} from '../../services/tokenService';
Expand Down
3 changes: 2 additions & 1 deletion src/BoardZ/app/components/locateIt/locateIt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
///<reference path="../../../../../typings/main/ambient/leaflet/leaflet.d.ts" />
///<reference path="../../../../../typings/globals/leaflet/index.d.ts" />

import {Component, Output, OnInit, EventEmitter} from '@angular/core';

import {GeoLocation} from '../../models/geoLocation';
import {GeolocationService} from '../../services/geolocationService';

Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/components/login/login.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component} from '@angular/core';
import {Router} from '@angular/router';

import {LoginService} from '../../services/loginService';
import {LogService} from '../../services/logService';
import {NotificationService} from '../../services/notificationService';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/components/radiusSearch/radiusSearch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Component, OnInit} from '@angular/core';

import {GeoLocation} from '../../models/geoLocation';
import {GeolocationService} from '../../services/geolocationService';
import {PlayersService} from '../../services/playersService';
Expand Down
2 changes: 1 addition & 1 deletion src/BoardZ/app/components/sidebar/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Component} from '@angular/core';

import {NavigationEntry} from '../../models/navigationEntry';

@Component({
Expand All @@ -18,5 +19,4 @@ export class SidebarComponent {

//this.navigationEntries.push(new NavigationEntry(['/notifications'], 'bell', 'Test Notifcations'));
}

}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router} from '@angular/router';
import {Injectable} from '@angular/core';
import {TokenService} from '../services/tokenService';
import {Observable} from 'rxjs/Rx';

import {TokenService} from '../services/tokenService';

@Injectable()
export class AuthGuard implements CanActivate {
export class AuthenticationGuard implements CanActivate {

constructor(private _router: Router, private _tokenService: TokenService) {

}

public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
Expand Down
1 change: 0 additions & 1 deletion src/BoardZ/app/models/geoLocation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export class GeoLocation {

constructor(public latitude: number, public longitude: number, public zoom: number) {

}
}
1 change: 0 additions & 1 deletion src/BoardZ/app/models/picture.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export class Picture {

constructor(public pictureUrl: string) {

}
}
4 changes: 2 additions & 2 deletions src/BoardZ/app/modules/appModule.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {NgModule} from '@angular/core';
import {ModuleConfiguration} from './config';
import {SharedModule} from './sharedModule';
import {GamesModule} from './gamesModule';
import {ModuleConfiguration} from './modulesConfig';

@NgModule({
imports: [ ModuleConfiguration.App.imports, SharedModule, GamesModule],
imports: [ModuleConfiguration.App.imports, SharedModule, GamesModule],
exports: ModuleConfiguration.App.exports,
declarations: ModuleConfiguration.App.declarations,
providers: ModuleConfiguration.App.providers,
Expand Down
2 changes: 1 addition & 1 deletion src/BoardZ/app/modules/gamesModule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {ModuleConfiguration} from './config';
import {ModuleConfiguration} from './modulesConfig';
import {SharedModule} from './sharedModule';

@NgModule({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {BackButtonDirective} from '../directives/backButtonDirective';
import {CloseSidebarOnClickDirective} from '../directives/closeSidebarOnClickDirective';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule, XHRBackend, ConnectionBackend} from '@angular/http';
import {APP_ROUTING, appRoutingProviders, GAMES_ROUTING} from '../routes/index';
import {APP_ROUTING, appRoutingProviders, GAMES_ROUTING} from '../routing/routingConfig';
import {ApiConfig} from '../apiConfig';
import {HashLocationStrategy, LocationStrategy, CommonModule} from '@angular/common';
import {NativeIntegrationService} from '../services/nativeIntegrationService';
Expand Down
2 changes: 1 addition & 1 deletion src/BoardZ/app/modules/sharedModule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {ModuleConfiguration} from './config';
import {ModuleConfiguration} from './modulesConfig';

@NgModule({
declarations: ModuleConfiguration.Shared.declarations,
Expand Down
2 changes: 2 additions & 0 deletions src/BoardZ/app/resolvers/gameDetailsResolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Injectable} from '@angular/core';
import {Resolve, ActivatedRouteSnapshot} from '@angular/router';

import {Game} from '../models/game';
import {GamesService} from '../services/gamesService';

Expand All @@ -10,6 +11,7 @@ export class GameDetailsResolver implements Resolve<Game> {

resolve(route: ActivatedRouteSnapshot): Promise<Game> {
let id = route.params['id'];

return new Promise((resolve) => {
this._gamesService.getById(id).subscribe(game => {
if (game) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ import {DashboardComponent} from '../components/dashboard/dashboard';
import {LoginComponent} from '../components/login/login';
import {NotificationsComponent} from '../components/notifications/notifications';
import {RadiusSearchComponent} from '../components/radiusSearch/radiusSearch';
import {AuthGuard} from '../guards/authGuard';
import {GameDetailsResolver} from '../resolvers/gameDetailsResolver';
import {GameDetailsComponent} from '../components/games/details';
import {GameListComponent} from '../components/games/list';
import {GamesRootComponent} from '../components/games/gamesRoot';
import {AuthenticationGuard} from '../guards/authenticationGuard';

const appRootRoutes: Routes = [

{ path: '', name: 'Dashboard', canActivate: [AuthGuard], component: DashboardComponent },
{ path: '', name: 'Dashboard', canActivate: [AuthenticationGuard], component: DashboardComponent },
{ path: 'login', name: 'Login', component: LoginComponent },
{ path: 'notifications', name: 'Notifications', canActivate: [AuthGuard], component: NotificationsComponent },
{ path: 'radiussearch', name: 'RadiusSearch', canActivate: [AuthGuard], component: RadiusSearchComponent }
{ path: 'notifications', name: 'Notifications', canActivate: [AuthenticationGuard], component: NotificationsComponent },
{ path: 'radiussearch', name: 'RadiusSearch', canActivate: [AuthenticationGuard], component: RadiusSearchComponent }
];

const gameRoutes: Routes = [

{
path: 'games',
component: GamesRootComponent,
canActivate: [AuthGuard],
canActivate: [AuthenticationGuard],
children: [
{ path: 'all', component: GameListComponent, data: { displayName: 'Game overview' } },
{
Expand All @@ -43,7 +43,7 @@ const gameRoutes: Routes = [
}

];
export const appRoutingProviders: any[] = [AuthGuard];
export const appRoutingProviders: any[] = [AuthenticationGuard];

export const APP_ROUTING: ModuleWithProviders = RouterModule.forRoot(appRootRoutes);
export const GAMES_ROUTING: ModuleWithProviders = RouterModule.forChild(gameRoutes);
1 change: 1 addition & 0 deletions src/BoardZ/app/services/authenticatedHttp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Injectable} from '@angular/core';
import {Http, RequestOptionsArgs, Response, Headers} from '@angular/http';
import {Observable} from 'rxjs/Observable';

import {ApiConfig} from '../apiConfig';
import {TokenService} from './tokenService';

Expand Down
4 changes: 2 additions & 2 deletions src/BoardZ/app/services/desktopCameraService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ICameraService} from './cameraService';
import {Observable} from 'rxjs/Rx';

// Just to stop annoying TSC...
import {ICameraService} from './cameraService';

declare let window;

export class DesktopCameraService implements ICameraService {
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/gamesService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Injectable} from '@angular/core';
import {Headers} from '@angular/http';
import {Observable} from 'rxjs/Observable';

import {AuthenticatedHttp} from './authenticatedHttp';
import {Game} from '../models/game';

Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/geolocationService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Injectable} from '@angular/core';

import {GeoLocation} from '../models/geoLocation';

@Injectable()
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/logService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Injectable} from '@angular/core';

import {LogLevel} from '../models/logLevel';

@Injectable()
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/loginService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Injectable} from '@angular/core';
import {Http, Headers, RequestOptions} from '@angular/http';
import {Router} from '@angular/router';
import {Observable} from 'rxjs/Observable';

import {TokenService} from './tokenService';
import {ApiConfig} from '../apiConfig';
import {LogService} from './logService';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/mobileCameraService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Observable} from 'rxjs/Rx';
import {Observer} from 'rxjs/Rx';

import {ICameraService} from './cameraService';

declare let window;
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/nativeIntegrationService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Injectable} from '@angular/core';
import {Router} from '@angular/router';

import {PlatformInformationService} from './platformInformationService';
import {IBoardZAppWindow} from '../interfaces/boardzAppWindow';

Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/notificationService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Injectable} from '@angular/core';
import {Subject} from 'rxjs/Subject';

import {LogService} from './logService';
import {Notification} from '../models/notification';
import {NotificationType} from '../models/notificationType';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/playersService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Injectable} from '@angular/core';
import {Headers} from '@angular/http';
import {Observable} from 'rxjs/Observable';

import {GeoLocation} from '../models/geoLocation';
import {AuthenticatedHttp} from './authenticatedHttp';
import {Player} from '../models/player';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/signalrService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Injectable, EventEmitter} from '@angular/core';

import {ApiConfig} from '../apiConfig';
import {LogService} from './logService';
import {TokenService} from './tokenService';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/tokenService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';

import {LogService} from './logService';

const tokenKey: string = 'Authentication::Token';
Expand Down
1 change: 1 addition & 0 deletions src/BoardZ/app/services/uiNotificationService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Injectable} from '@angular/core';

import {NotificationService} from './notificationService';
import {Notification} from '../models/notification';
import {NotificationType} from '../models/notificationType';
Expand Down
1 change: 1 addition & 0 deletions typings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"leaflet": "registry:dt/leaflet#1.0.0+20160630180443",
"node": "registry:dt/node#6.0.0+20160909174046"
}
}

1 comment on commit c2ad7ed

@ThorstenHans
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The well known commit that keeps your profile one the project start page :)

Please sign in to comment.