Skip to content
Permalink
Browse files

Piece Recorder added, Add-Piece Function fixed

Major update: Piece Practicing Session Recorder added
(Session-List-View & Piece-Dashboard added), Add-Piece Function fixed.
Navigation issues fixed. Login Redirection added. Folder Structure
reorganized.
  • Loading branch information
Taremeh committed Feb 10, 2017
1 parent 01eb2ce commit ad9eaea617aef29f12e01c64a599b2300b38404f
Showing with 1,439 additions and 125 deletions.
  1. +6 −0 apphovenAlpha/app/app.css
  2. +3 −1 apphovenAlpha/app/app.module.ts
  3. +16 −4 apphovenAlpha/app/app.routing.ts
  4. BIN apphovenAlpha/app/fonts/fontawesome.ttf
  5. +0 −12 apphovenAlpha/app/pages/addpiece/userPiece.model.ts
  6. +9 −3 apphovenAlpha/app/pages/home/home.component.html
  7. +8 −0 apphovenAlpha/app/pages/home/home.component.ts
  8. +6 −2 apphovenAlpha/app/pages/login/login.component.ts
  9. 0 apphovenAlpha/app/pages/{ → piece}/addpiece/addpiece-common.css
  10. +3 −3 apphovenAlpha/app/pages/{ → piece}/addpiece/addpiece.component.html
  11. +92 −99 apphovenAlpha/app/pages/{ → piece}/addpiece/addpiece.component.ts
  12. +47 −0 apphovenAlpha/app/pages/piece/piece-dashboard/piece-dashboard-common.css
  13. +30 −0 apphovenAlpha/app/pages/piece/piece-dashboard/piece-dashboard.component.html
  14. +241 −0 apphovenAlpha/app/pages/piece/piece-dashboard/piece-dashboard.component.ts
  15. +39 −0 apphovenAlpha/app/pages/piece/piece-list/piece-list-common.css
  16. +24 −0 apphovenAlpha/app/pages/piece/piece-list/piece-list.component.html
  17. +160 −0 apphovenAlpha/app/pages/piece/piece-list/piece-list.component.ts
  18. +63 −0 apphovenAlpha/app/pages/piece/piece-recorder/piece-recorder-common.css
  19. +33 −0 apphovenAlpha/app/pages/piece/piece-recorder/piece-recorder.component.html
  20. +358 −0 apphovenAlpha/app/pages/piece/piece-recorder/piece-recorder.component.ts
  21. +8 −0 apphovenAlpha/app/pages/piece/piece-recorder/timer.pipe.ts
  22. +39 −0 apphovenAlpha/app/pages/practice-session/practice-session-common.css
  23. +19 −0 apphovenAlpha/app/pages/practice-session/practice-session.component.html
  24. +77 −0 apphovenAlpha/app/pages/practice-session/practice-session.component.ts
  25. +7 −0 apphovenAlpha/app/pages/search/search-common.css
  26. +27 −0 apphovenAlpha/app/pages/search/search.component.html
  27. +102 −0 apphovenAlpha/app/pages/search/search.component.ts
  28. +11 −1 apphovenAlpha/app/shared/firebase/backend.service.ts
  29. +11 −0 apphovenAlpha/app/shared/firebase/login.service.ts
@@ -1,2 +1,8 @@
@import '~/css/core.light.css';

.ah-main-container {
/* background-image: url("res://bg"); */
background-color: #982528;
padding: 20%;

}
@@ -8,6 +8,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
// Declarations
import { AppComponent } from "./app.component";
import { TempoTermPipe } from "./pages/metronome/tempo-term.pipe";
import { TimerPipe } from "./pages/piece/piece-recorder/timer.pipe";
import { routes, navigatableComponents } from "./app.routing";

// Providers
@@ -47,7 +48,8 @@ import { ProfileModule } from "./pages/profile/profile.module";
declarations: [
AppComponent,
...navigatableComponents,
TempoTermPipe
TempoTermPipe,
TimerPipe
],
bootstrap: [AppComponent]
})
@@ -6,22 +6,30 @@ import { ProfileComponent } from "./pages/profile/profile.component";
import { MetronomeComponent } from "./pages/metronome/metronome.component";
import { ComposerComponent } from "./pages/composer/composer.component";
import { SearchComponent } from "./pages/search/search.component";
import { AddPieceComponent } from "./pages/addpiece/addpiece.component";
import { AddPieceComponent } from "./pages/piece/addpiece/addpiece.component";
import { PieceDashboardComponent } from "./pages/piece/piece-dashboard/piece-dashboard.component";
import { PieceListComponent } from "./pages/piece/piece-list/piece-list.component";
import { PieceRecorderComponent } from "./pages/piece/piece-recorder/piece-recorder.component";
import { PracticeSessionComponent } from "./pages/practice-session/practice-session.component";

export const authProviders = [
AuthGuard
];

export const routes = [
{ path: '', redirectTo: '/login', pathMatch: 'full' },
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'login', component: LoginComponent },
{ path: 'home', component: HomeComponent, canActivate: [AuthGuard] },
{ path: 'settings', component: SettingsComponent, clearHistory: true, canActivate: [AuthGuard] },
{ path: 'profile', component: ProfileComponent, canActivate: [AuthGuard] },
{ path: 'metronome', component: MetronomeComponent, canActivate: [AuthGuard] },
{ path: 'composer/:id', component: ComposerComponent, canActivate: [AuthGuard] },
{ path: 'search', component: SearchComponent, canActivate: [AuthGuard] },
{ path: 'addpiece', component: AddPieceComponent, canActivate: [AuthGuard] }
{ path: 'addpiece', component: AddPieceComponent, canActivate: [AuthGuard] },
{ path: 'piece-db/:pieceId/:originType', component: PieceDashboardComponent, canActivate: [AuthGuard] },
{ path: 'piece-list', component: PieceListComponent, canActivate: [AuthGuard] },
{ path: 'piece-recorder/:pieceId/:movementId', component: PieceRecorderComponent, canActivate: [AuthGuard] },
{ path: 'practice-session', component: PracticeSessionComponent, canActivate: [AuthGuard] },
];

