#327413 Update dependency versions. Small refactoring.
This commit is contained in:
Родитель
b3ee208111
Коммит
b2823db0a8
|
@ -32,11 +32,7 @@ export class GroupsComponent implements OnInit {
|
|||
this._page.actionBar.title = 'Groups';
|
||||
this._route.params.subscribe(p => {
|
||||
if ('selectedTabIndex' in p) {
|
||||
let index = Number(p['selectedTabIndex']);
|
||||
// ngIf on the tab view makes it impossible to toggle it with goToTab()
|
||||
// but setting this.selectedIndex doesnt switch tabs after this initial time
|
||||
// so we use a mix of both...
|
||||
this.selectedIndex = index;
|
||||
this.goToTab(Number(p['selectedTabIndex']));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -60,6 +56,6 @@ export class GroupsComponent implements OnInit {
|
|||
}
|
||||
|
||||
goToTab(tabIndex: number) {
|
||||
this.groupsTabView.nativeElement.selectedIndex = tabIndex;
|
||||
this.selectedIndex = tabIndex;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</StackLayout>
|
||||
</StackLayout>
|
||||
|
||||
<TabView #groupsTabView *ngIf="initialized && (userGroups.length || publicGroups.length)" [selectedIndex]="selectedIndex" class="tab-view">
|
||||
<TabView #groupsTabView *ngIf="initialized && (userGroups.length || publicGroups.length)" [(ngModel)]="selectedIndex" class="tab-view">
|
||||
<ScrollView *tabItem="{ title: 'My Groups' }" class="tab-item">
|
||||
<StackLayout class="tab-items-wrapper" [ngClass]="{ 'no-groups': !userGroups.length }">
|
||||
<group-list *ngIf="userGroups.length" [groups]="userGroups" [areUserGroups]="true" (onGroupTap)="selectGroup($event)"></group-list>
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
import { Component, Input, OnInit, Output, EventEmitter, ViewChild } from '@angular/core';
|
||||
import * as nsImgSource from 'image-source';
|
||||
import * as nsImage from 'ui/image';
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
import { ImagePickerService } from '../../services';
|
||||
import { utilities, constants } from '../';
|
||||
import { utilities } from '../';
|
||||
|
||||
@Component({
|
||||
selector: 'photo-picker',
|
||||
templateUrl: 'shared/photo-picker/photo-picker.template.html',
|
||||
styleUrls: [ 'shared/photo-picker/photo-picker.component.css' ]
|
||||
})
|
||||
export class PhotoPickerComponent implements OnInit {
|
||||
resizedUrl: string;
|
||||
export class PhotoPickerComponent {
|
||||
private _resizedUrl: string;
|
||||
|
||||
@Input('url') rawUrl: string;
|
||||
@Input() type: string;
|
||||
|
@ -26,12 +24,19 @@ export class PhotoPickerComponent implements OnInit {
|
|||
private _imgPickerService: ImagePickerService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
get resizedUrl() {
|
||||
if (!this.rawUrl) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
this.resizedUrl = this._resizeAccordingly(this.rawUrl, this.type);
|
||||
if (!this._resizedUrl) {
|
||||
this._resizedUrl = this._resizeAccordingly(this.rawUrl, this.type);
|
||||
}
|
||||
return this._resizedUrl;
|
||||
}
|
||||
|
||||
set resizedUrl(newValue: string) {
|
||||
this._resizedUrl = newValue;
|
||||
}
|
||||
|
||||
onEdit(event) {
|
||||
|
|
|
@ -8,12 +8,20 @@ import { User } from '../models';
|
|||
styleUrls: [ 'shared/user-display/user-display.component.css' ]
|
||||
})
|
||||
export class UserDisplayComponent implements OnInit {
|
||||
@Input() users: User[] = [];
|
||||
private _users: User[] = [];
|
||||
|
||||
@Input('withImages') imgCount: number = null;
|
||||
@Input() showNames: boolean = false;
|
||||
|
||||
@Input() set users(newValue: User[]) {
|
||||
this._users = [].concat(newValue);
|
||||
}
|
||||
|
||||
get users() {
|
||||
return this._users;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.users = [].concat(this.users);
|
||||
if (typeof this.imgCount !== 'number') {
|
||||
this.imgCount = this.users.length;
|
||||
}
|
||||
|
|
30
package.json
30
package.json
|
@ -6,31 +6,31 @@
|
|||
"nativescript": {
|
||||
"id": "com.telerik.PushNotificationApp",
|
||||
"tns-android": {
|
||||
"version": "2.4.1"
|
||||
"version": "2.5.0"
|
||||
},
|
||||
"tns-ios": {
|
||||
"version": "2.4.0"
|
||||
"version": "2.5.0"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "2.1.0",
|
||||
"@angular/compiler": "2.1.0",
|
||||
"@angular/core": "2.1.0",
|
||||
"@angular/forms": "2.1.0",
|
||||
"@angular/http": "2.1.0",
|
||||
"@angular/platform-browser": "2.1.0",
|
||||
"@angular/platform-browser-dynamic": "2.1.0",
|
||||
"@angular/router": "3.1.0",
|
||||
"@angular/common": "2.4.6",
|
||||
"@angular/compiler": "2.4.6",
|
||||
"@angular/core": "2.4.6",
|
||||
"@angular/forms": "2.4.6",
|
||||
"@angular/http": "2.4.6",
|
||||
"@angular/platform-browser": "2.4.6",
|
||||
"@angular/platform-browser-dynamic": "2.4.6",
|
||||
"@angular/router": "3.4.6",
|
||||
"everlive-sdk": "1.9.1",
|
||||
"nativescript-angular": "1.1.0",
|
||||
"nativescript-angular": "1.4.0",
|
||||
"nativescript-imagepicker": "^2.4.1",
|
||||
"nativescript-permissions": "^1.2.0",
|
||||
"nativescript-push-notifications": "0.1.1",
|
||||
"nativescript-telerik-ui": "^1.4.1",
|
||||
"nativescript-theme-core": "^0.1.3",
|
||||
"reflect-metadata": "~0.1.8",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"tns-core-modules": "2.4.4"
|
||||
"rxjs": "~5.0.1",
|
||||
"tns-core-modules": "2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-traverse": "6.18.0",
|
||||
|
@ -38,7 +38,7 @@
|
|||
"babylon": "6.13.0",
|
||||
"lazy": "1.0.11",
|
||||
"nativescript-dev-typescript": "^0.3.2",
|
||||
"typescript": "^2.0.6",
|
||||
"zone.js": "~0.6.21"
|
||||
"typescript": "~2.1.6",
|
||||
"zone.js": "~0.7.2"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче