Skip to content

Commit

Permalink
Merge branch 'vertex-app:stable' into windows
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-wlj authored Feb 25, 2024
2 parents b73d97b + a85f437 commit 48483a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/libs/site/ToTheGlory.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class Site {
info.download = document.querySelector('font[color=darkred]').nextElementSibling.children[0].innerHTML.trim().replace(/(\w)B/, '$1iB');
info.download = util.calSize(...info.download.split(' '));
// 做种
info.seeding = +document.querySelector('img[src="/pic/arrowup.gif"]').nextSibling.nodeValue.trim();
info.seeding = +document.querySelector('img[src="/pic/arrowup.gif"]').nextElementSibling.textContent;
// 下载
info.leeching = +document.querySelector('img[src="/pic/arrowdown.gif"]').nextSibling.nodeValue.trim();
info.leeching = +document.querySelector('img[src="/pic/arrowdown.gif"]').nextElementSibling.textContent;
// 做种体积
const seedingDocument = await this._getDocument(`${this.index}userdetails.php?id=${info.uid}`);
const seedingTorrent = [...seedingDocument.querySelectorAll('#ka2 tr')];
Expand Down
25 changes: 21 additions & 4 deletions webui/src/pages/history/WatchCategory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
<template #title>
<span style="font-size: 16px; font-weight: bold;">监控分类任务历史</span>
</template>
<template #headerCell="{ column }">
<template v-if="column.dataIndex === 'name'">
<a-input style="margin-left: 14px; width: 140px;" size="small" placeholder="筛选种子名称" v-model:value="qs.name"></a-input>
<a-button @click="() => { qs.page = 1; listHistory(); }" style="margin-left: 4px;" size="small">筛选</a-button>
</template>
<template v-if="column.dataIndex === 'task'">
<a-input style="margin-left: 14px; width: 140px;" size="small" placeholder="筛选任务名称" v-model:value="qs.task"></a-input>
<a-button @click="() => { qs.page = 1; listHistory(); }" style="margin-left: 4px;" size="small">筛选</a-button>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'size'">
{{ $formatSize(record.size) }}
Expand Down Expand Up @@ -46,19 +56,19 @@ export default {
}, {
title: '年份',
dataIndex: 'year',
width: 24
width: 16
}, {
title: '类型',
dataIndex: 'type',
width: 24
width: 16
}, {
title: '种子大小',
dataIndex: 'size',
width: 24
}, {
title: '所属任务',
dataIndex: 'task',
width: 24
width: 60
}, {
title: '操作',
dataIndex: 'option',
Expand All @@ -69,7 +79,8 @@ export default {
page: 1,
length: 20,
type: 'rss',
rss: ''
task: '',
name: ''
};
const pagination = {
position: ['topRight', 'bottomRight'],
Expand Down Expand Up @@ -98,6 +109,12 @@ export default {
try {
const res = (await this.$api().watch.listHistory(this.qs)).data;
this.history = res;
if (this.qs.task) {
this.history = this.history.filter(item => item.task.includes(this.qs.task));
}
if (this.qs.name) {
this.history = this.history.filter(item => item.name.includes(this.qs.name));
}
this.pagination.total = res.length;
} catch (e) {
await this.$message().error(e.message);
Expand Down

0 comments on commit 48483a8

Please sign in to comment.