diff --git a/VERSION b/VERSION index 197c4d5c2d7c724b4cd0048f4e3574bb3fa5c8db..005119baaa0653ca59d923010341d8341daa8c43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.0 +2.4.1 diff --git a/lib/PZ/Controller/Shortcut.pm b/lib/PZ/Controller/Shortcut.pm index 2e7b354497ef3c55d81e3f4f0598b2a51f1db669..199dd2a2706219e4f5265c2abd07d9941a89c4c1 100644 --- a/lib/PZ/Controller/Shortcut.pm +++ b/lib/PZ/Controller/Shortcut.pm @@ -5,7 +5,7 @@ use Data::Validate::URI qw(is_uri); use Image::PNG::QRCode 'qrpng'; use Mojo::UserAgent; -use constant SHORTCUT => qr/^[a-z\d\-]{1,8}$/; +use constant SHORTCUT => qr/^[a-z\d\-]{1,32}$/; sub redirect ($c) { my $shortcut = $c->schema->resultset('Shortcut')->search({ diff --git a/openapi.yaml b/openapi.yaml index 578a1e964be305236fca973796a0bc920444a044..1c0897c3834c4b37c557e10855f0afb923156c40 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -26,7 +26,7 @@ components: id: type: integer readOnly: true - maxLength: 8 + maxLength: 32 created: type: string description: Datum přidání diff --git a/sql/migrations.sql b/sql/migrations.sql index 6b1bb5c0629de4fb82fe385b28371a8c18932265..ac505595d1dc2b78b0bc645e54710350baa7ca18 100644 --- a/sql/migrations.sql +++ b/sql/migrations.sql @@ -74,3 +74,7 @@ from "log" -- 6 up alter table "shortcuts" add column "counter" integer not null default 0; + +-- 7 up +alter table "shortcuts" alter column "shortcut" type varchar(32); + diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 9ea2c3bd2e2f7d4c9eb8c163a0c4c72634f542ff..44d69cd36eab0ee14bb07d759d3cda622d817725 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -82,7 +82,7 @@ </ui-app> </nav> -<div id="App" class="container container--default py-8"> +<div class="container container--default py-8"> <section> <main> <%= content %> diff --git a/templates/shortcuts.html.ep b/templates/shortcuts.html.ep index f2fc2967d0c1e309adca8dbd30d96fd8a238926e..10d2b69dd067f2a6091e2133f72f8070ff416112 100644 --- a/templates/shortcuts.html.ep +++ b/templates/shortcuts.html.ep @@ -15,7 +15,7 @@ <div class="form-field col-span-3"> <label class="form-field__label" for="shortcut">Zkratka</label> <div class="form-field__wrapper form-field__wrapper--shadowed"> - <input type="text" name="shortcut" class="text-input form-field__control w-40" size="8" maxlength="8" value="" placeholder="thc" v-model="shortcut.shortcut" @focus="formError=''"/> + <input type="text" name="shortcut" class="text-input form-field__control w-40" size="16" maxlength="32" value="" placeholder="thc" v-model="shortcut.shortcut" @focus="formError=''"/> <button class="btn btn--grey-125 btn--hoveractive ml-4"> <div class="btn__body">Zkrátit</div> </button>