Skip to content

Commit

Permalink
[optimization] hipy static filter core
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Jun 30, 2024
1 parent 4cb55f7 commit 6667bf3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/renderer/src/pages/setting/editSource/Sift.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
<t-button block @click="actionClass">{{ $t('pages.setting.editSource.sift.rule.ctry') }}</t-button>
</div>
<div class="code-op-item card">
<t-button block :loading="isVisible.batchFetchLoading" @click="batchResults">{{ $t('pages.setting.editSource.sift.rule.br') }}</t-button>
<t-button block :loading="isVisible.batchFetchLoading" @click="batchResults">{{
$t('pages.setting.editSource.sift.rule.br') }}</t-button>
</div>
<div class="code-op-item card">
<t-textarea v-model="form.filter" :label="$t('pages.setting.editSource.sift.rule.filter')"
Expand Down Expand Up @@ -489,9 +490,14 @@ const actionClass = () => {
if (Object.keys(response).length > 0) {
response.m.split("&").map((x, i) => {
set.add({ m: x, title: response.title.split("&")[i] })
})
});
let rs = uniqueObjectsByProperty(Array.from(set), 'm');
if (cate_exclude.length > 0) {
let excludeCategories = cate_exclude.split(/\|/).filter(e => e);
rs = rs.filter(x => !excludeCategories.some(s => s.includes(x.title)));
};
var rs = uniqueObjectsByProperty(Array.from(set), 'm');
response = concatenateObjects(rs);
}
Expand Down

0 comments on commit 6667bf3

Please sign in to comment.