From 7aaa3f9a29c280f01c677c918932620be45cdbd7 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Thu, 8 Nov 2018 21:38:27 +0300
Subject: Merge everything into single Spring Boot application
---
juick-server/src/docs/index.adoc | 3 -
juick-server/src/main/assets/embed.js | 334 ----
juick-server/src/main/assets/logo.png | Bin 2447 -> 0 bytes
juick-server/src/main/assets/logo@2x.png | Bin 4822 -> 0 bytes
juick-server/src/main/assets/scripts.js | 935 ----------
juick-server/src/main/assets/style.css | 956 -----------
.../src/main/java/com/cliqset/xrd/Alias.java | 62 -
.../src/main/java/com/cliqset/xrd/Expires.java | 58 -
.../src/main/java/com/cliqset/xrd/Link.java | 151 --
.../src/main/java/com/cliqset/xrd/Property.java | 75 -
.../src/main/java/com/cliqset/xrd/Signature.java | 21 -
.../src/main/java/com/cliqset/xrd/Subject.java | 62 -
.../src/main/java/com/cliqset/xrd/Title.java | 68 -
.../src/main/java/com/cliqset/xrd/XRD.java | 166 --
.../main/java/com/cliqset/xrd/XRDConstants.java | 26 -
.../main/java/com/cliqset/xrd/XRDException.java | 35 -
.../main/java/com/cliqset/xrd/package-info.java | 33 -
.../src/main/java/com/juick/ApiServer.java | 16 -
.../java/com/juick/server/ActivityPubManager.java | 331 ----
.../java/com/juick/server/CommandsManager.java | 540 ------
.../main/java/com/juick/server/EmailManager.java | 165 --
.../java/com/juick/server/KeystoreManager.java | 92 -
.../main/java/com/juick/server/ServerManager.java | 295 ----
.../java/com/juick/server/SignatureManager.java | 113 --
.../java/com/juick/server/TelegramBotManager.java | 412 -----
.../src/main/java/com/juick/server/TopManager.java | 54 -
.../main/java/com/juick/server/TwitterManager.java | 125 --
.../src/main/java/com/juick/server/Utils.java | 45 -
.../java/com/juick/server/WebsocketManager.java | 174 --
.../main/java/com/juick/server/XMPPConnection.java | 693 --------
.../src/main/java/com/juick/server/XMPPServer.java | 429 -----
.../java/com/juick/server/api/ApiSocialLogin.java | 302 ----
.../src/main/java/com/juick/server/api/Index.java | 54 -
.../main/java/com/juick/server/api/Messages.java | 201 ---
.../java/com/juick/server/api/Notifications.java | 221 ---
.../src/main/java/com/juick/server/api/PM.java | 116 --
.../src/main/java/com/juick/server/api/Post.java | 245 ---
.../main/java/com/juick/server/api/Service.java | 166 --
.../src/main/java/com/juick/server/api/Tags.java | 54 -
.../src/main/java/com/juick/server/api/Users.java | 179 --
.../com/juick/server/api/activity/Profile.java | 379 -----
.../juick/server/api/activity/model/Activity.java | 23 -
.../juick/server/api/activity/model/Context.java | 123 --
.../api/activity/model/activities/Accept.java | 6 -
.../api/activity/model/activities/Announce.java | 6 -
.../api/activity/model/activities/Block.java | 6 -
.../api/activity/model/activities/Create.java | 6 -
.../api/activity/model/activities/Delete.java | 6 -
.../api/activity/model/activities/Follow.java | 6 -
.../server/api/activity/model/activities/Like.java | 6 -
.../server/api/activity/model/activities/Undo.java | 6 -
.../server/api/activity/model/objects/Hashtag.java | 6 -
.../server/api/activity/model/objects/Image.java | 15 -
.../server/api/activity/model/objects/Key.java | 24 -
.../server/api/activity/model/objects/Link.java | 15 -
.../server/api/activity/model/objects/Mention.java | 12 -
.../server/api/activity/model/objects/Note.java | 64 -
.../activity/model/objects/OrderedCollection.java | 25 -
.../model/objects/OrderedCollectionPage.java | 58 -
.../server/api/activity/model/objects/Person.java | 87 -
.../juick/server/api/apple/AppSiteAssociation.java | 49 -
.../com/juick/server/api/hostmeta/HostMeta.java | 25 -
.../main/java/com/juick/server/api/rss/Feeds.java | 75 -
.../com/juick/server/api/rss/MessagesView.java | 153 --
.../java/com/juick/server/api/rss/RepliesView.java | 111 --
.../server/api/rss/extension/JuickModule.java | 33 -
.../api/rss/extension/JuickModuleGenerator.java | 70 -
.../server/api/rss/extension/JuickModuleImpl.java | 54 -
.../api/rss/extension/JuickModuleParser.java | 42 -
.../com/juick/server/api/webfinger/Resource.java | 51 -
.../juick/server/api/webfinger/model/Account.java | 24 -
.../com/juick/server/api/webfinger/model/Link.java | 31 -
.../juick/server/api/webhooks/TelegramWebhook.java | 57 -
.../java/com/juick/server/api/xnodeinfo2/Info.java | 51 -
.../server/api/xnodeinfo2/model/NodeInfo.java | 54 -
.../juick/server/api/xnodeinfo2/model/Server.java | 40 -
.../server/api/xnodeinfo2/model/ServiceInfo.java | 24 -
.../juick/server/api/xnodeinfo2/model/Usage.java | 31 -
.../server/api/xnodeinfo2/model/UserStats.java | 31 -
.../configuration/ActivityPubClientConfig.java | 22 -
.../ActivityPubClientErrorHandler.java | 35 -
.../server/configuration/ApiAppConfiguration.java | 76 -
.../server/configuration/BaseWebConfiguration.java | 63 -
.../server/configuration/SapeConfiguration.java | 39 -
.../juick/server/configuration/SecurityConfig.java | 215 ---
.../server/configuration/StorageConfiguration.java | 20 -
.../juick/server/configuration/TelegramConfig.java | 15 -
.../server/configuration/WwwAppConfiguration.java | 120 --
.../com/juick/server/configuration/XMPPConfig.java | 55 -
.../server/helpers/annotation/UserCommand.java | 50 -
.../juick/server/util/HttpBadRequestException.java | 32 -
.../juick/server/util/HttpForbiddenException.java | 33 -
.../juick/server/util/HttpNotFoundException.java | 32 -
.../main/java/com/juick/server/util/HttpUtils.java | 115 --
.../java/com/juick/server/util/ImageUtils.java | 175 --
.../main/java/com/juick/server/util/TagUtils.java | 42 -
.../main/java/com/juick/server/util/UserUtils.java | 55 -
.../main/java/com/juick/server/util/WebUtils.java | 62 -
.../java/com/juick/server/www/HelpService.java | 69 -
.../src/main/java/com/juick/server/www/WebApp.java | 71 -
.../server/www/controllers/AnythingFilter.java | 69 -
.../com/juick/server/www/controllers/Help.java | 93 -
.../com/juick/server/www/controllers/Login.java | 50 -
.../juick/server/www/controllers/MessagesWWW.java | 593 -------
.../juick/server/www/controllers/NewMessage.java | 59 -
.../com/juick/server/www/controllers/Settings.java | 278 ---
.../com/juick/server/www/controllers/SignUp.java | 172 --
.../juick/server/www/controllers/SocialLogin.java | 329 ----
.../java/com/juick/server/xmpp/JidConverter.java | 13 -
.../java/com/juick/server/xmpp/XMPPStatusPage.java | 32 -
.../com/juick/server/xmpp/helpers/XMPPStatus.java | 48 -
.../com/juick/server/xmpp/iq/MessageQuery.java | 10 -
.../com/juick/server/xmpp/iq/package-info.java | 8 -
.../com/juick/server/xmpp/router/Handshake.java | 39 -
.../java/com/juick/server/xmpp/router/Stream.java | 202 ---
.../server/xmpp/router/StreamComponentServer.java | 57 -
.../com/juick/server/xmpp/router/StreamError.java | 57 -
.../juick/server/xmpp/router/StreamFeatures.java | 95 --
.../juick/server/xmpp/router/StreamHandler.java | 13 -
.../juick/server/xmpp/router/StreamNamespaces.java | 10 -
.../com/juick/server/xmpp/router/XMPPError.java | 73 -
.../com/juick/server/xmpp/router/XMPPRouter.java | 220 ---
.../com/juick/server/xmpp/router/XmlUtils.java | 88 -
.../juick/server/xmpp/s2s/BasicXmppSession.java | 68 -
.../java/com/juick/server/xmpp/s2s/CacheEntry.java | 40 -
.../java/com/juick/server/xmpp/s2s/Connection.java | 158 --
.../com/juick/server/xmpp/s2s/ConnectionIn.java | 231 ---
.../juick/server/xmpp/s2s/ConnectionListener.java | 16 -
.../com/juick/server/xmpp/s2s/ConnectionOut.java | 189 ---
.../java/com/juick/server/xmpp/s2s/DNSQueries.java | 65 -
.../com/juick/server/xmpp/s2s/StanzaListener.java | 28 -
.../juick/server/xmpp/s2s/util/DialbackUtils.java | 37 -
.../java/com/juick/service/ActivityPubService.java | 59 -
.../java/com/juick/service/BaseJdbcService.java | 41 -
.../com/juick/service/CrosspostServiceImpl.java | 282 ---
.../java/com/juick/service/EmailServiceImpl.java | 108 --
.../java/com/juick/service/ImagesServiceImpl.java | 82 -
.../com/juick/service/MessagesServiceImpl.java | 1143 -------------
.../com/juick/service/MessengerServiceImpl.java | 71 -
.../com/juick/service/PMQueriesServiceImpl.java | 149 --
.../juick/service/PrivacyQueriesServiceImpl.java | 63 -
.../com/juick/service/PushQueriesServiceImpl.java | 143 --
.../com/juick/service/ShowQueriesServiceImpl.java | 62 -
.../com/juick/service/SphinxSearchService.java | 97 --
.../com/juick/service/SubscriptionServiceImpl.java | 229 ---
.../java/com/juick/service/TagServiceImpl.java | 277 ---
.../com/juick/service/TelegramServiceImpl.java | 84 -
.../java/com/juick/service/UserServiceImpl.java | 668 --------
.../juick/service/activities/ActivityListener.java | 19 -
.../service/activities/DeleteMessageEvent.java | 21 -
.../juick/service/activities/DeleteUserEvent.java | 20 -
.../com/juick/service/activities/FollowEvent.java | 21 -
.../juick/service/activities/UndoFollowEvent.java | 26 -
.../security/HashParamAuthenticationFilter.java | 103 --
.../service/security/JuickUserDetailsService.java | 53 -
.../service/security/NullUserDetailsService.java | 33 -
.../CookieSimpleHashRememberMeServices.java | 130 --
.../RequestParamHashRememberMeServices.java | 88 -
.../juick/service/security/entities/JuickUser.java | 93 -
.../pebble/extension/FormatterExtension.java | 38 -
.../extension/filters/FormatMessageFilter.java | 65 -
.../pebble/extension/filters/PrettyTimeFilter.java | 51 -
.../pebble/extension/filters/TagsListFilter.java | 43 -
.../pebble/extension/filters/TimestampFilter.java | 25 -
.../xmpp/core/session/debug/LogbackDebugger.java | 57 -
juick-server/src/main/java/ru/sape/Sape.java | 23 -
.../src/main/java/ru/sape/SapeConnection.java | 108 --
.../src/main/java/ru/sape/SapePageLinks.java | 76 -
juick-server/src/main/resources/1x1.png | Bin 95 -> 0 bytes
juick-server/src/main/resources/Transparent.gif | Bin 42 -> 0 bytes
.../db/migration/V1.10__favorites_user_uri.sql | 3 -
.../V1.11__increase pm timestamp precision.sql | 1 -
.../db/migration/V1.12__drop unused tables.sql | 5 -
.../db/migration/V1.13__drop unused tables.sql | 5 -
.../db/migration/V1.14__drop broken pm_streams.sql | 1 -
..._drop unused columns add ts for some tables.sql | 4 -
.../resources/db/migration/V1.16__last seen.sql | 2 -
.../db/migration/V1.1__Add updated_at field.sql | 2 -
.../db/migration/V1.2__Drop telegram_chats.sql | 2 -
...V1.3__Nullable user_id column in auth table.sql | 1 -
.../db/migration/V1.4__ActivityPub followers.sql | 7 -
.../db/migration/V1.5__Drop acct index.sql | 6 -
.../main/resources/db/migration/V1.6__user_uri.sql | 1 -
.../resources/db/migration/V1.7__reply_uri.sql | 1 -
.../resources/db/migration/V1.8__html reply.sql | 1 -
.../db/migration/V1.9__reply_uri_index.sql | 1 -
juick-server/src/main/resources/errors.properties | 3 -
.../src/main/resources/errors_ru.properties | 3 -
juick-server/src/main/resources/help | 1 -
juick-server/src/main/resources/juick.png | Bin 4298 -> 0 bytes
juick-server/src/main/resources/juick.sql | 947 -----------
.../src/main/resources/messages.properties | 80 -
.../src/main/resources/messages_ru.properties | 78 -
juick-server/src/main/resources/pg_schema_wip | 1539 -----------------
juick-server/src/main/resources/rome.properties | 2 -
juick-server/src/main/resources/schema.sql | 396 -----
juick-server/src/main/resources/static/favicon.png | Bin 244 -> 0 bytes
juick-server/src/main/resources/static/logo.png | Bin 1184 -> 0 bytes
.../src/main/resources/static/tagscloud.png | Bin 42316 -> 0 bytes
.../main/resources/templates/layouts/content.html | 38 -
.../main/resources/templates/layouts/default.html | 16 -
.../main/resources/templates/layouts/minimal.html | 10 -
.../src/main/resources/templates/layouts/note.html | 5 -
.../src/main/resources/templates/views/404.html | 11 -
.../src/main/resources/templates/views/blog.html | 24 -
.../main/resources/templates/views/blog_tags.html | 10 -
.../src/main/resources/templates/views/help.html | 10 -
.../src/main/resources/templates/views/index.html | 29 -
.../src/main/resources/templates/views/login.html | 144 --
.../resources/templates/views/login_success.html | 13 -
.../resources/templates/views/macros/tags.html | 11 -
.../resources/templates/views/partial/footer.html | 16 -
.../templates/views/partial/homecolumn.html | 25 -
.../resources/templates/views/partial/message.html | 76 -
.../templates/views/partial/navigation.html | 36 -
.../templates/views/partial/settings_tabs.html | 6 -
.../templates/views/partial/tagcolumn.html | 33 -
.../resources/templates/views/partial/tags.html | 3 -
.../templates/views/partial/usercolumn.html | 89 -
.../templates/views/partial/usertags.html | 3 -
.../main/resources/templates/views/pm_inbox.html | 35 -
.../main/resources/templates/views/pm_sent.html | 33 -
.../src/main/resources/templates/views/post.html | 19 -
.../resources/templates/views/post_success.html | 19 -
.../resources/templates/views/settings_about.html | 20 -
.../templates/views/settings_auth-email.html | 9 -
.../resources/templates/views/settings_main.html | 151 --
.../templates/views/settings_password.html | 17 -
.../templates/views/settings_privacy.html | 9 -
.../resources/templates/views/settings_result.html | 9 -
.../src/main/resources/templates/views/signup.html | 43 -
.../src/main/resources/templates/views/thread.html | 175 --
.../src/main/resources/templates/views/users.html | 17 -
.../server/configuration/SwaggerConfiguration.java | 28 -
.../java/com/juick/server/tests/ServerTests.java | 1795 --------------------
juick-server/src/test/resources/2915104.jpg | Bin 227253 -> 0 bytes
juick-server/src/test/resources/cmyk.jpg | Bin 3945732 -> 0 bytes
juick-server/src/test/resources/create.json | 1 -
juick-server/src/test/resources/data.sql | 8 -
juick-server/src/test/resources/delete.json | 1 -
juick-server/src/test/resources/follow.json | 42 -
juick-server/src/test/resources/mention.json | 62 -
juick-server/src/test/resources/nojfif.jpg | Bin 417629 -> 0 bytes
juick-server/src/test/resources/person.json | 54 -
.../src/test/resources/templates/views/test.html | 2 -
juick-server/src/test/resources/undo.json | 47 -
juick-server/src/test/resources/webfinger.json | 36 -
juick-server/src/test/resources/xnodeinfo2.json | 24 -
248 files changed, 25735 deletions(-)
delete mode 100644 juick-server/src/docs/index.adoc
delete mode 100644 juick-server/src/main/assets/embed.js
delete mode 100644 juick-server/src/main/assets/logo.png
delete mode 100644 juick-server/src/main/assets/logo@2x.png
delete mode 100644 juick-server/src/main/assets/scripts.js
delete mode 100644 juick-server/src/main/assets/style.css
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Alias.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Expires.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Link.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Property.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Signature.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Subject.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/Title.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/XRD.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/XRDConstants.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/XRDException.java
delete mode 100644 juick-server/src/main/java/com/cliqset/xrd/package-info.java
delete mode 100644 juick-server/src/main/java/com/juick/ApiServer.java
delete mode 100644 juick-server/src/main/java/com/juick/server/ActivityPubManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/CommandsManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/EmailManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/KeystoreManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/ServerManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/SignatureManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/TelegramBotManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/TopManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/TwitterManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/Utils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/WebsocketManager.java
delete mode 100644 juick-server/src/main/java/com/juick/server/XMPPConnection.java
delete mode 100644 juick-server/src/main/java/com/juick/server/XMPPServer.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/ApiSocialLogin.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Index.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Messages.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Notifications.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/PM.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Post.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Service.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Tags.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/Users.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/Profile.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/Activity.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/Context.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Accept.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Announce.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Block.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Create.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Delete.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Follow.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Like.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/activities/Undo.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Hashtag.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Image.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Key.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Link.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Mention.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Note.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollection.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollectionPage.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/activity/model/objects/Person.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/hostmeta/HostMeta.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/Feeds.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/MessagesView.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/RepliesView.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModule.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/rss/extension/JuickModuleParser.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/webfinger/Resource.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/webfinger/model/Account.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/webfinger/model/Link.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/model/NodeInfo.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/model/Server.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/model/ServiceInfo.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/model/Usage.java
delete mode 100644 juick-server/src/main/java/com/juick/server/api/xnodeinfo2/model/UserStats.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/ActivityPubClientErrorHandler.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/SapeConfiguration.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/StorageConfiguration.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/TelegramConfig.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java
delete mode 100644 juick-server/src/main/java/com/juick/server/configuration/XMPPConfig.java
delete mode 100644 juick-server/src/main/java/com/juick/server/helpers/annotation/UserCommand.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/HttpBadRequestException.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/HttpForbiddenException.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/HttpNotFoundException.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/HttpUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/ImageUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/TagUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/UserUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/util/WebUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/HelpService.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/WebApp.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/AnythingFilter.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/Help.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/Login.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/Settings.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/SignUp.java
delete mode 100644 juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/JidConverter.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/XMPPStatusPage.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/helpers/XMPPStatus.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/iq/MessageQuery.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/iq/package-info.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/Handshake.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/StreamComponentServer.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/StreamError.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/StreamFeatures.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/StreamHandler.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/StreamNamespaces.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/XMPPError.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/XMPPRouter.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/router/XmlUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/BasicXmppSession.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/CacheEntry.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/Connection.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/DNSQueries.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/StanzaListener.java
delete mode 100644 juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java
delete mode 100644 juick-server/src/main/java/com/juick/service/ActivityPubService.java
delete mode 100644 juick-server/src/main/java/com/juick/service/BaseJdbcService.java
delete mode 100644 juick-server/src/main/java/com/juick/service/CrosspostServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/EmailServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/ImagesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/MessengerServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/PMQueriesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/PrivacyQueriesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/ShowQueriesServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/SphinxSearchService.java
delete mode 100644 juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/TagServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/TelegramServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/UserServiceImpl.java
delete mode 100644 juick-server/src/main/java/com/juick/service/activities/ActivityListener.java
delete mode 100644 juick-server/src/main/java/com/juick/service/activities/DeleteMessageEvent.java
delete mode 100644 juick-server/src/main/java/com/juick/service/activities/DeleteUserEvent.java
delete mode 100644 juick-server/src/main/java/com/juick/service/activities/FollowEvent.java
delete mode 100644 juick-server/src/main/java/com/juick/service/activities/UndoFollowEvent.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/NullUserDetailsService.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/deprecated/CookieSimpleHashRememberMeServices.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/deprecated/RequestParamHashRememberMeServices.java
delete mode 100644 juick-server/src/main/java/com/juick/service/security/entities/JuickUser.java
delete mode 100644 juick-server/src/main/java/com/mitchellbosecke/pebble/extension/FormatterExtension.java
delete mode 100644 juick-server/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java
delete mode 100644 juick-server/src/main/java/com/mitchellbosecke/pebble/extension/filters/PrettyTimeFilter.java
delete mode 100644 juick-server/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java
delete mode 100644 juick-server/src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java
delete mode 100644 juick-server/src/main/java/rocks/xmpp/core/session/debug/LogbackDebugger.java
delete mode 100644 juick-server/src/main/java/ru/sape/Sape.java
delete mode 100644 juick-server/src/main/java/ru/sape/SapeConnection.java
delete mode 100644 juick-server/src/main/java/ru/sape/SapePageLinks.java
delete mode 100644 juick-server/src/main/resources/1x1.png
delete mode 100644 juick-server/src/main/resources/Transparent.gif
delete mode 100644 juick-server/src/main/resources/db/migration/V1.10__favorites_user_uri.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.11__increase pm timestamp precision.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.12__drop unused tables.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.13__drop unused tables.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.14__drop broken pm_streams.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.15__drop unused columns add ts for some tables.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.16__last seen.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.1__Add updated_at field.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.2__Drop telegram_chats.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.3__Nullable user_id column in auth table.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.4__ActivityPub followers.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.5__Drop acct index.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.6__user_uri.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.7__reply_uri.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.8__html reply.sql
delete mode 100644 juick-server/src/main/resources/db/migration/V1.9__reply_uri_index.sql
delete mode 100644 juick-server/src/main/resources/errors.properties
delete mode 100644 juick-server/src/main/resources/errors_ru.properties
delete mode 160000 juick-server/src/main/resources/help
delete mode 100644 juick-server/src/main/resources/juick.png
delete mode 100644 juick-server/src/main/resources/juick.sql
delete mode 100644 juick-server/src/main/resources/messages.properties
delete mode 100644 juick-server/src/main/resources/messages_ru.properties
delete mode 100644 juick-server/src/main/resources/pg_schema_wip
delete mode 100644 juick-server/src/main/resources/rome.properties
delete mode 100644 juick-server/src/main/resources/schema.sql
delete mode 100644 juick-server/src/main/resources/static/favicon.png
delete mode 100644 juick-server/src/main/resources/static/logo.png
delete mode 100644 juick-server/src/main/resources/static/tagscloud.png
delete mode 100644 juick-server/src/main/resources/templates/layouts/content.html
delete mode 100644 juick-server/src/main/resources/templates/layouts/default.html
delete mode 100644 juick-server/src/main/resources/templates/layouts/minimal.html
delete mode 100644 juick-server/src/main/resources/templates/layouts/note.html
delete mode 100644 juick-server/src/main/resources/templates/views/404.html
delete mode 100644 juick-server/src/main/resources/templates/views/blog.html
delete mode 100644 juick-server/src/main/resources/templates/views/blog_tags.html
delete mode 100644 juick-server/src/main/resources/templates/views/help.html
delete mode 100644 juick-server/src/main/resources/templates/views/index.html
delete mode 100644 juick-server/src/main/resources/templates/views/login.html
delete mode 100644 juick-server/src/main/resources/templates/views/login_success.html
delete mode 100644 juick-server/src/main/resources/templates/views/macros/tags.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/footer.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/homecolumn.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/message.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/navigation.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/settings_tabs.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/tagcolumn.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/tags.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/usercolumn.html
delete mode 100644 juick-server/src/main/resources/templates/views/partial/usertags.html
delete mode 100644 juick-server/src/main/resources/templates/views/pm_inbox.html
delete mode 100644 juick-server/src/main/resources/templates/views/pm_sent.html
delete mode 100644 juick-server/src/main/resources/templates/views/post.html
delete mode 100644 juick-server/src/main/resources/templates/views/post_success.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_about.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_auth-email.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_main.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_password.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_privacy.html
delete mode 100644 juick-server/src/main/resources/templates/views/settings_result.html
delete mode 100644 juick-server/src/main/resources/templates/views/signup.html
delete mode 100644 juick-server/src/main/resources/templates/views/thread.html
delete mode 100644 juick-server/src/main/resources/templates/views/users.html
delete mode 100644 juick-server/src/test/java/com/juick/server/configuration/SwaggerConfiguration.java
delete mode 100644 juick-server/src/test/java/com/juick/server/tests/ServerTests.java
delete mode 100644 juick-server/src/test/resources/2915104.jpg
delete mode 100644 juick-server/src/test/resources/cmyk.jpg
delete mode 100644 juick-server/src/test/resources/create.json
delete mode 100644 juick-server/src/test/resources/data.sql
delete mode 100644 juick-server/src/test/resources/delete.json
delete mode 100644 juick-server/src/test/resources/follow.json
delete mode 100644 juick-server/src/test/resources/mention.json
delete mode 100644 juick-server/src/test/resources/nojfif.jpg
delete mode 100644 juick-server/src/test/resources/person.json
delete mode 100644 juick-server/src/test/resources/templates/views/test.html
delete mode 100644 juick-server/src/test/resources/undo.json
delete mode 100644 juick-server/src/test/resources/webfinger.json
delete mode 100644 juick-server/src/test/resources/xnodeinfo2.json
(limited to 'juick-server/src')
diff --git a/juick-server/src/docs/index.adoc b/juick-server/src/docs/index.adoc
deleted file mode 100644
index 4d492510..00000000
--- a/juick-server/src/docs/index.adoc
+++ /dev/null
@@ -1,3 +0,0 @@
-include::{src}/overview.adoc[]
-include::{src}/paths.adoc[]
-include::{src}/definitions.adoc[]
\ No newline at end of file
diff --git a/juick-server/src/main/assets/embed.js b/juick-server/src/main/assets/embed.js
deleted file mode 100644
index d4cbab8e..00000000
--- a/juick-server/src/main/assets/embed.js
+++ /dev/null
@@ -1,334 +0,0 @@
-
-function insertAfter(newNode, referenceNode) {
- referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
-}
-
-function setContent(containerNode, ...newNodes) {
- removeAllFrom(containerNode);
- newNodes.forEach(n => containerNode.appendChild(n));
- return containerNode;
-}
-
-function removeAllFrom(fromNode) {
- for (let c; c = fromNode.lastChild; ) { fromNode.removeChild(c); }
-}
-
-function htmlEscape(html) {
- let textarea = document.createElement('textarea');
- textarea.textContent = html;
- return textarea.innerHTML;
-}
-
-// rules :: [{pr: number, re: RegExp, with: string}]
-// rules :: [{pr: number, re: RegExp, with: Function}]
-// rules :: [{pr: number, re: RegExp, brackets: true, with: [string, string]}]
-// rules :: [{pr: number, re: RegExp, brackets: true, with: [string, string, Function]}]
-function formatText(txt, rules) {
- let idCounter = 0;
- function nextId() { return idCounter++; }
- function ft(txt, rules) {
- let matches = rules.map(r => { r.re.lastIndex = 0; return [r, r.re.exec(txt)]; })
- .filter(([,m]) => m !== null)
- .sort(([r1,m1],[r2,m2]) => (r1.pr - r2.pr) || (m1.index - m2.index));
- if (matches && matches.length > 0) {
- let [rule, match] = matches[0];
- let subsequentRules = rules.filter(r => r.pr >= rule.pr);
- let idStr = `<>(${nextId()})<>`;
- let outerStr = txt.substring(0, match.index) + idStr + txt.substring(rule.re.lastIndex);
- let innerStr = (rule.brackets)
- ? (() => { let [l ,r ,f] = rule.with; return l + ft((f ? f(match[1]) : match[1]), subsequentRules) + r; })()
- : match[0].replace(rule.re, rule.with);
- return ft(outerStr, subsequentRules).replace(idStr, innerStr);
- }
- return txt;
- }
- return ft(htmlEscape(txt), rules); // idStr above relies on the fact the text is escaped
-}
-
-function fixWwwLink(url) {
- return url.replace(/^(?!([a-z]+:)?\/\/)/i, '//');
-}
-
-function makeNewNode(embedType, aNode, reResult) {
- const withClasses = el => {
- if (embedType.className) {
- el.classList.add(...embedType.className.split(' '));
- }
- return el;
- };
- return embedType.makeNode(aNode, reResult, withClasses(document.createElement('div')));
-}
-
-function makeIframe(src, w, h, scrolling='no') {
- let iframe = document.createElement('iframe');
- iframe.style.width = w;
- iframe.style.height = h;
- iframe.frameBorder = 0;
- iframe.scrolling = scrolling;
- iframe.setAttribute('allowFullScreen', '');
- iframe.src = src;
- iframe.innerHTML = 'Cannot show iframes.';
- return iframe;
-}
-
-function makeResizableToRatio(element, ratio) {
- element.dataset['ratio'] = ratio;
- makeResizable(element, w => w * element.dataset['ratio']);
-}
-
-// calcHeight :: Number -> Number -- calculate element height for a given width
-function makeResizable(element, calcHeight) {
- const setHeight = el => {
- if (document.body.contains(el) && (el.offsetWidth > 0)) {
- el.style.height = (calcHeight(el.offsetWidth)).toFixed(2) + 'px';
- }
- };
- window.addEventListener('resize', () => setHeight(element));
- setHeight(element);
-}
-
-function extractDomain(url) {
- const domainRe = /^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/\n]+)/i;
- return domainRe.exec(url)[1];
-}
-
-function urlReplace(match, p1, p2, p3) {
- let isBrackets = (p1 !== undefined);
- return (isBrackets)
- ? `${p1}`
- : `${extractDomain(match)}`;
-}
-
-function urlReplaceInCode(match, p1, p2, p3) {
- let isBrackets = (p1 !== undefined);
- return (isBrackets)
- ? `${match}`
- : `${match}`;
-}
-
-function messageReplyReplace(messageId) {
- return function(match, mid, rid) {
- let replyPart = (rid && rid != '0') ? '#' + rid : '';
- return `${match}`;
- };
-}
-
-/**
- * Given "txt" message in unescaped plaintext with Juick markup, this function
- * returns escaped formatted HTML string.
- *
- * @param {string} txt
- * @param {string} messageId - current message id
- * @param {boolean} isCode
- * @returns {string}
- */
-function juickFormat(txt, messageId, isCode) {
- const urlRe = /(?:\[([^\]\[]+)\](?:\[([^\]]+)\]|\(((?:[a-z]+:\/\/|www\.|ftp\.)(?:\([-\w+*&@#/%=~|$?!:;,.]*\)|[-\w+*&@#/%=~|$?!:;,.])*(?:\([-\w+*&@#/%=~|$?!:;,.]*\)|[\w+*&@#/%=~|$]))\))|\b(?:[a-z]+:\/\/|www\.|ftp\.)(?:\([-\w+*&@#/%=~|$?!:;,.]*\)|[-\w+*&@#/%=~|$?!:;,.])*(?:\([-\w+*&@#/%=~|$?!:;,.]*\)|[\w+*&@#/%=~|$]))/gi;
- const bqReplace = m => m.replace(/^(?:>|>)\s?/gmi, '');
- return (isCode)
- ? formatText(txt, [
- { pr: 1, re: urlRe, with: urlReplaceInCode },
- { pr: 1, re: /\B(?:#(\d+))?(?:\/(\d+))?\b/g, with: messageReplyReplace(messageId) },
- { pr: 1, re: /\B@([\w-]+)\b/gi, with: '@$1' },
- ])
- : formatText(txt, [
- { pr: 0, re: /((?:^(?:>|>)\s?[\s\S]+?$\n?)+)/gmi, brackets: true, with: ['', '
', bqReplace] },
- { pr: 1, re: urlRe, with: urlReplace },
- { pr: 1, re: /\B(?:#(\d+))?(?:\/(\d+))?\b/g, with: messageReplyReplace(messageId) },
- { pr: 1, re: /\B@([\w-]+)\b/gi, with: '@$1' },
- { pr: 2, re: /\B\*([^\n]+?)\*((?=\s)|(?=$)|(?=[!\"#$%&'*+,\-./:;<=>?@[\]^_`{|}~()]+))/g, brackets: true, with: ['', ''] },
- { pr: 2, re: /\B\/([^\n]+?)\/((?=\s)|(?=$)|(?=[!\"#$%&'*+,\-./:;<=>?@[\]^_`{|}~()]+))/g, brackets: true, with: ['', ''] },
- { pr: 2, re: /\b\_([^\n]+?)\_((?=\s)|(?=$)|(?=[!\"#$%&'*+,\-./:;<=>?@[\]^_`{|}~()]+))/g, brackets: true, with: ['', ''] },
- { pr: 3, re: /\n/g, with: '
' },
- ]);
-}
-
-function getEmbeddableLinkTypes() {
- return [
- {
- name: 'Jpeg and png images',
- id: 'embed_jpeg_and_png_images',
- className: 'picture compact',
- ctsDefault: false,
- re: /\.(jpe?g|png|svg)(:[a-zA-Z]+)?(?:\?[\w&;\?=]*)?$/i,
- makeNode: function(aNode, reResult, div) {
- div.innerHTML = ``;
- return div;
- }
- },
- {
- name: 'Gif images',
- id: 'embed_gif_images',
- className: 'picture compact',
- ctsDefault: true,
- re: /\.gif(:[a-zA-Z]+)?(?:\?[\w&;\?=]*)?$/i,
- makeNode: function(aNode, reResult, div) {
- div.innerHTML = ``;
- return div;
- }
- },
- {
- name: 'Video (webm, mp4, ogv)',
- id: 'embed_webm_and_mp4_videos',
- className: 'video compact',
- ctsDefault: false,
- re: /\.(webm|mp4|m4v|ogv)(?:\?[\w&;\?=]*)?$/i,
- makeNode: function(aNode, reResult, div) {
- div.innerHTML = ``;
- return div;
- }
- },
- {
- name: 'Audio (mp3, ogg, weba, opus, m4a, oga, wav)',
- id: 'embed_sound_files',
- className: 'audio singleColumn',
- ctsDefault: false,
- re: /\.(mp3|ogg|weba|opus|m4a|oga|wav)(?:\?[\w&;\?=]*)?$/i,
- makeNode: function(aNode, reResult, div) {
- div.innerHTML = ``;
- return div;
- }
- },
- {
- name: 'YouTube videos (and playlists)',
- id: 'embed_youtube_videos',
- className: 'youtube resizableV singleColumn',
- ctsDefault: false,
- re: /^(?:https?:)?\/\/(?:www\.|m\.|gaming\.)?(?:youtu(?:(?:\.be\/|be\.com\/(?:v|embed)\/)([-\w]+)|be\.com\/watch)((?:(?:\?|&(?:amp;)?)(?:\w+=[-\.\w]*[-\w]))*)|youtube\.com\/playlist\?list=([-\w]*)(&(amp;)?[-\w\?=]*)?)/i,
- makeNode: function(aNode, reResult, div) {
- let [url, v, args, plist] = reResult;
- let iframeUrl;
- if (plist) {
- iframeUrl = '//www.youtube-nocookie.com/embed/videoseries?list=' + plist;
- } else {
- let pp = {}; args.replace(/^\?/, '')
- .split('&')
- .map(s => s.split('='))
- .forEach(z => pp[z[0]] = z[1]);
- let embedArgs = { rel: '0' };
- if (pp.t) {
- const tre = /^(?:(\d+)|(?:(\d+)h)?(?:(\d+)m)?(\d+)s|(?:(\d+)h)?(\d+)m|(\d+)h)$/i;
- let [, t, h, m, s, h1, m1, h2] = tre.exec(pp.t);
- embedArgs['start'] = (+t) || ((+(h || h1 || h2 || 0))*60*60 + (+(m || m1 || 0))*60 + (+(s || 0)));
- }
- if (pp.list) {
- embedArgs['list'] = pp.list;
- }
- v = v || pp.v;
- let argsStr = Object.keys(embedArgs)
- .map(k => `${k}=${embedArgs[k]}`)
- .join('&');
- iframeUrl = `//www.youtube-nocookie.com/embed/${v}?${argsStr}`;
- }
- let iframe = makeIframe(iframeUrl, '100%', '360px');
- iframe.onload = () => makeResizableToRatio(iframe, 9.0 / 16.0);
- return setContent(div, iframe);
- }
- },
- {
- name: 'Vimeo videos',
- id: 'embed_vimeo_videos',
- className: 'vimeo resizableV',
- ctsDefault: false,
- re: /^(?:https?:)?\/\/(?:www\.)?(?:player\.)?vimeo\.com\/(?:video\/|album\/[\d]+\/video\/)?([\d]+)/i,
- makeNode: function(aNode, reResult, div) {
- let iframe = makeIframe('//player.vimeo.com/video/' + reResult[1], '100%', '360px');
- iframe.onload = () => makeResizableToRatio(iframe, 9.0 / 16.0);
- return setContent(div, iframe);
- }
- }
- ];
-}
-
-function embedLink(aNode, linkTypes, container, afterNode) {
- let anyEmbed = false;
- let linkId = (aNode.href.replace(/^https?:/i, '').replace(/\'/gi,''));
- let sameEmbed = container.querySelector(`*[data-linkid='${linkId}']`); // do not embed the same thing twice
- if (sameEmbed === null) {
- anyEmbed = [].some.call(linkTypes, function(linkType) {
- let reResult = linkType.re.exec(aNode.href);
- if (reResult) {
- if (linkType.match && (linkType.match(aNode, reResult) === false)) { return false; }
- let newNode = makeNewNode(linkType, aNode, reResult);
- if (!newNode) { return false; }
- newNode.setAttribute('data-linkid', linkId);
- if (afterNode) {
- insertAfter(newNode, afterNode);
- } else {
- container.appendChild(newNode);
- }
- aNode.classList.add('embedLink');
- return true;
- }
- });
- }
- return anyEmbed;
-}
-
-function embedLinks(aNodes, container) {
- let anyEmbed = false;
- let embeddableLinkTypes = getEmbeddableLinkTypes();
- Array.from(aNodes).forEach(aNode => {
- let isEmbedded = embedLink(aNode, embeddableLinkTypes, container);
- anyEmbed = anyEmbed || isEmbedded;
- });
- return anyEmbed;
-}
-
-/**
- * Embed all the links inside element "x" that match to "allLinksSelector".
- * All the embedded media is placed inside "div.embedContainer".
- * "div.embedContainer" is inserted before an element matched by "beforeNodeSelector"
- * if not present. Existing container is used otherwise.
- *
- * @param {Element} x
- * @param {string} beforeNodeSelector
- * @param {string} allLinksSelector
- */
-export function embedLinksToX(x, beforeNodeSelector, allLinksSelector) {
- let isCtsPost = false;
- let allLinks = x.querySelectorAll(allLinksSelector);
-
- let existingContainer = x.querySelector('div.embedContainer');
- if (existingContainer) {
- embedLinks(allLinks, existingContainer);
- } else {
- let embedContainer = document.createElement('div');
- embedContainer.className = 'embedContainer';
-
- let anyEmbed = embedLinks(allLinks, embedContainer);
- if (anyEmbed) {
- let beforeNode = x.querySelector(beforeNodeSelector);
- x.insertBefore(embedContainer, beforeNode);
- }
- }
-}
-
-function embedLinksToArticles() {
- let beforeNodeSelector = 'nav.l';
- let allLinksSelector = 'p:not(.ir) a, pre a';
- Array.from(document.querySelectorAll('#content article')).forEach(article => {
- embedLinksToX(article, beforeNodeSelector, allLinksSelector);
- });
-}
-
-function embedLinksToPost() {
- let beforeNodeSelector = '.msg-txt + *';
- let allLinksSelector = '.msg-txt a';
- Array.from(document.querySelectorAll('#content .msg-cont')).forEach(msg => {
- embedLinksToX(msg, beforeNodeSelector, allLinksSelector);
- });
-}
-
-/**
- * Embed all the links in all messages/replies on the page.
- */
-export function embedAll() {
- if (document.querySelector('#content article[data-mid]')) {
- embedLinksToArticles();
- } else {
- embedLinksToPost();
- }
-}
-
-export const format = juickFormat;
diff --git a/juick-server/src/main/assets/logo.png b/juick-server/src/main/assets/logo.png
deleted file mode 100644
index 4e0f6d56..00000000
Binary files a/juick-server/src/main/assets/logo.png and /dev/null differ
diff --git a/juick-server/src/main/assets/logo@2x.png b/juick-server/src/main/assets/logo@2x.png
deleted file mode 100644
index 6febeaf9..00000000
Binary files a/juick-server/src/main/assets/logo@2x.png and /dev/null differ
diff --git a/juick-server/src/main/assets/scripts.js b/juick-server/src/main/assets/scripts.js
deleted file mode 100644
index 9ee0639e..00000000
--- a/juick-server/src/main/assets/scripts.js
+++ /dev/null
@@ -1,935 +0,0 @@
-require('element-closest');
-require('classlist.js');
-require('url-polyfill');
-require('formdata-polyfill');
-import { embedLinksToX, embedAll, format } from './embed';
-
-if (!('remove' in Element.prototype)) { // Firefox <23
- Element.prototype.remove = function() {
- if (this.parentNode) {
- this.parentNode.removeChild(this);
- }
- };
-}
-
-NodeList.prototype.forEach = Array.prototype.forEach;
-HTMLCollection.prototype.forEach = Array.prototype.forEach;
-
-NodeList.prototype.filter = Array.prototype.filter;
-HTMLCollection.prototype.filter = Array.prototype.filter;
-
-Element.prototype.selectText = function() {
- let d = document;
- if (d.body.createTextRange) {
- let range = d.body.createTextRange();
- range.moveToElementText(this);
- range.select();
- } else if (window.getSelection) {
- let selection = window.getSelection();
- let rangeSel = d.createRange();
- rangeSel.selectNodeContents(this);
- selection.removeAllRanges();
- selection.addRange(rangeSel);
- }
-};
-
-function autosize(el) {
- let offset = (!window.opera)
- ? (el.offsetHeight - el.clientHeight)
- : (el.offsetHeight + parseInt(window.getComputedStyle(el, null).getPropertyValue('border-top-width')));
-
- let resize = function(el) {
- el.style.height = 'auto';
- el.style.height = (el.scrollHeight + offset) + 'px';
- };
-
- if (el.addEventListener) {
- el.addEventListener('input', () => resize(el));
- } else if (el.attachEvent) {
- el.attachEvent('onkeyup', () => resize(el));
- }
-}
-
-function evilIcon(name) {
- return `
${i18n('postForm.pleaseInputMessageText')}
`); - evt.preventDefault(); - } -} - -function handleErrors(response) { - if (!response.ok) { - throw Error(response.statusText); - } - return response; -} - -function showCommentForm(mid, rid) { - let reply = document.getElementById(rid); - let formTarget = reply.querySelector('div.msg-cont .msg-comment-target'); - if (formTarget) { - let formHtml = ` - `; - formTarget.insertAdjacentHTML('afterend', formHtml); - formTarget.remove(); - - let form = reply.querySelector('form'); - let submitButton = form.querySelector('input[type="submit"]'); - - let attachButton = form.querySelector('.msg-comment .attach-photo'); - attachButton.addEventListener('click', e => attachCommentPhoto(e.target)); - - let textarea = form.querySelector('.msg-comment textarea'); - textarea.addEventListener('keypress', e => postformListener(e.target, e)); - autosize(textarea); - - let validateMessage = () => { - let len = textarea.value.length; - if (len > 4096) { return 'Message is too long'; } - return ''; - }; - form.addEventListener('submit', e => { - let validationResult = validateMessage(); - if (validationResult) { - e.preventDefault(); - alert(validationResult); - return false; - } - submitButton.disabled = true; - let formData = new FormData(form); - fetch('/api/comment' + '?hash=' + document.getElementById('body').getAttribute('data-hash'), { - method: 'POST', - body: formData, - credentials: 'omit' - }).then(handleErrors) - .then(response => { - if (response.ok) { - response.json().then(result => { - if (result.newMessage) { - window.location.href = new URL(`${mid}#${result.newMessage.rid}`, window.location.href); - } else { - alert(result.text); - } - window.location.reload(true); - }); - } - }).catch(error => { - alert(error.message); - }); - e.preventDefault(); - }); - } - reply.querySelector('.msg-comment textarea').focus(); -} - -function attachInput() { - let inp = document.createElement('input'); - inp.setAttribute('type', 'file'); - inp.setAttribute('name', 'attach'); - inp.setAttribute('accept', 'image/jpeg,image/png'); - inp.style.visibility = 'hidden'; - return inp; -} - -function attachCommentPhoto(div) { - let input = div.querySelector('input'); - if (input) { - input.remove(); - div.classList.remove('attach-photo-active'); - } else { - let newInput = attachInput(); - newInput.addEventListener('change', function() { - div.classList.add('attach-photo-active'); - }); - newInput.click(); - div.appendChild(newInput); - } -} - -function attachMessagePhoto(div) { - var f = div.closest('form'), - finput = f.querySelector('input[type="file"]'); - if (!finput) { - var inp = attachInput(); - inp.style.float = 'left'; - inp.style.width = 0; - inp.style.height = 0; - inp.addEventListener('change', function() { - div.textContent = i18n('postForm.upload') + ' (✓)'; - }); - f.appendChild(inp); - inp.click(); - } else { - finput.remove(); - div.textContent = i18n('postForm.upload'); - } -} - -function showMessageLinksDialog(mid, rid) { - let hlink = window.location.protocol + '//juick.com/' + mid; - let mlink = '#' + mid; - if (rid > 0) { - hlink += '#' + rid; - mlink += '/' + rid; - } - let hlinkenc = encodeURIComponent(hlink); - let html = ` -${i18n('loginDialog.pleaseIntroduceYourself')}:
- ${evilIcon('ei-envelope')}${i18n('loginDialog.email')} - ${evilIcon('ei-sc-facebook')}${i18n('loginDialog.facebook')} - ${evilIcon('ei-sc-vk')}${i18n('loginDialog.vk')} -${i18n('loginDialog.registeredAlready')}
- -