mirror of
https://github.com/lockfale/OSINT-Framework.git
synced 2026-08-17 19:35:41 +02:00
Add half-star and 0-star community ratings (THE-122)
- HTML: Star rating uses .star-pos/.star-click split zones for half-star precision (data-value 0.5 increments); .star-zero-btn for clearing/ setting 0-star rating - CSS: .star-icon.half-filled uses CSS gradient clip for split-color; .star-click overlays are position:absolute invisible hit areas; .star-zero-btn styled as small circle badge - JS: _applyStarFill handles full/half/user-rated states; _castRating and _renderVoteUI updated to use .star-pos/.star-click/.star-zero-btn selectors and parseFloat for 0.5-step values - Worker: rating validation updated to allow 0-5 in 0.5 increments; sum stored with parseFloat to preserve decimal accuracy Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
+1
-1
@@ -134,7 +134,7 @@ async function handleTrack(request, env) {
|
||||
|
||||
/**
|
||||
* POST /api/vote
|
||||
* Body: { tool_id: string, rating: 1|2|3|4|5|null, session_hash: string }
|
||||
* Body: { tool_id: string, rating: 0|0.5|1|...|5|null, session_hash: string }
|
||||
* rating=null removes the current rating (toggle off)
|
||||
*
|
||||
* Returns: { ok: true, average: number, count: number, userRating: number|null }
|
||||
|
||||
Reference in New Issue
Block a user