Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
Add support for diorite
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohan Robert committed Oct 20, 2016
1 parent c5b45a2 commit 129af4f
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 80 deletions.
64 changes: 0 additions & 64 deletions appinfo.json

This file was deleted.

6 changes: 3 additions & 3 deletions config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
time_color: '#AAAAAA',
info_color: '#555555',
temperature_unit: 0,
refresh_rate: fromRefreshRate[20],
refresh_rate: 20,
weather_enabled: true,
location: '',
dark_mode: true,
Expand All @@ -102,7 +102,7 @@
info_color: color('info_color', defaults.info_color),
weather_enabled: bool('weather_enabled', defaults.weather_enabled),
location: query('location',defaults.location),
platform: queryIn('platform', ['basalt', 'chalk', 'aplite'], 'basalt'),
platform: queryIn('platform', ['basalt', 'chalk', 'aplite', 'diorite'], 'basalt'),
vibrate_on_the_hour: bool('vibrate_on_the_hour', defaults.vibrate_on_the_hour),
military_time: bool('military_time', defaults.military_time)
};
Expand All @@ -114,7 +114,7 @@
oninit: function(){
this.on('save', function() {
var dark_mode = this.get('dark_mode') == 0;
var aplite = this.get('platform') == 'aplite';
var aplite = this.get('platform') == 'aplite' || this.get('platform') == 'diorite';
var dark = '#000000';
var light = '#FFFFFF';
var foreground = function(){
Expand Down
29 changes: 16 additions & 13 deletions config/template/ConfigView.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div id="preview">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 355 355" enable-background="new 0 0 355 355" xml:space="preserve">
{{#if platform == 'basalt' || platform == "aplite"}}
{{#if platform == 'basalt' || platform == "aplite" || platform == "diorite"}}
<g>
<rect fill="{{_background_color}}" x="33.635" y="11.156" width="287.73" height="335.685"/>
<g fill="{{_time_color}}">
Expand Down Expand Up @@ -69,29 +69,28 @@
</div>
<div id="preview_spacer"></div>
<div id="content">
{{#if platform == 'aplite'}}
{{#if platform == 'aplite' || platform == 'diorite'}}
<Tabs source="{{ dark_mode_source }}" active_tab="{{ dark_mode }}" header="Color theme"/>
{{/if}}
{{#if platform != 'aplite'}}
{{else}}
<ItemColor color="{{ hour_hand_color }}" label="Hour hand color"/>
<ToggleWithItemColor toggleLabel="Use rainbow minute hand" toggleValue="{{ rainbow_mode }}" colorItemValue="{{ minute_hand_color }}" colorItemLabel="Minute hand color" footer="Overrides color selection for the minute hand" toggleFirst/>
<ItemColor color="{{ time_color }}" label="Numbers and ticks color"/>
<ItemColor color="{{ background_color }}" label="Background color"/>
{{/if}}
<Toggle label="Vibrate every full hour" value="{{ vibrate_on_the_hour }}" footer="Off during sleep tracked with Pebble Health" />
<Toggle label="Use 24h format" value="{{ military_time }}"/>
<div class="section">
<div>Date</div>
</div>
{{/if}}
{{#if platform == 'aplite'}}
{{#if platform == 'aplite' || platform == 'diorite'}}
<Toggle label="Show date" value="{{ date_displayed }}" inverted/>
{{else}}
<ToggleWithItemColor toggleLabel="Show date" toggleValue="{{ date_displayed }}" colorItemValue="{{ date_color }}" colorItemLabel="Date color" inverted/>
{{/if}}
<div class="section">
<div>Additional data</div>
</div>
{{#if platform != 'aplite'}}
{{#if platform != 'aplite' && platform != 'diorite'}}
<ItemColor color="{{ info_color }}" label="Bluetooth and weather color"/>
{{/if}}
<div class="subsection">
Expand Down Expand Up @@ -286,37 +285,37 @@
];
},
_hour_hand_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("hour_hand_color");
}
return this.foregroundColor();
},
_minute_hand_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("minute_hand_color");
}
return this.foregroundColor();
},
_info_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("info_color");
}
return this.foregroundColor();
},
_date_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("date_color");
}
return this.foregroundColor();
},
_time_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("time_color");
}
return this.foregroundColor();
},
_background_color: function(){
if(this.get("platform") != "aplite"){
if(!this.is_bw()){
return this.get("background_color");
}
return this.backgroundColor();
Expand All @@ -334,6 +333,10 @@
}
return "#000000";
},
is_bw: function(){
return this.get("platform") == "aplite" ||
this.get("platform") == "diorite";
},
onrender: function(){
this.on('reset-defaults', function() {
this.set(this.get('defaults'));
Expand Down
75 changes: 75 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"version": "1.3.0",
"author": "Gringer Apps",
"private": true,
"dependencies": {},
"keywords": [
"pebble-app"
],
"pebble": {
"sdkVersion": "3",
"resources": {
"media": [
{
"menuIcon": true,
"type": "png",
"name": "MENU_IMAGE",
"file": "images/img_menu.png"
},
{
"type": "png",
"name": "IMG_RAINBOW_HAND",
"file": "images/rainbow_hand.png"
},
{
"type": "font",
"characterRegex": "[0-9:\u00b0a-izA-IZ\\-]",
"name": "FONT_NUPE_23",
"file": "fonts/nupe.ttf"
}
]
},
"projectType": "native",
"uuid": "341a9f39-53b5-4db9-ae50-78e7dd68e544",
"messageKeys": {
"AppKeyWeatherTemperature": 13,
"AppKeyWeatherRequest": 16,
"AppKeyWeatherFailed": 15,
"AppKeyBluetoothIcon": 3,
"AppKeyWeatherEnabled": 11,
"AppKeyRefreshRate": 10,
"AppKeyTimeColor": 7,
"AppKeyTemperatureUnit": 9,
"AppKeyDateColor": 6,
"AppKeyRainbowMode": 4,
"AppKeyHourHandColor": 1,
"AppKeyInfoColor": 8,
"AppKeyBackgroundColor": 5,
"AppKeyDateDisplayed": 2,
"AppKeyWeatherIcon": 14,
"AppKeyJsReady": 17,
"AppKeyConfig": 12,
"AppKeyVibrateOnTheHour": 18,
"AppKeyMilitaryTime": 19,
"AppKeyMinuteHandColor": 0
},
"enableMultiJS": false,
"displayName": "Minimalin",
"watchapp": {
"onlyShownOnCommunication": false,
"hiddenApp": false,
"watchface": true
},
"targetPlatforms": [
"basalt",
"chalk",
"aplite",
"diorite"
],
"capabilities": [
"configurable",
"health"
]
},
"name": "Minimalin"
}
Binary file removed resources/images/img_menu.png
Binary file not shown.
Binary file added resources/images/img_menu~bw.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 added resources/images/img_menu~color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 129af4f

Please sign in to comment.