From e9852ed38b6e57e871f2a89bfcc2f42d60f3a676 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 3 Sep 2020 10:17:15 +0200 Subject: Reviews: increase max character counts a bit for mini-reviews --- elm/Reviews/Edit.elm | 6 +++--- lib/VNWeb/Reviews/Edit.pm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elm/Reviews/Edit.elm b/elm/Reviews/Edit.elm index d53d2702..99a5b48e 100644 --- a/elm/Reviews/Edit.elm +++ b/elm/Reviews/Edit.elm @@ -99,8 +99,8 @@ showrel r = "[" ++ (RDate.format (RDate.expand r.released)) ++ " " ++ (String.jo view : Model -> Html Msg view model = - let minChars = if model.isfull then 900 else 200 - maxChars = if model.isfull then 100000 else 700 + let minChars = if model.isfull then 1000 else 200 + maxChars = if model.isfull then 100000 else 800 len = String.length model.text.data in form_ Submit (model.state == Api.Loading) @@ -130,7 +130,7 @@ view model = , tr [ class "newpart" ] [ td [ colspan 2 ] [ text "" ] ] , formField "Review type" [ label [] [ inputRadio "type" (model.isfull == False) (\_ -> Full False), b [] [ text " Mini review" ] - , text <| " - Recommendation-style, maximum 700 characters." ] + , text <| " - Recommendation-style, maximum 800 characters." ] , br [] [] , label [] [ inputRadio "type" (model.isfull == True ) (\_ -> Full True ), b [] [ text " Full review" ] , text " - Longer, more detailed." ] diff --git a/lib/VNWeb/Reviews/Edit.pm b/lib/VNWeb/Reviews/Edit.pm index 60b72111..dd252864 100644 --- a/lib/VNWeb/Reviews/Edit.pm +++ b/lib/VNWeb/Reviews/Edit.pm @@ -60,7 +60,7 @@ elm_api ReviewsEdit => $FORM_OUT, $FORM_IN, sub { validate_dbid 'SELECT id FROM vn WHERE id IN', $data->{vid}; validate_dbid 'SELECT id FROM releases WHERE id IN', $data->{rid} if defined $data->{rid}; - die "Review too long" if !$data->{isfull} && length $data->{text} > 700; + die "Review too long" if !$data->{isfull} && length $data->{text} > 800; $data->{text} = bb_subst_links $data->{text}; if($id) { -- cgit v1.2.3