167
167
</LayoutContent >
168
168
<Install ref =" installRef" />
169
169
<Detail ref =" detailRef" />
170
- <TaskLog ref =" taskLogRef" @close =" search(req) " />
170
+ <TaskLog ref =" taskLogRef" @close =" refresh " />
171
171
</template >
172
172
173
173
<script lang="ts" setup>
@@ -189,6 +189,7 @@ import { newUUID, jumpToPath } from '@/utils/util';
189
189
import Detail from ' ../detail/index.vue' ;
190
190
import TaskLog from ' @/components/log/task/index.vue' ;
191
191
import { storeToRefs } from ' pinia' ;
192
+ import bus from ' @/global/bus' ;
192
193
193
194
const globalStore = GlobalStore ();
194
195
const { isProductPro } = storeToRefs (globalStore );
@@ -228,12 +229,28 @@ const detailRef = ref();
228
229
const taskLogRef = ref ();
229
230
const syncCustomAppstore = ref (false );
230
231
232
+ const refresh = () => {
233
+ search (req );
234
+ };
235
+
231
236
const search = async (req : App .AppReq ) => {
232
237
loading .value = true ;
233
238
req .pageSize = paginationConfig .pageSize ;
234
239
req .page = paginationConfig .currentPage ;
235
240
localStorage .setItem (' app-page-size' , req .pageSize + ' ' );
236
- await searchApp (req )
241
+
242
+ const customReq = {
243
+ page: req .page ,
244
+ pageSize: req .pageSize ,
245
+ tags: req .tags ,
246
+ name: req .name ,
247
+ resource: req .resource ,
248
+ showCurrentArch: req .showCurrentArch ,
249
+ };
250
+ if (syncCustomAppstore .value && req .resource === ' remote' ) {
251
+ customReq .resource = ' custom' ;
252
+ }
253
+ await searchApp (customReq )
237
254
.then ((res ) => {
238
255
apps .value = res .data .items ;
239
256
paginationConfig .total = res .data .total ;
@@ -341,6 +358,9 @@ const searchByName = () => {
341
358
};
342
359
343
360
onMounted (async () => {
361
+ bus .on (' refreshTask' , () => {
362
+ search (req );
363
+ });
344
364
if (router .currentRoute .value .query .install ) {
345
365
installKey .value = String (router .currentRoute .value .query .install );
346
366
const params = {
0 commit comments