Skip to content

Commit

Permalink
fix: updated hubble link for thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
NickIliev committed Jul 4, 2019
1 parent 7ecbfc1 commit 40ca980
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/pages/hubble/hubble.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Label [text]="news.name" class="h2" textWrap="true"></Label>
<!-- <Label [text]="news.release.url" class="h4" textAlignment="center"></Label> -->
<Image *ngIf="isAndroid" [src]="news.release.thumbnail" loadMode="async" stretch="aspectFill"></Image>
<Image *ngIf="!isAndroid" [src]="news.release.thumbnail" height="200" loadMode="async" stretch="aspectFill"></Image>
<Image *ngIf="!isAndroid" [src]="news.release.thumbnail" loadMode="async" stretch="aspectFit"></Image>

<StackLayout >
<Label [text]="news.release.isExpanded ? 'hide' : 'see the whole story'" (tap)="onExpand(i)" class="h4" opacity="0.7"></Label>
Expand Down
6 changes: 2 additions & 4 deletions app/pages/hubble/hubble.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ export class HubbleComponent {
this._hubbleService.getNews().subscribe(result => {
(<Array<News>>result).forEach(singleNews => {
let release: any;

this._hubbleService.getRelease("http://hubblesite.org/api/v3/news_release/" + singleNews["news_id"])
this._hubbleService.getRelease("https://hubblesite.org/api/v3/news_release/" + singleNews["news_id"])
.subscribe(newsRelease => {
release = new NewsRelease(
newsRelease["name_id"],
newsRelease["name"],
newsRelease["url"],
newsRelease["abstract"],
newsRelease["mission"],
newsRelease["thumbnail"],
"https:" + newsRelease["thumbnail"],
newsRelease["publication"],
false);

this.latestNews.push(new News(singleNews["news_id"], singleNews["name"], release));
});
});
Expand Down
4 changes: 2 additions & 2 deletions app/services/hubble.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class HubbleService {
RELEASE_URL: string;

constructor(private _http: HttpClient) {
this.API_URL = "http://hubblesite.org/api/v3/news";
this.RELEASE_URL = "http://hubblesite.org/news_release/news/";
this.API_URL = "https://hubblesite.org/api/v3/news";
this.RELEASE_URL = "https://hubblesite.org/news_release/news/";
}

getRelease(releaseUrl: string) {
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
"version": "6.0.0-2019-06-27-141115-01"
},
"tns-ios": {
"version": "6.0.0-rc-2019-06-28-105002-01"
"version": "6.0.0-2019-07-03-115841-01"
}
},
"dependencies": {
"@angular/animations": "8.0.0",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/animations": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"nativescript-angular": "next",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"nativescript-angular": "8.1.0-next-2019-07-04-092208-01",
"nativescript-app-center": "^1.0.3",
"nativescript-cardview": "^3.2.0",
"nativescript-permissions": "^1.3.6",
Expand All @@ -31,8 +31,8 @@
"nativescript-theme-core": "^1.0.6",
"nativescript-ui-sidedrawer": "androidx",
"reflect-metadata": "~0.1.13",
"rxjs": "^6.5.2",
"tns-core-modules": "next",
"rxjs": "^6.3.3",
"tns-core-modules": "6.1.0-next-2019-07-03-144356-02",
"zone.js": "^0.9.1"
},
"devDependencies": {
Expand All @@ -45,10 +45,10 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"nativescript-dev-webpack": "1.0.0-next-2019-06-28-135258-05",
"tns-platform-declarations": "next",
"tslint": "^5.11.0",
"typescript": "3.4.1"
"typescript": "~3.4.5"
},
"scripts": {
"tslint": "tslint -p tsconfig.json",
Expand Down
3 changes: 0 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ module.exports = env => {
],
projectRoot,
webpackConfig: config,
targetArchs: ["arm", "arm64", "ia32"],
useLibs: true,
androidNdkPath: "/Library/android-sdk-macosx/ndk-bundle"
}));
}

Expand Down

0 comments on commit 40ca980

Please sign in to comment.