Skip to content

Commit

Permalink
Fix: changing ui theme only works after two tries
Browse files Browse the repository at this point in the history
  • Loading branch information
cavearr committed Oct 29, 2024
1 parent ba848fe commit 128934a
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 38 deletions.
60 changes: 52 additions & 8 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion app/scripts/controllers/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,10 @@ angular
// Theme support
$scope.selectTheme = function (theme) {
if (profile.get("uiTheme") !== theme) {
console.log('[UITHEME]==>'+theme);
profile.set("uiTheme", theme);
//-- Shared variable for ace-editor blocks in "profile.js"
setTimeout(function(){
//-- Shared variable for ace-editor blocks in "profile.js"
global.uiTheme = theme;
//-- Load selected profile
utils.loadProfile(profile);
Expand All @@ -1085,6 +1087,8 @@ angular
});
}
);

} ,1000);
//ICEpm.publishAt('all', 'ui.updateTheme', { uiTheme: theme });
}
};
Expand Down
1 change: 1 addition & 0 deletions app/scripts/services/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@ angular.module('icestudio')

// Update dependencies
if (opt.deps !== false) {
console.log('DEPS',opt);
var types = this.findSubDependencies(p, common.allDependencies);
for (var t in types) {
p.dependencies[types[t]] = common.allDependencies[types[t]];
Expand Down
37 changes: 10 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
"grunt-zip": "^0.18.2",
"npm-platform-dependencies": "0.1.0",
"nw": "0.83.0",
"nw-builder": "^4.5.4"},
"darwinDependencies": {
"nw-builder": "^4.5.4"
},
"dependencies": {
"fs-xattr": "^0.4.0",
"grunt-appdmg": "github:agoodney/grunt-appdmg"
}
Expand Down

0 comments on commit 128934a

Please sign in to comment.