Skip to content

Commit

Permalink
update to 2.1.0. new launch images, visual fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
manijak committed Jun 30, 2016
1 parent 71f6051 commit 2323e3e
Show file tree
Hide file tree
Showing 25 changed files with 89 additions and 101 deletions.
Binary file modified app/App_Resources/Android/drawable-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/App_Resources/Android/drawable-ldpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/App_Resources/Android/drawable-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/App_Resources/Android/drawable-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/App_Resources/Android/drawable-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/App_Resources/Android/drawable-xxxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/App_Resources/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiresFullScreen</key>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ ActivityIndicator {
color:white;
}
.menu-title{
color:#EAEDEE;
font-size:12;
font-size:14;
text-align: center;
width:100%;
height: 20;
border-radius: 3;
background-color:#60FFFFFF;
color:#E6EAEDEE;
}
.drawer-bg{
background-color: #E6000000;
}
.view-common {
/*font-family: AppleSDGothicNeo-Light,"AppleSDGothicNeo-Light";*/
font-family: "Exo2-Light";
color:#FFFFFF;
font-size:16;
Expand Down Expand Up @@ -73,7 +69,6 @@ ActivityIndicator {


.bold{
/*font-family: "AppleSDGothicNeo-SemiBold";*/
font-family: "Exo2-Regular";
}
.thin{
Expand All @@ -98,6 +93,7 @@ ActivityIndicator {
font-size: 95;
font-family: "Exo2-Thin";
vertical-align: top;
text-align: right;
height: 100%;
}
.degree{
Expand Down Expand Up @@ -127,7 +123,6 @@ ActivityIndicator {
}

.signature{
/*font-family: "AvenirNext-Regular",'Josefin Sans';*/
font-size:10;
text-align:center;
}
Expand Down
1 change: 0 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var application = require("application");
var platform = require("platform");


var deviceScreenHeight = platform.screen.mainScreen.heightPixels;
var deviceScreenWidth = platform.screen.mainScreen.widthPixels;
console.log(deviceScreenWidth);
Expand Down
63 changes: 23 additions & 40 deletions app/main-page.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var observableModule = require("data/observable");
var ViewModel = require("./main-view-model");
var frameModule = require("ui/frame");
var statusBar = require("nativescript-status-bar");
Expand All @@ -10,7 +11,7 @@ exports.loaded = function(args){
statusBar.hide();
sideDrawer = page.getViewById("sideDrawer");
searchBar = page.getViewById("searchBar");

if (frameModule.topmost().ios) {
searchBar.ios.barStyle = UIBarStyle.Black;
searchBar.ios.translucent = true;
Expand All @@ -30,58 +31,40 @@ exports.loaded = function(args){
}
};

var isOpen = false;
exports.selectLocation = function(args) {
page.bindingContext.selectLocation(args);
sideDrawer.closeDrawer();
page.focus();
};
exports.selectLastLocation = function(args) {
page.bindingContext.selectLastUsedLocation(args);
sideDrawer.closeDrawer();
page.focus();
};

exports.showDetails = function(args){
var detailsWidget = page.getViewById("detailsWidget");
if(detailsWidget.className === "fade-slide-in")
detailsWidget.className = "fade-slide-out";
else
detailsWidget.className = "fade-slide-in";

console.log(detailsWidget.className);
/*if(isOpen){
isOpen = false;
detailsWidget.animate({
translate: { x: 0, y: 250},
opacity: 0,
duration: 1000
});
}else{
isOpen=true;
detailsWidget.animate({
translate: { x: 0, y: 0},
opacity: 1,
duration: 1000
});
}*/
}

};

exports.toggleDrawer = function(args) {
sideDrawer.toggleDrawerState();
};

exports.showSettings = function(args) {
var topmost = frameModule.topmost();

if (frameModule.topmost().ios) {
var navigationEntry = {
moduleName: "info-page",
animated:true,
transition: {
name: "fade",
duration: 600
}
};
topmost.navigate(navigationEntry);
}
else{
var navigationEntry = {
moduleName: "info-page",
animated:false
};
topmost.navigate(navigationEntry);
}
var navigationEntry = {
moduleName: "info-page",
animated:true,
transition: {
name: "fade",
duration: 600
}
};
topmost.navigate(navigationEntry);
};

exports.onItemLoading = function(args) {
Expand Down
6 changes: 5 additions & 1 deletion app/main-view-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function createViewModel() {
viewModel.imgLocationClass = "fade-out";
viewModel.imgWeatherClass = "fade-out";
viewModel.weatherIcon = "clear-day";
viewModel.showDrawer = false;
viewModel.forecastIcon = ForecastModule.getForecastIcon("default");
viewModel.currentLocation = helper.newLocation();
viewModel.lastUsedLocations = getLastUsed();
Expand Down Expand Up @@ -158,7 +159,8 @@ function createViewModel() {
curItem.lng = locationItem.geometry.location.lng;
this.addToLastUsed(curItem);
this.set("currentLocation", curItem);

this.set("showDrawer", false);

fetchWeather(this);
fetchImage(this);
}
Expand All @@ -167,6 +169,8 @@ function createViewModel() {
viewModel.selectLastUsedLocation = function(args) {
var listItem = this.lastUsedLocations.getItem(args.index);
this.set("currentLocation", listItem);

this.set("showDrawer", false);
fetchWeather(this);
fetchImage(this);

Expand Down
20 changes: 10 additions & 10 deletions app/partial/current.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@

<StackLayout marginLeft="5" col="0" class="current-details" verticalAlignment="center">
<GridLayout columns="30,70,30,*" horizontalAlignment="left" marginBottom="4">
<Label text="&#xf053;" class="w-font" col="0" horizontalAlignment="center"/>
<Label text="&#xf054;" class="w-font rain" col="0" horizontalAlignment="center"/>
<Label text="{{ currentWeather.daily.data[0].temperatureMin }}" col="1"/>
<Label text="&#xf053;" class="w-font" horizontalAlignment="center"/>
<Label text="&#xf054;" class="w-font rain" horizontalAlignment="center"/>
<Label text="{{ currentWeather.daily.data[0].temperatureMin }}" horizontalAlignment="left" col="1" />
<Label text="&#xf053;" class="w-font" col="2" horizontalAlignment="center"/>
<Label text="&#xf054;" class="w-font sunset" col="2" horizontalAlignment="center"/>
<Label text="{{ currentWeather.daily.data[0].temperatureMax }}" col="3" />
<Label text="{{ currentWeather.daily.data[0].temperatureMax }}" horizontalAlignment="left" col="3" />
</GridLayout>

<GridLayout columns="30,70,30,*" horizontalAlignment="left" marginBottom="4">
<Label text="&#xf07a;" class="w-font snow" col="0" horizontalAlignment="center"/>
<Label text="{{ currentWeather.currently.humidity }}" col="1"/>
<Label text="&#xf07a;" class="w-font snow" horizontalAlignment="center"/>
<Label text="{{ currentWeather.currently.humidity }}" horizontalAlignment="left" col="1"/>
<Label text="&#xf050;" class="w-font cloud" col="2" horizontalAlignment="center"/>
<Label text="{{ currentWeather.currently.windSpeed }}" col="3" />
<Label text="{{ currentWeather.currently.windSpeed }}" horizontalAlignment="left" col="3" />
</GridLayout>

<GridLayout columns="30,70,30,*" horizontalAlignment="left">
<Label text="&#xf051;" class="w-font sun" col="0" horizontalAlignment="center" marginBottom="0"/>
<Label text="{{ currentWeather.daily.data[0].sunriseTime }}" col="1"/>
<Label text="&#xf051;" class="w-font sun" horizontalAlignment="center" marginBottom="0"/>
<Label text="{{ currentWeather.daily.data[0].sunriseTime }}" horizontalAlignment="left" col="1"/>
<Label text="&#xf052;" class="w-font sunset" col="2" horizontalAlignment="center" marginBottom="0"/>
<Label text="{{ currentWeather.daily.data[0].sunsetTime }}" col="3" />
<Label text="{{ currentWeather.daily.data[0].sunsetTime }}" horizontalAlignment="left" col="3" />
</GridLayout>
</StackLayout>
</GridLayout>
Expand Down
3 changes: 0 additions & 3 deletions app/partial/details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<partial:forecast-icon marginTop="4" />
<Label text="{{ temperature }}" horizontalAlignment="center" marginTop="4"/>
</StackLayout>

</Repeater.itemTemplate>
</Repeater>
</ScrollView>
Expand All @@ -33,11 +32,9 @@
<Label text="{{ temperatureMax }}" class="sunset" horizontalAlignment="center" col="2" />
<Label text="{{ temperatureMin }}" class="rain" horizontalAlignment="center" col="3" />
</GridLayout>

</Repeater.itemTemplate>
</Repeater>
</ScrollView>

<Label text="{{ currentWeather.daily.summary }}" fontSize="12" marginTop="10" textWrap="true" />
</StackLayout>
</StackLayout>
32 changes: 18 additions & 14 deletions app/partial/drawer-menu.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
<StackLayout android:class="drawer-bg">
<GridLayout rows="auto,*" height="50%" id="searchLayout">
<SearchBar id="searchBar" hint="Search location" text="{{ searchText }}" fontSize="18" submit="{{ searchLocation }}" textFieldHintColor="white"/>
<ListView items="{{ searchResults }}" itemLoading="onItemLoading" itemTap="{{ selectLocation }}" row="1" margin="0,8,0,8"
<SearchBar id="searchBar" hint="Search location" text="{{ searchText }}" fontSize="20" submit="{{ searchLocation }}" textFieldHintColor="#FFFFFF"/>
<ListView items="{{ searchResults }}" itemLoading="onItemLoading" itemTap="selectLocation" row="1" margin="0,8,0,8"
backgroundColor="transparent" separatorColor="transparent">
<ListView.itemTemplate>
<GridLayout columns="auto,*" margin="2,0,5,0">
<Label text="&#xE567;" class="md-font" fontSize="14" col="0" marginBottom="2"/>
<Label text="{{ formatted_address }}" fontSize="16" col="1" marginLeft="3"/>
</GridLayout>

<StackLayout>
<GridLayout columns="auto,*" margin="2,0,8,0">
<Label text="&#xE567;" class="md-font" fontSize="16" col="0" marginBottom="2"/>
<Label text="{{ formatted_address }}" fontSize="16" col="1" marginLeft="3"/>
</GridLayout>
</StackLayout>
</ListView.itemTemplate>
</ListView>
</GridLayout>
<GridLayout rows="auto,*" height="50%" padding="10,8,0,8">
<Label text="Last visited" textWrap="true" horizontalAlignment="center" class="menu-title" fontSize="14"/>
<ListView items="{{ lastUsedLocations }}" itemLoading="onItemLoading" itemTap="{{ selectLastUsedLocation }}" row="1" marginTop="5"
<GridLayout rows="auto,auto,*" height="50%" padding="10,8,0,8">
<StackLayout height="1" backgroundColor="#30FFFFFF" />
<Label text="Last visited" horizontalAlignment="center" class="menu-title" marginTop="5" row="1"/>
<ListView items="{{ lastUsedLocations }}" itemLoading="onItemLoading" itemTap="selectLastLocation" row="2" marginTop="5"
backgroundColor="transparent" separatorColor="transparent">
<ListView.itemTemplate>
<GridLayout columns="auto,*" margin="2,0,5,0">
<Label text="&#xE55F;" class="md-font" fontSize="14" col="0" marginBottom="2"/>
<Label text="{{ city + ', ' + country }}" fontSize="16" col="1" marginLeft="3"/>
</GridLayout>
<StackLayout>
<GridLayout columns="auto,*" margin="2,0,8,0">
<Label text="&#xE55F;" class="md-font" fontSize="16" col="0" marginBottom="2"/>
<Label text="{{ city + ', ' + country }}" fontSize="16" col="1" marginLeft="3"/>
</GridLayout>
</StackLayout>
</ListView.itemTemplate>
</ListView>
</GridLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/util/forecast-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports.getForecastIcon = function(conditionCode){
return forecastIcon;
case "wind":
forecastIcon.iconCode1 = "\uf105";
forecastIcon.iconCode2 = "\f115";
forecastIcon.iconCode2 = "\uf115";
forecastIcon.iconClass1 = "cloud";
forecastIcon.iconClass2 = "cloud";
return forecastIcon;
Expand Down
48 changes: 27 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
{
"name": "fancy-weather",
"description": "Fancy Weather App",
"license": "APACHE 2.0",
"readme": "Fancy Weather App",
"repository": "https://github.com/manijak/fancy-weather",
"nativescript": {
"id": "org.nativescript.fancyweather",
"tns-ios": {
"version": "2.0.1"
},
"tns-android": {
"version": "2.0.0"
}
},
"dependencies": {
"nativescript-image-cache-it": "^1.5.0",
"nativescript-pulltorefresh": "^1.1.4",
"nativescript-status-bar": "^1.0.1",
"nativescript-telerik-ui": "^1.1.1",
"tns-core-modules": "2.0.1"
}
"name": "fancy-weather",
"description": "Fancy Weather App",
"license": "APACHE 2.0",
"readme": "Fancy Weather App",
"repository": "https://github.com/manijak/fancy-weather",
"nativescript": {
"id": "org.nativescript.fancyweather",
"tns-android": {
"version": "2.1.1"
},
"tns-ios": {
"version": "2.1.0"
}
},
"dependencies": {
"nativescript-image-cache-it": "^1.5.0",
"nativescript-pulltorefresh": "^1.1.4",
"nativescript-status-bar": "^1.0.1",
"nativescript-telerik-ui": "^1.2.0",
"tns-core-modules": "^2.1.0"
},
"devDependencies": {
"babel-traverse": "6.10.4",
"babel-types": "6.11.1",
"babylon": "6.8.2",
"lazy": "1.0.11"
}
}

0 comments on commit 2323e3e

Please sign in to comment.