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>
442
442
All
443
443
</ label >
444
444
</ li >
445
+ < li class ="checkbox ">
446
+ < label ng-click ="resetGroupsToDefault() ">
447
+ < input type ="checkbox " class ="invisible " />
448
+ Default
449
+ </ label >
450
+ </ li >
445
451
< li class ="checkbox ">
446
452
< label ng-click ="toggleGroups(false) ">
447
453
< input type ="checkbox " class ="invisible " />
Original file line number Diff line number Diff line change 114
114
return $scope . levels [ lint . level ] ;
115
115
} ;
116
116
117
- var GROUPS_FILTER_DEFAULT = {
117
+ const GROUPS_FILTER_DEFAULT = {
118
118
cargo : true ,
119
119
complexity : true ,
120
120
correctness : true ,
125
125
restriction : true ,
126
126
style : true ,
127
127
suspicious : true ,
128
+ }
129
+
130
+ $scope . groups = {
131
+ ...GROUPS_FILTER_DEFAULT
128
132
} ;
129
- $scope . groups = GROUPS_FILTER_DEFAULT ;
133
+
130
134
const THEMES_DEFAULT = {
131
135
light : "Light" ,
132
136
rust : "Rust" ,
164
168
}
165
169
} ;
166
170
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
+
167
178
$scope . selectedValuesCount = function ( obj ) {
168
179
return Object . values ( obj ) . filter ( x => x ) . length ;
169
180
}
You can’t perform that action at this time.
0 commit comments