Skip to content

Commit

Permalink
Fix model and search-first toggling in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
smathot committed Mar 9, 2024
1 parent 861582f commit ea18d03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions heymans/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,18 @@
},
searchFirst: {
get() {
this.menuVisible; // depend on this to force update
return sigmundSettings.search_first;
},
set(value) {
sigmundSettings.search_first = value;
this.searchFirstIcon = value ? 'fas fa-toggle-on' : 'fas fa-toggle-off';
this.searchFirstIcon = (value === 'true') ? 'fas fa-toggle-on' : 'fas fa-toggle-off';
setSetting('search_first', value);
}
},
modelConfig: {
get() {
this.menuVisible; // depend on this to force update
return sigmundSettings.model_config;
},
set(value) {
Expand All @@ -285,7 +287,7 @@
return '/api/conversation/new';
},
toggleSearchFirst: function() {
this.searchFirst = !sigmundSettings.search_first;
this.searchFirst = (sigmundSettings.search_first === 'true' ? 'false' : 'true')
},
toggleMenu: function() {
this.menuVisible = !this.menuVisible;
Expand Down

0 comments on commit ea18d03

Please sign in to comment.