Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:ronggang/PT-Plugin-Plus into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ronggang committed Dec 11, 2022
2 parents 320c272 + 727bb76 commit 5d7365d
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 39 deletions.
75 changes: 74 additions & 1 deletion resource/sites/hdatmos.club/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,78 @@
"tags": ["影视", "综合"],
"url": "https://hdatmos.club",
"host": "hdatmos.club",
"collaborator": "luoyefe"
"collaborator": "luoyefe",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "1.05",
"privilege": "一个邀请名额;直接发布种子;查看NFO文档;查看用户列表;请求续种; 发送邀请;查看排行榜;查看其它用户的种子历史;删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"privilege": "封存账号后不会被删除"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.05",
"privilege": "两个邀请名额;在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "2.45",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"privilege": "三个邀请名额;查看其它用户的评论、帖子历史;永远保留账号"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"privilege": "更新过期的外部信息;查看Extreme User论坛"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"privilege": "五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"privilege": "十个邀请名额"
}],
"selectors": {
"userSeedingTorrents": {
"prerequisites": "!user.seeding",
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": ["tr:not(:eq(0))"],
"filters": ["query.find('td.rowfollow:eq(3)').length != 0 ? query.find('td.rowfollow:eq(3)').length : query.length"]
},
"seedingSize": {
"selector": ["tr:not(:eq(0))"],
"filters": ["query.find('td.rowfollow:eq(3)').length != 0 ? jQuery.map(query.find('td.rowfollow:eq(3)'), (item)=>{return $(item).text();}) : jQuery.map(query.find('td:eq(3)'), (item)=>{return $(item).text();})", "_self.getTotalSize(query)"]
}
}
}
}
}
62 changes: 25 additions & 37 deletions src/options/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@
</v-container>
</v-card>
</v-menu>
<v-select v-model="selectedHeaders" class="select" :items="headers" :label="$t('home.selectColumns')" multiple outlined return-object>
<template v-slot:selection="{ item, index }">
<v-chip v-if="index === 0">
<span>{{ item.text }}</span>
</v-chip>
<span
v-if="index === 1"
class="grey--text caption"
>(+{{ selectedHeaders.length - 1 }} others)</span>
</template>
<v-select v-model="selectedHeaders"
class="select" :items="headers"
:label="$t('home.selectColumns')"
@change="updateViewOptions"
multiple outlined return-object>
<template v-slot:selection="{ item, index }">
<v-chip v-if="index === 0">
<span>{{ item.text }}</span>
</v-chip>
<span
v-if="index === 1"
class="grey--text caption"
>(+{{ selectedHeaders.length - 1 }} others)</span>
</template>
</v-select>

<!-- <AutoSignWarning /> -->
Expand Down Expand Up @@ -135,12 +139,9 @@
<span class="caption">{{ props.item.name }}</span>
</a>
</td>
<td v-if="showColumn('user.name')">
<td v-if="showColumn('user.name')" :title="props.item.user.id">
<template v-if="showUserName">
{{ props.item.user.name}}
<template v-if="props.item.user.id">
<br/>({{props.item.user.id}})
</template>
</template>
<template v-else>
****
Expand Down Expand Up @@ -220,10 +221,11 @@
{{ props.item.user.bonusPerHour | formatNumber }}
</template>
</td>
<td v-if="showColumn('user.joinDate')"
<td v-if="showColumn('user.joinTime')"
class="number"
:title="props.item.user.joinDateTime"
>{{ props.item.user.joinTime | timeAgo(showWeek) }}</td>
:title="props.item.user.joinDateTime">
{{ props.item.user.joinTime | timeAgo(showWeek) }}
</td>
<td v-if="showColumn('user.lastUpdateTime')" class="number">
<v-btn
depressed
Expand Down Expand Up @@ -312,7 +314,6 @@ export default Vue.extend({
text: this.$t("home.headers.userName"),
align: "left",
value: "user.name",
width: ""
},
{
text: this.$t("home.headers.levelName"),
Expand Down Expand Up @@ -383,28 +384,12 @@ export default Vue.extend({
};
},
created() {
let saveHeaders = localStorage.getItem("HomeHeaders");
console.log(saveHeaders)
if (saveHeaders && saveHeaders.length > 1)
{
let homeHeaders = saveHeaders.split(";");
this.selectedHeaders = this.headers.filter(s => homeHeaders.includes(s.value))
}
else
this.selectedHeaders = this.headers
this.init();
},
computed: {
//Done to get the ordered headers
showHeaders() : any[] {
var saveHeaders = "";
for (var header of this.headers.filter(s => this.selectedHeaders.includes(s)))
{
saveHeaders += ";"+ header.value;
}
localStorage.setItem('HomeHeaders', saveHeaders)
return this.headers.filter(s => this.selectedHeaders.includes(s));
return this.headers.filter(s => this.selectedHeaders.map(sh=>sh.value).includes(s.value));
}
},
Expand Down Expand Up @@ -469,9 +454,11 @@ console.log(saveHeaders)
showUserLevel: true,
showLevelRequirements: true,
showSeedingPoints: true,
showWeek: false
showWeek: false,
selectedHeaders: this.selectedHeaders
});
Object.assign(this, viewOptions);
this.selectedHeaders = this.headers.filter(s => this.selectedHeaders.map(sh=>sh.value).includes(s.value));
},
getInfos() {
this.loading = true;
Expand Down Expand Up @@ -786,7 +773,8 @@ console.log(saveHeaders)
showUserLevel: this.showUserLevel,
showLevelRequirements: this.showLevelRequirements,
showSeedingPoints: this.showSeedingPoints,
showWeek: this.showWeek
showWeek: this.showWeek,
selectedHeaders: this.selectedHeaders
}
});
},
Expand Down
5 changes: 4 additions & 1 deletion src/options/views/search/KeepUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<v-icon color="success" v-if="item.verified"
>done_all</v-icon
>
<v-icon color="error" v-else>clear</v-icon>
<v-icon color="error" v-on:click.prevent="deleteVerifiedItem(index)" v-else>clear</v-icon>
</v-btn>
</div>
</v-list-tile-action>
Expand Down Expand Up @@ -221,6 +221,9 @@ export default Vue.extend({
}
},
methods: {
deleteVerifiedItem(index: number){
this.$delete(this.verifiedItems, index);
},
setDownloadOptions(options: any) {
console.log(options);
this.downloadOptions = options.downloadOptions;
Expand Down

0 comments on commit 5d7365d

Please sign in to comment.