Skip to content

Commit

Permalink
Merge pull request #14 from Izurii/fix-advanced-brightness
Browse files Browse the repository at this point in the history
Removed advanced brightness options and fixed base segments options.
  • Loading branch information
Izurii authored Apr 9, 2021
2 parents 8b5f70f + bd30335 commit 0d6c00c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"node": "=14.16.0"
},
"engineStrict": true,
"version": "v1.0.0-alpha",
"version": "v1.0.1-alpha",
"description": "",
"main": "main.js",
"author": "Izurii Hootoh <izuriihootoh@gmail.com> (https://github.com/Izurii)",
Expand Down
20 changes: 11 additions & 9 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ app.filter('htmlTrusted', ['$sce', function($sce){
$scope.selectedSegment = 0;
$scope.selectedBrightness = 3;
$scope.backlightMode = 3;
$scope.advancedBrightness = false;
// $scope.advancedBrightness = false;

// Keys size config

Expand Down Expand Up @@ -160,7 +160,9 @@ app.filter('htmlTrusted', ['$sce', function($sce){
selectedProfile: $scope.selectedProfile,
profiles: profilesArray
};

ipcRenderer.send('saveProfiles', profiles);

};

$scope.applySettings = (backlightMode=null, profileOptions=null) => {
Expand All @@ -175,10 +177,10 @@ app.filter('htmlTrusted', ['$sce', function($sce){
// User profile and segment options

const baseSegmentsOptions = [
{ segmentColor: 0, segmentBrightness : '4' },
{ segmentColor: 0, segmentBrightness : '4' },
{ segmentColor: 0, segmentBrightness : '4' },
{ segmentColor: 0, segmentBrightness : '4' }
{ segmentColor: 0, segmentBrightness : 4 },
{ segmentColor: 0, segmentBrightness : 4 },
{ segmentColor: 0, segmentBrightness : 4 },
{ segmentColor: 0, segmentBrightness : 4 }
];

var userSelectedProfile = userProfilesStore.profiles[userProfilesStore.selectedProfile];
Expand Down Expand Up @@ -329,10 +331,10 @@ app.filter('htmlTrusted', ['$sce', function($sce){

// Brightness

$scope.showHideAdvancedBrightnessOptions = () => {
if($scope.advancedBrightness) $scope.advancedBrightness = false;
else $scope.advancedBrightness = true;
};
// $scope.showHideAdvancedBrightnessOptions = () => {
// if($scope.advancedBrightness) $scope.advancedBrightness = false;
// else $scope.advancedBrightness = true;
// };

$scope.changeAllSegmentBrightness = () => {
$scope.segmentsOptions.forEach((item, idx) => {
Expand Down
11 changes: 6 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
<md-button class="md-raised" ng-click="addProfile()">ADD PROFILE</md-button>
<md-button class="md-raised" ng-click="renameProfile()">RENAME PROFILE</md-button>
<md-button class="md-raised" ng-click="deleteProfile()" ng-disabled="userProfiles.length<=1">DELETE PROFILE</md-button>
<md-button ng-click="showHideAdvancedBrightnessOptions()" class="md-raised">
<!-- <md-button ng-click="showHideAdvancedBrightnessOptions()" class="md-raised">
{{advancedBrightness ? 'Hide advanced brightness options' : 'Show advanced brightness options'}}
</md-button>
</md-button> -->
</div>
<div
layout-align="center center"
Expand Down Expand Up @@ -101,7 +101,8 @@
</div>
</div>
<div layout="row" md-whiteframe="5dp" style="min-width: 50%;" layout-align="center center" flex>
<md-input-container ng-show="!advancedBrightness" layout-margin>
<!-- <md-input-container ng-show="!advancedBrightness" layout-margin> -->
<md-input-container layout-margin>
<span>Select the brightness for the keyboard</span>
<select
aria-label="brightnessSelect"
Expand All @@ -112,7 +113,7 @@
<option ng-value="bright.brightnessValue" ng-repeat="bright in brightness">{{bright.brightnessName}}</md-option>
</select>
</md-input-container>
<div layout="column" ng-if="advancedBrightness" layout-align="center center">
<!-- <div layout="column" ng-if="advancedBrightness" layout-align="center center">
<span style="margin-top: 8px;">Select the brightness for each segment of the keyboard</span>
<div layout="row">
<div ng-repeat="segment in segmentsOptions">
Expand All @@ -128,7 +129,7 @@
</md-input-container>
</div>
</div>
</div>
</div> -->
</div>
</div>
</div>
Expand Down

0 comments on commit 0d6c00c

Please sign in to comment.