2018-03-22 02:44:18 +00:00
|
|
|
component Rating(value float64, userCount int, user *arn.User)
|
2017-10-20 16:26:23 +00:00
|
|
|
if user == nil
|
2018-04-19 20:01:28 +00:00
|
|
|
.anime-rating.tip(aria-label="Rated by " + stringutils.Plural(userCount, "user"))= fmt.Sprintf("%.1f", value)
|
2017-10-20 16:26:23 +00:00
|
|
|
else
|
2018-04-19 20:01:28 +00:00
|
|
|
.anime-rating.tip(aria-label="Rated by " + stringutils.Plural(userCount, "user"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|