summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-01-08 14:09:38 +0100
committerYorhel <git@yorhel.nl>2020-01-08 14:09:40 +0100
commit274f42136b35255768fcdc151cda5dca42bb418c (patch)
treec16b4110394d40a325f06722f395a13d5b924b8c /lib
parent63f5fc988b86e543fa4d161d10786ce8d9ddbaeb (diff)
ulist: Add vote dropdown again
As in: Provide some voting guidance again and optimize for the common case where you vote with a whole number.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/Elm.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VNWeb/Elm.pm b/lib/VNWeb/Elm.pm
index d9bdd7cc..0c8b42eb 100644
--- a/lib/VNWeb/Elm.pm
+++ b/lib/VNWeb/Elm.pm
@@ -15,6 +15,7 @@ use Exporter 'import';
use List::Util 'max';
use VNDB::Config;
use VNDB::Types;
+use VNDB::Func 'fmtrating';
use VNWeb::Auth;
our @EXPORT = qw/
@@ -292,6 +293,7 @@ sub write_types {
$data .= def releaseTypes => 'List (String, String)' => list map tuple(string $_, string $RELEASE_TYPE{$_}), keys %RELEASE_TYPE;
$data .= def rlistStatus => 'List (Int, String)' => list map tuple($_, string $RLIST_STATUS{$_}), keys %RLIST_STATUS;
$data .= def boardTypes => 'List (String, String)' => list map tuple(string $_, string $BOARD_TYPE{$_}{txt}), keys %BOARD_TYPE;
+ $data .= def ratings => 'List String' => list map string(fmtrating $_), 1..10;
write_module Types => $data;
}