diff options
Diffstat (limited to 'src/main/resources')
11 files changed, 39 insertions, 16 deletions
diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 00000000..c81c89f7 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,13 @@ +${AnsiColor.BRIGHT_RED} + ___ ___ ___ ___ + /\ \ /\__\ ___ /\ \ /\__\ + \:\ \ /:/ / /\ \ /::\ \ /:/ / + ___ /::\__\ /:/ / \:\ \ /:/\:\ \ /:/__/ + /\ /:/\/__/ /:/ / ___ /::\__\ /:/ \:\ \ /::\__\____ + \:\/:/ / /:/__/ /\__\ __/:/\/__/ /:/__/ \:\__\ /:/\:::::\__\ + \::/ / \:\ \ /:/ / /\/:/ / \:\ \ \/__/ \/_|:|~~|~ + \/__/ \:\ /:/ / \::/__/ \:\ \ |:| | + \:\/:/ / \:\__\ \:\ \ |:| | + \::/ / \/__/ \:\__\ |:| | + \/__/ \/__/ \|__| +${AnsiColor.DEFAULT} diff --git a/src/main/resources/db/migration/V1.17__drop tags column.sql b/src/main/resources/db/migration/V1.17__drop tags column.sql new file mode 100644 index 00000000..ebb2d9a6 --- /dev/null +++ b/src/main/resources/db/migration/V1.17__drop tags column.sql @@ -0,0 +1 @@ +ALTER TABLE messages_txt DROP COLUMN tags;
\ No newline at end of file diff --git a/src/main/resources/db/migration/V1.18__increase messages and replies timestamp precision.sql b/src/main/resources/db/migration/V1.18__increase messages and replies timestamp precision.sql new file mode 100644 index 00000000..5b298c46 --- /dev/null +++ b/src/main/resources/db/migration/V1.18__increase messages and replies timestamp precision.sql @@ -0,0 +1,5 @@ +ALTER TABLE replies MODIFY COLUMN ts timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP; +ALTER TABLE messages MODIFY COLUMN ts timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP; +ALTER TABLE messages MODIFY COLUMN updated timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP; +ALTER TABLE messages_txt MODIFY COLUMN updated_at timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP; +ALTER TABLE users MODIFY COLUMN lastmessage timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP; diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 2e8fad9b..423fc375 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -258,7 +258,7 @@ CREATE TABLE IF NOT EXISTS `useroptions` ( ); CREATE TABLE IF NOT EXISTS `users` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id` int(10) unsigned NOT NULL AUTO_INCREMENT(0), `nick` char(64) NOT NULL, `passw` char(32) NOT NULL, `lang` enum('en','ru','fr','fa','__') NOT NULL DEFAULT '__', diff --git a/src/main/resources/templates/layouts/note.html b/src/main/resources/templates/layouts/note.html index 42b939c0..e832dc63 100644 --- a/src/main/resources/templates/layouts/note.html +++ b/src/main/resources/templates/layouts/note.html @@ -1,5 +1,5 @@ {% import "views/macros/tags" %} <p>{{ msg | formatMessage }}</p> -{% if msg.tags.size > 0 %} +{% if msg.tags | length > 0 %} <div class="msg-tags">{{ allTags(baseUri, msg.tags | tagsList) }}</div> {% endif %}
\ No newline at end of file diff --git a/src/main/resources/templates/views/login.html b/src/main/resources/templates/views/login.html index a538cb26..11900c8d 100644 --- a/src/main/resources/templates/views/login.html +++ b/src/main/resources/templates/views/login.html @@ -117,7 +117,7 @@ <li><a href="/tag/учеба" style="left: 616px; top: 84px; width: 43px; height: 17px">учеба</a></li> </ul> -<div id="bottom1">juick.com © 2008-2018 <a href="/help/ru/contacts" rel="nofollow">Контакты</a> · <a href="/help/" rel="nofollow">Помощь</a></div> +<div id="bottom1">juick.com © 2008-2019 <a href="/help/ru/contacts" rel="nofollow">Контакты</a> · <a href="/help/" rel="nofollow">Помощь</a></div> <div id="signup"> {{ i18n("messages","label.register") }}: diff --git a/src/main/resources/templates/views/partial/footer.html b/src/main/resources/templates/views/partial/footer.html index 35972254..bb6ccb97 100644 --- a/src/main/resources/templates/views/partial/footer.html +++ b/src/main/resources/templates/views/partial/footer.html @@ -8,7 +8,7 @@ <a href="https://vk.com/juick" rel="nofollow"><i data-icon="ei-sc-vk" data-size="m"></i></a> <a href="https://www.facebook.com/JuickCom" rel="nofollow"><i data-icon="ei-sc-facebook" data-size="m"></i></a> </div> - <div id="footer-left">juick.com © 2008-2018 + <div id="footer-left">juick.com © 2008-2019 {% if links | default ('') is not empty %} <br/>{{ i18n("messages","label.sponsors") }}: {{ links | raw }} {% endif %} diff --git a/src/main/resources/templates/views/partial/message.html b/src/main/resources/templates/views/partial/message.html index b1d27ae5..bb36b25e 100644 --- a/src/main/resources/templates/views/partial/message.html +++ b/src/main/resources/templates/views/partial/message.html @@ -8,9 +8,9 @@ </div> <div class="msg-ts"> <a href="/{{ msg.user.name }}/{{ msg.mid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" - title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> - {{ msg.timestamp | prettyTime }} + <time datetime="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + title="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> + {{ msg.created | prettyTime }} </time> </a> </div> diff --git a/src/main/resources/templates/views/pm_inbox.html b/src/main/resources/templates/views/pm_inbox.html index 4f97bc86..f89b2923 100644 --- a/src/main/resources/templates/views/pm_inbox.html +++ b/src/main/resources/templates/views/pm_inbox.html @@ -12,7 +12,7 @@ <img src="{{ msg.user.avatar }}" alt="{{ msg.user.name }}"/> </a> </div> - <div class="msg-ts">{{ msg.timestamp | prettyTime }}</div> + <div class="msg-ts">{{ msg.created | prettyTime }}</div> </div> <div class="msg-txt">{{ msg | formatMessage }}</div> diff --git a/src/main/resources/templates/views/pm_sent.html b/src/main/resources/templates/views/pm_sent.html index ace25301..f0af71d3 100644 --- a/src/main/resources/templates/views/pm_sent.html +++ b/src/main/resources/templates/views/pm_sent.html @@ -19,7 +19,7 @@ <img src="{{ msg.user.avatar }}" alt="{{ msg.user.name }}"/> </a> </div> - <div class="msg-ts">{{ msg.timestamp | prettyTime }}</div> + <div class="msg-ts">{{ msg.created | prettyTime }}</div> </div> <div class="msg-txt">{{ msg | formatMessage }}</div> </div> diff --git a/src/main/resources/templates/views/thread.html b/src/main/resources/templates/views/thread.html index 47dfd000..2092cc1b 100644 --- a/src/main/resources/templates/views/thread.html +++ b/src/main/resources/templates/views/thread.html @@ -13,9 +13,9 @@ </span> <div class="msg-ts"> <a href="/{{ msg.user.name }}/{{ msg.mid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" - title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> - {{ msg.timestamp | prettyTime }} + <time datetime="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + title="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> + {{ msg.created | prettyTime }} </time> </a> </div> @@ -99,7 +99,11 @@ {% if recomm is not empty %} <div class="msg-recomms">{{ i18n("messages","message.recommendedBy") }} {% for rec in recomm %} - <a href="/{{ rec }}/">@{{ rec }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %} + {% if rec.uri.toString() is empty %} + <a href="/{{ rec.name }}/">@{{ rec.name }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %} + {% else %} + <a href="{{ rec.uri }}" data-user-uri="1">@{{ rec.name }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %} + {% endif %} {% endfor %} {% if msg.likes > recomm.size() %} {{ i18n("messages","message.recommendedOthers", msg.likes - recomm.size()) }} @@ -136,9 +140,9 @@ {% endif %} <div class="msg-ts"> <a href="/{{ msg.mid }}#{{ msg.rid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" - title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> - {{ msg.timestamp | prettyTime }} + <time datetime="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + title="{{ msg.created | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> + {{ msg.created | prettyTime }} </time> </a> </div> |