-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat(Watermark): add protected logic #5135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's Guide by SourceryThis pull request implements protected logic for the Watermark component to prevent unauthorized removal or modification. It does this by periodically monitoring the watermark element and restoring it if any changes are detected. Sequence diagram for Watermark protection monitoringsequenceDiagram
participant W as Watermark Component
participant M as Monitor Function
participant RAF as RequestAnimationFrame
W->>M: Start monitoring
activate M
M->>M: Check watermark integrity
alt Watermark modified
M->>W: Clear watermark
W->>W: Recreate watermark
else Watermark intact
M->>RAF: Schedule next check
RAF-->>M: Next frame
end
deactivate M
State diagram for Watermark protection checksstateDiagram-v2
[*] --> Monitoring
Monitoring --> CheckingProperties: Monitor tick
CheckingProperties --> Compromised: Invalid properties detected
CheckingProperties --> Monitoring: All properties valid
Compromised --> Monitoring: Watermark restored
state CheckingProperties {
[*] --> CheckDisplay
CheckDisplay --> CheckOpacity
CheckOpacity --> CheckPosition
CheckPosition --> CheckInset
CheckInset --> CheckZIndex
CheckZIndex --> CheckBackgroundProps
CheckBackgroundProps --> [*]
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5135 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 634 634
Lines 28181 28181
Branches 4040 4040
=========================================
Hits 28181 28181 ☔ View full report in Codecov by Sentry. |
add protected logic
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #5134
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add logic to protect watermarks from being removed.
New Features:
Tests: