Commit 1de56035 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[ERGO] doc rating star ergonomy

parent dd2842f8
......@@ -71,10 +71,9 @@ ratingCpt = R.hooksComponentWithModule thisModule "rating" cpt
else "fa fa-star"
onClick score c = \_-> do
let c' = if score == Star_0
&& c == Star_0
then Star_1
else c
let c' = if score == c
then clickAgain c
else c
setLocalCategories $ Map.insert r._id c'
void $ launchAff
......
......@@ -41,6 +41,12 @@ star2score Star_2 = 2
star2score Star_3 = 3
star2score Star_4 = 4
clickAgain :: Star -> Star
clickAgain Star_0 = Star_1
clickAgain s = decodeStar (star2score s - 1)
------------------------------------------------------------------------
data Category = Trash | UnRead | Checked | Topic | Favorite
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment