diff --git a/.angular-cli.json b/.angular-cli.json index 024a10c2..d614eecc 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -7,10 +7,7 @@ { "root": "src", "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], + "assets": ["assets", "favicon.ico"], "index": "index.html", "main": "main.ts", "polyfills": "polyfills.ts", @@ -19,6 +16,7 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ + "../node_modules/font-awesome/scss/font-awesome.scss", "css/style.scss" ], "scripts": [], diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 6e87a003..00000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/CHANGELOG.md b/CHANGELOG.md index 332105d5..cf3737a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v 3.9.8 (2018/04/29) (codename: Adi) + +* [PERF] - performance optimization using pipes with function utils +* [NEW] - cards videos & playlists rounded styles +* [UPGRADE] - app menu with animation in/out +* [REFACTOR] - using now more css utils to reduce css code +* [REFACTOR] - app-search component restructure + ## v 3.9.7 (2018/03/17) * [NEW] - added "Developed With YouTube" badge diff --git a/package.json b/package.json index fad50da4..d8c0d58e 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "echoes-player", - "version": "3.9.7", + "version": "3.9.8", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", - "start:prod": "ng serve --prod", + "start:prod": "ng serve --aot --build-optimizer", "build": "ng build", - "build:prod": "ng build --prod", + "build:prod": "ng build --aot --build-optimizer", "build:env": "node config/build-env.js", "postinstall": "npm rebuild node-sass", "copy:heroku": "shx cp -r ./config/heroku/*.* ./dist", @@ -33,15 +33,17 @@ "@angular/platform-browser": "5.2.7", "@angular/platform-browser-dynamic": "5.2.7", "@angular/router": "5.2.7", - "@ngrx/router": "1.0.0-beta.2", "core-js": "^2.4.1", "http-server": "0.10.0", + "memo-decorator": "1.0.1", + "node-sass": "4.7.2", "replace": "0.3.0", "rxjs": "^5.5.2", + "sass-loader": "7.0.1", "zone.js": "^0.8.14" }, "devDependencies": { - "@angular/cli": "^1.6.6", + "@angular/cli": "1.7.4", "@angular/compiler-cli": "5.2.7", "@angular/language-service": "5.2.7", "@ngrx/effects": "5.2.0", @@ -51,17 +53,16 @@ "@types/gapi": "0.0.35", "@types/gapi.auth2": "0.0.46", "@types/gapi.youtube": "3.0.34", - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/youtube": "0.0.31", "bootstrap-sass": "3.3.7", "codelyzer": "^4.0.1", "font-awesome": "4.7.0", - "jasmine-core": "~2.6.2", + "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~1.7.1", - "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", @@ -70,14 +71,14 @@ "ngrx-store-localstorage": "0.2.4", "ngx-infinite-scroll": "^0.8.2", "ngx-tooltip": "0.0.9", - "ngx-typeahead": "0.1.0", + "ngx-typeahead": "0.2.1", "ngx-youtube-player": "0.1.0", "prettier": "1.11.1", "protractor": "~5.1.2", "rimraf": "2.6.1", "shx": "0.2.2", "ts-node": "~3.2.0", - "tslint": "~5.7.0", - "typescript": "~2.4.2" + "tslint": "~5.9.1", + "typescript": "~2.5.3" } } diff --git a/src/app/app.component.scss b/src/app/app.component.scss index d7aa82d7..b2138190 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -2,24 +2,18 @@ :host { // DEFAULT THEME - 'arctic' - + background-color: var(--app-bg-color); display: block; height: 100%; - + .container-main { height: 100vh; display: block; - transition: margin .3s ease-out; + transition: margin 0.3s ease-out; margin-left: 0; } } -@media (min-width: 320px) { - :host .container-fluid.container-main { - padding-right: 0; - padding-left: 0; - } -} @media (min-width: 768px) { :host .closed + .container-main { margin-left: $sidebar-closed-width; @@ -29,4 +23,4 @@ :host .container-main { margin-left: $drawer-width; } -} \ No newline at end of file +} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b15b29d5..95e307ad 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,6 +3,7 @@ import { VersionCheckerService } from './core/services/version-checker.service'; import { Component, HostBinding, OnInit } from '@angular/core'; import { EchoesState } from '@store/reducers'; import { getSidebarCollapsed, getAppTheme } from '@store/app-layout'; +import { AppApi } from '@core/api/app.api'; @Component({ selector: 'body', @@ -15,8 +16,13 @@ export class AppComponent implements OnInit { @HostBinding('class') style = 'arctic'; - constructor(private store: Store, private versionCheckerService: VersionCheckerService) { + constructor( + private store: Store, + private versionCheckerService: VersionCheckerService, + private appApi: AppApi + ) { versionCheckerService.start(); + appApi.checkUserAuth(); } ngOnInit() { diff --git a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.scss b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.scss index 36103e0f..ca4c1d03 100644 --- a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.scss +++ b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.scss @@ -2,36 +2,6 @@ @media (min-width: 320px) { :host { - @keyframes pulse { - 0% { - transform: scale(0); - opacity: 1; - } - 50% { - transform: scale(1); - opacity: 0.5; - } - 100% { - transform: scale(1.5); - opacity: 0; - } - } - - @keyframes slideInDown { - 0% { - transform: scale(0.4); - opacity: 0; - } - - 100% { - transform: scale(1); - opacity: 1; - } - } - .pulse { - animation: pulse 2s infinite; - } - .btn-toggle { padding: 1rem 1.5rem; font-size: 2rem; @@ -46,22 +16,31 @@ .menu-dropdown { position: absolute; right: 0; - top: -35rem; min-width: 250px; z-index: $zindex-navbar-fixed; + transform-origin: top right; + + &.end-animation { + top: -35rem; + } &.slideInDown { animation: slideInDown 0.5s 1; top: 5rem; transform-origin: top right; } - .menu-backdrop { - position: fixed; - top: 0; - bottom: 0; - right: 0; - left: 0; + &.slideOutDown { + animation: slideOutDown 0.8s 1 forwards; + top: 5rem; + transform-origin: top right; } } + .menu-backdrop { + position: fixed; + top: 0; + bottom: 0; + right: 0; + left: 0; + } } } diff --git a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.spec.ts b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.spec.ts index ded9179a..8af977b0 100644 --- a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.spec.ts +++ b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.spec.ts @@ -2,18 +2,21 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AppNavbarMenuComponent } from './app-navbar-menu.component'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; describe('AppNavbarMenuComponent', () => { let component: AppNavbarMenuComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AppNavbarMenuComponent], - schemas: [NO_ERRORS_SCHEMA] + beforeEach( + async(() => { + TestBed.configureTestingModule({ + declarations: [AppNavbarMenuComponent], + schemas: [NO_ERRORS_SCHEMA], + imports: [NoopAnimationsModule] + }).compileComponents(); }) - .compileComponents(); - })); + ); beforeEach(() => { fixture = TestBed.createComponent(AppNavbarMenuComponent); diff --git a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.ts b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.ts index d9cad873..28490c03 100644 --- a/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.ts +++ b/src/app/containers/app-navbar/app-navbar-menu/app-navbar-menu.component.ts @@ -1,4 +1,13 @@ -import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter, HostListener } from '@angular/core'; +import { + Component, + OnInit, + ChangeDetectionStrategy, + Input, + Output, + EventEmitter, + HostListener +} from '@angular/core'; +import { expandFadeInAnimation } from '@shared/animations/fade-in.animation'; enum Key { Backspace = 8, @@ -14,16 +23,19 @@ enum Key { @Component({ selector: 'app-navbar-menu', + animations: [expandFadeInAnimation], template: ` +