Skip to content

Commit

Permalink
fix: lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Gawain12 committed Nov 28, 2023
1 parent 0789687 commit 96d8f01
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion resource/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"downloaded":"Downloaded",
"uploads": "Uploaded",
"downloads": "Downloaded",
"TotalSeedtime":"TotalSeedtime",
"totalSeedtime":"totalSeedtime",
"snatches":"snatched",
"trueDownloaded": "True Downloaded",
"totalData":"Total Data",
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/broadcasthe.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"totalData": "100TiB",
"bonus":"250000000",
"snatches":"35000",
"TotalSeedtime":"250000",
"totalSeedtime":"250000",
"privilege": "Has access to the Overlord forum, Custom Title, Unlimited Invites, and more to come!"
}],
"searchEntry": [{
Expand Down Expand Up @@ -155,7 +155,7 @@
"query.reduce((sum, match) => sum + Number(match.split(\": \")[1]), 0)"
]
},
"TotalSeedtime": {
"totalSeedtime": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(12)",
"filters": [
"query.text().replace(/,/g,'').match(/Total Time Seeded:.+?(\\d+).+?/)",
Expand Down
4 changes: 2 additions & 2 deletions src/interface/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export interface LevelRequirement {
// 平均保种时间要求
averageSeedtime?: number;
// 总保种时间要求
TotalSeedtime?: number
totalSeedtime?: number
// 保种体积要求
seedingSize?: string | number;
// 分享率要求
Expand Down Expand Up @@ -652,7 +652,7 @@ export interface UserInfo {
// 平均保种时间
averageSeedtime?: number;
// 总保种时间
TotalSeedtime?: number;
totalSeedtime?: number;
// 时魔
bonusPerHour?: number;
// 积分页面
Expand Down
22 changes: 11 additions & 11 deletions src/options/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@
nextLevel.averageSeedtime | formatNumber
}}{{$t("home.levelRequirement.days")}} 
</template>
<template v-if="nextLevel.TotalSeedtime">
<template v-if="nextLevel.totalSeedtime">
<v-icon small color="green darken-4">timer</v-icon>{{
nextLevel.TotalSeedtime | formatNumber
nextLevel.totalSeedtime | formatNumber
}}{{$t("home.levelRequirement.days")}}&nbsp;
</template>
<template v-if="nextLevel.uploads">
Expand Down Expand Up @@ -291,8 +291,8 @@
| formatInteger
}}{{$t("home.levelRequirement.days")}};
</template>
<template v-if="levelRequirement.TotalSeedtime">
<v-icon small color="green darken-4" :title="$t('home.levelRequirement.TotalSeedtime')">timer</v-icon>{{ levelRequirement.TotalSeedtime
<template v-if="levelRequirement.totalSeedtime">
<v-icon small color="green darken-4" :title="$t('home.levelRequirement.totalSeedtime')">timer</v-icon>{{ levelRequirement.totalSeedtime
| formatInteger
}}{{$t("home.levelRequirement.days")}};
</template>
Expand Down Expand Up @@ -371,8 +371,8 @@
| formatInteger
}}{{$t("home.levelRequirement.days")}};
</template>
<template v-if="option.TotalSeedtime">
<v-icon small color="green darken-4" :title="$t('home.levelRequirement.TotalSeedtime')">timer</v-icon>{{ option.TotalSeedtime
<template v-if="option.totalSeedtime">
<v-icon small color="green darken-4" :title="$t('home.levelRequirement.totalSeedtime')">timer</v-icon>{{ option.totalSeedtime
| formatInteger
}}{{$t("home.levelRequirement.days")}};
</template>
Expand Down Expand Up @@ -1083,11 +1083,11 @@ export default Vue.extend({
nextLevel.level = levelRequirement.level;
}
}
if (levelRequirement.TotalSeedtime) {
let userTotalSeedtime = user.TotalSeedtime as number;
let requiredTotalSeedtime = levelRequirement.TotalSeedtime as number;
if (userTotalSeedtime < requiredTotalSeedtime) {
nextLevel.TotalSeedtime = requiredTotalSeedtime - userTotalSeedtime;
if (levelRequirement.totalSeedtime) {
let usertotalSeedtime = user.totalSeedtime as number;
let requiredtotalSeedtime = levelRequirement.totalSeedtime as number;
if (usertotalSeedtime < requiredtotalSeedtime) {
nextLevel.totalSeedtime = requiredtotalSeedtime - usertotalSeedtime;
nextLevel.level = levelRequirement.level;
}
}
Expand Down

0 comments on commit 96d8f01

Please sign in to comment.