File tree 2 files changed +34
-3
lines changed
2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 113
113
*/
114
114
let installedList = [];
115
115
let installed = false ;
116
- $: if (installed) {
117
- installedList = sortedList .filter ((item ) => item .installed !== undefined || false );
116
+ let availableUpdates = false ;
117
+ $: if (installed || availableUpdates) {
118
+ if (availableUpdates) {
119
+ installedList = sortedList .filter (
120
+ (item ) => (item .installed !== undefined || false ) && item .installed_version !== item .latest
121
+ );
122
+ } else {
123
+ installedList = sortedList .filter ((item ) => item .installed !== undefined || false );
124
+ }
118
125
} else {
119
126
installedList = [... sortedList];
120
127
}
168
175
{neos_folder}
169
176
bind: categoryFilter
170
177
bind: installed
178
+ bind: availableUpdates
171
179
/ >
172
180
< div
173
181
class = " list grow divide-y divide-gray-200 dark:divide-gray-700"
Original file line number Diff line number Diff line change 12
12
export let searchTerm = ' ' ;
13
13
export let loaded = false ;
14
14
export let installed = false ;
15
+ export let availableUpdates = false ;
15
16
/**
16
17
* @type {string[]}
17
18
*/
56
57
filteredCategories = [... categories];
57
58
}
58
59
60
+ $: availableUpdates ? (installed = true ) : (installed = false );
61
+
59
62
/**
60
63
* @type {{ date: { commit: { author: { date: string | number | Date; }; }; }[]; }}
61
64
*/
171
174
<div class =" w-full rounded hover:bg-gray-100 dark:hover:bg-gray-600" >
172
175
<div class =" flex items-center pl-2" >
173
176
<input
177
+ disabled ={availableUpdates ? true : false }
174
178
bind:checked ={installed }
175
179
id =" checkbox-item-installed"
176
180
type =" checkbox"
179
183
/>
180
184
<label
181
185
for =" checkbox-item-installed"
186
+ class ="ml-2 w-full rounded py-2 text-sm font-medium {availableUpdates
187
+ ? ' text-gray-400 dark:text-gray-500'
188
+ : ' text-gray-900 dark:text-gray-300' }" >Installed</label
189
+ >
190
+ </div >
191
+ </div >
192
+ </li >
193
+ <li >
194
+ <div class =" w-full rounded hover:bg-gray-100 dark:hover:bg-gray-600" >
195
+ <div class =" flex items-center pl-2" >
196
+ <input
197
+ bind:checked ={availableUpdates }
198
+ id =" checkbox-item-updates"
199
+ type =" checkbox"
200
+ value =" "
201
+ class =" h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:ring-offset-gray-700 dark:focus:ring-blue-600"
202
+ />
203
+ <label
204
+ for =" checkbox-item-updates"
182
205
class =" ml-2 w-full rounded py-2 text-sm font-medium text-gray-900 dark:text-gray-300"
183
- >Installed </label
206
+ >Updates </label
184
207
>
185
208
</div >
186
209
</div >
You can’t perform that action at this time.
0 commit comments