Open
Conversation
- Fix seeding quantity: Count deduplicated table rows instead of reading incorrect 588 - Fix seeding size: Add deduplication when accumulating torrent sizes - Use torrent ID (details.php?id=XXX) as unique identifier for deduplication - Resolve issue where haidan site returns 100% duplicated data in HTML fragment
- When site is marked as offline, allow deleting today data with all zeros - Fix metadata.lastUserInfo cache not updating after deletion - Remove debug console.log from UserDataTimeline
Reviewer's GuideThis PR overhauls error site handling by retrieving and displaying the last valid historical data for error or empty responses, prioritizing and visually highlighting these sites, refining deletion permissions and metadata sync, and extending the haidan site parser to fetch seeding stats via AJAX. Entity relationship diagram for user info and metadata after deletionerDiagram
USER_INFO_STORE {
siteId string
date string
userInfo object
}
METADATA_STORE {
lastUserInfo object
}
USER_INFO_STORE ||--o{ METADATA_STORE : updates
USER_INFO_STORE ||--o{ USER_INFO_HISTORY : contains
USER_INFO_HISTORY {
date string
status enum
userInfo object
}
METADATA_STORE ||--o| USER_INFO_HISTORY : syncs with
USER_INFO_STORE ||--o| USER_INFO_HISTORY : has
Class diagram for updated IUserInfoItem and related logicclassDiagram
class IUserInfoItem {
siteUserConfig: ISiteUserConfig
historyUpdateAt?: number
sortPriority?: number
}
IUserInfoItem --|> IUserInfo
class IUserInfo {
status
updateAt
bonus
levelName
joinTime
uploaded
downloaded
seeding
seedingSize
messageCount
}
class ISiteUserConfig {
isOffline
}
class MetadataStore {
lastUserInfo: Record<TSiteID, IUserInfo>
}
class ConfigStore {
tableBehavior
updateTableBehavior()
myDataTableControl
}
class TableData {
value: IUserInfoItem[]
}
class isEmptyUserInfo {
+isEmptyUserInfo(userInfo: Partial<IUserInfo>): boolean
}
class updateTableData {
+updateTableData()
}
updateTableData --> isEmptyUserInfo
updateTableData --> MetadataStore
updateTableData --> TableData
updateTableData --> ConfigStore
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
此 PR 在 fix: 允许删除离线站点当天获取的错误数据 的基础上,进一步改进了错误站点的显示逻辑:
主要改进
错误状态显示历史数据:当站点报错或获取到空数据时,系统会从历史记录中查找最后一次有效的非空数据并显示,而不是显示空白。
更新时间双重显示:
空数据智能判断:
错误状态置顶显示:
sortPriority字段,确保错误状态和空数据状态的站点始终置顶显示computedSortBy和handleSortByUpdate确保排序逻辑正常工作视觉错误指示器:
error-blink动画)error-blink-chip动画)技术细节
isEmptyUserInfo函数来检测用户数据是否为空historyUpdateAt和sortPriority字段到IUserInfoItem接口updateTableData中实现了历史数据查找和优先级计算逻辑这些改进确保了用户在遇到站点错误时能够:
Summary by Sourcery
Improve MyData display by showing historical user info when fetch errors or returns empty, adding dual update timestamps and blinking error indicators, ensuring faulty sites sort to the top, refining history deletion logic and metadata updates, and extending the Haidan site plugin with AJAX-based seeding data extraction.
New Features:
Enhancements: