diff --git a/VERSION b/VERSION index 338a5b5d8fec491b97978114dc35e36348fa56a7..24ba9a38de68d00674ec97b283a967699716b9f4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.6 +2.7.0 diff --git a/templates/shortcuts.html.ep b/templates/shortcuts.html.ep index 0954d00ae013287a262fe18c6de2816151b9eadc..800b9785bf8afe23758ec698c377cceb26e4e579 100644 --- a/templates/shortcuts.html.ep +++ b/templates/shortcuts.html.ep @@ -32,9 +32,8 @@ <thead> <tr> <th class="text-left">Zkratka</th> - <th class="text-left">PĹ™idano</th> - <th class="text-left">URL</th> - <th class="text-left">PĹ™esmÄ›rovánĂ</th> + <th class="text-left">PĹ™idáno</th> + <th class="text-left">Stránka</th> <th class="text-left">Kliky</th> <th class="text-left"></th> </tr> @@ -43,8 +42,9 @@ <tr v-for="shortcut in shortcuts" > <td v-bind:title="shortcut.title" class="text-bold w-32" @click="showInfo(shortcut)" >{{shortcut.shortcut}}</td> <td class="text-bold w-32" @click="showInfo(shortcut)" >{{ formatTimestamp(shortcut.created) }}</td> - <td v-bind:title="shortcut.title" @click="showInfo(shortcut)" >{{ stripURL(shortcut.url) }}</td> - <td class="w-24" @click="showInfo(shortcut)">{{ shortcut.code == 301 ? '301 trvalĂ©' : '302 doÄŤasnĂ©'}}</td> + <td v-bind:title="shortcut.title" @click="showInfo(shortcut)" >{{ strip(shortcut.url, 64) }} + <div class="text-xs text-grey-200 pt-1">{{ strip(shortcut.title, 72) }}</div> + </td> <td class="w-16 text-right" @click="showInfo(shortcut)">{{shortcut.counter}}</td> <td class="w-40"> <i class="ico--link cursor-pointer mx-1" @click="showInfo(shortcut)" title="Zkopirovat odkaz"></i> @@ -152,7 +152,6 @@ </div> <script type="module"> - const MAX_URL_LENGTH = 50; const BASE_URL = "/api/shortcuts"; const API_HEADERS = { "Content-Type": "application/json", @@ -249,11 +248,11 @@ }) }, - stripURL: function(url) { - if ( url.length > MAX_URL_LENGTH ) { - url = url.substring(0, MAX_URL_LENGTH) + '...'; + strip: function(text, size) { + if ( typeof text === "string" && text.length > size ) { + text = text.substring(0, size) + '...'; } - return url; + return text; }, formatTimestamp: function(timestamp) {