// Needed for app.module.ts declaration
@@ -33,5 +41,9 @@ export const navigatableComponents = [
MetronomeComponent,
ComposerComponent,
SearchComponent,
AddPieceComponent
AddPieceComponent,
PieceDashboardComponent,
PieceListComponent,
PieceRecorderComponent,
PracticeSessionComponent
];
Binary file not shown.

This file was deleted.

@@ -1,11 +1,17 @@
<ActionBar title="Home">
</ActionBar>
<StackLayout class="ah-main-container">
<ActionBar title="Apphoven">
</ActionBar>

<StackLayout>
<Button (tap)="navigateTo('/settings')" text="Settings"></Button>
<Button (tap)="navigateTo('/profile')" text="Profile"></Button>
<Button (tap)="navigateTo('/metronome')" text="Metronome"></Button>
<Button (tap)="navigateTo('/composers')" text="Composers"></Button>
<Button (tap)="navigateTo('/search')" text="Search"></Button>
<Button (tap)="navigateTo('/piece-list')" text="Piece List"></Button>
<Button (tap)="navigateTo('/addpiece')" text="add piece"></Button>

<!-- The piece recorder can be opened via piece-list. This button is meant for testing purposes only. -->
<Button (tap)="navigateTo('/piece-recorder/1368/-1')" text="record piece"></Button>

<Button (tap)="navigateTo('/practice-session')" text="practice sessions"></Button>
</StackLayout>
@@ -1,6 +1,9 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
import { Page } from "ui/page";
import { Router } from "@angular/router";
import { AndroidApplication, AndroidActivityBackPressedEventData } from "application";
import * as application from "application";


@Component({
selector: "ah-home",
@@ -17,6 +20,10 @@ export class HomeComponent implements OnInit, OnDestroy {
console.log("Home Registiert: OnInit");
this.isAndroid = !!this.page.android;
this.page.actionBarHidden = false;
application.android.on(AndroidApplication.activityBackPressedEvent, (data: AndroidActivityBackPressedEventData) => {

});

}

ngOnDestroy() {
@@ -26,4 +33,5 @@ export class HomeComponent implements OnInit, OnDestroy {
navigateTo(page: string){
this._router.navigate([page]);
}

}
@@ -7,6 +7,8 @@ import { View } from "ui/core/view";
import { prompt } from "ui/dialogs";
import { Page } from "ui/page";
import { TextField } from "ui/text-field";
import { RouterExtensions } from "nativescript-angular/router";


import { alert, alertExt, LoginService, setHintColor, User } from "../../shared";

@@ -32,7 +34,8 @@ export class LoginComponent implements OnInit {

constructor(private _router: Router,
private userService: LoginService,
private page: Page) {
private page: Page,
private _routerExtensions: RouterExtensions) {
this.user = new User();
this.user.email = "";
this.user.password = "";
@@ -64,7 +67,8 @@ export class LoginComponent implements OnInit {
this.userService.login(this.user)
.then((data) => {
this.isAuthenticating = false;
this._router.navigate(["/home"]);
this._routerExtensions.navigate(["/home"], { clearHistory: true });
//this._router.navigate(["/home"]);
})
.catch((err) => {
this.isAuthenticating = false;
@@ -1,7 +1,7 @@
<StackLayout class="main-container">
<StackLayout #searchContainer class="search-container">
<SearchBar #sbComposer class="sb-composer" hint="Mozart" [text]="searchPhrase" (textChange)="searchComposer(sbComposer.text)"></SearchBar>
<SearchBar #sbPiece class="sb-piece" hint="Eine kleine Nachtmusik" [text]="searchPhrase" (textChange)="searchPiece(sbPiece.text)"></SearchBar>
<SearchBar #sbComposer class="sb-composer" hint="Mozart" text="{{ searchPhraseComposer }}" (textChange)="searchComposer(sbComposer.text)"></SearchBar>
<SearchBar #sbPiece class="sb-piece" hint="Eine kleine Nachtmusik" text="{{ searchPhrasePiece }}" (textChange)="searchPiece(sbPiece.text)"></SearchBar>

<StackLayout #searchComposerList class="search-composer-list">
<ListView [items]="composerArray" class="list-group" (itemTap)="onComposerItemTap($event)">
@@ -32,7 +32,7 @@
</ScrollView>
<Label class="piece-text" text="Work-Number: {{ pieceItemText.piece_work_number }}"></Label>
<Label class="piece-text" text="Movements: {{ pieceItemText.piece_movement_amount }}" visibility="{{ pieceItemText.piece_movement_amount ? 'visible' : 'collapsed' }}"></Label>
<ListView [items]="pieceMovementArray" separatorColor="white" visibility="{{ pieceMovementArray ? 'visible' : 'collapsed' }}">
<ListView [items]="pieceMovementArray" separatorColor="white">
<template let-movement="item">
<GridLayout rows="* auto" columns="*">
<StackLayout row="1" col="0" class="list-group-item" orientation="horizontal" (tap)="onMovementItemTap(movement)">

0 comments on commit ad9eaea

Please sign in to comment.
You can’t perform that action at this time.