File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,12 @@ <h1>Clippy Lints</h1>
442442 All
443443 </ label >
444444 </ li >
445+ < li class ="checkbox ">
446+ < label ng-click ="resetGroupsToDefault() ">
447+ < input type ="checkbox " class ="invisible " />
448+ Default
449+ </ label >
450+ </ li >
445451 < li class ="checkbox ">
446452 < label ng-click ="toggleGroups(false) ">
447453 < input type ="checkbox " class ="invisible " />
Original file line number Diff line number Diff line change 114114 return $scope . levels [ lint . level ] ;
115115 } ;
116116
117- var GROUPS_FILTER_DEFAULT = {
117+ const GROUPS_FILTER_DEFAULT = {
118118 cargo : true ,
119119 complexity : true ,
120120 correctness : true ,
125125 restriction : true ,
126126 style : true ,
127127 suspicious : true ,
128+ }
129+
130+ $scope . groups = {
131+ ...GROUPS_FILTER_DEFAULT
128132 } ;
129- $scope . groups = GROUPS_FILTER_DEFAULT ;
133+
130134 const THEMES_DEFAULT = {
131135 light : "Light" ,
132136 rust : "Rust" ,
164168 }
165169 } ;
166170
171+ $scope . resetGroupsToDefault = function ( ) {
172+ const groups = $scope . groups ;
173+ for ( const [ key , value ] of Object . entries ( GROUPS_FILTER_DEFAULT ) ) {
174+ groups [ key ] = value ;
175+ }
176+ } ;
177+
167178 $scope . selectedValuesCount = function ( obj ) {
168179 return Object . values ( obj ) . filter ( x => x ) . length ;
169180 }
You can’t perform that action at this time.
0 commit comments