From d4460d2769e2580fb6f097dc04730cdda46eb8fc Mon Sep 17 00:00:00 2001 From: styppo Date: Tue, 27 Dec 2022 21:31:08 +0000 Subject: [PATCH] Basic thread component, thread styling --- src/components/BaseUserName.vue | 44 +-- .../CreatePost/AutoSizeTextarea.vue | 14 +- src/components/CreatePost/PostEditor.vue | 124 ++++---- src/components/MainMenu/MainMenu.vue | 16 +- src/components/MainMenu/ProfilePopup.vue | 17 +- src/components/Post/HeroPost.vue | 293 ++++++++++++++++++ .../Post/{Post.vue => ListPost.vue} | 99 +++--- src/components/Post/Thread.vue | 46 +++ src/pages/Feed2.vue | 8 +- src/pages/Thread.vue | 216 +++++++++++++ src/router/routes.js | 5 + src/utils/mixin.js | 2 +- 12 files changed, 734 insertions(+), 150 deletions(-) create mode 100644 src/components/Post/HeroPost.vue rename src/components/Post/{Post.vue => ListPost.vue} (79%) create mode 100644 src/components/Post/Thread.vue create mode 100644 src/pages/Thread.vue diff --git a/src/components/BaseUserName.vue b/src/components/BaseUserName.vue index d1e3565..2f206cb 100644 --- a/src/components/BaseUserName.vue +++ b/src/components/BaseUserName.vue @@ -1,6 +1,6 @@ + + + + diff --git a/src/router/routes.js b/src/router/routes.js index 9de48f1..ef1fe08 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -33,6 +33,11 @@ const routes = [ component: () => import('pages/Event.vue'), name: 'event', }, + { + path: '/thread/:eventId([a-f0-9A-F]{64})', + component: () => import('pages/Thread.vue'), + name: 'thread', + }, { path: '/notifications', component: () => import('pages/Notifications.vue'), diff --git a/src/utils/mixin.js b/src/utils/mixin.js index 229f183..03446b3 100644 --- a/src/utils/mixin.js +++ b/src/utils/mixin.js @@ -53,7 +53,7 @@ export default { }, toEvent(id) { - if (!window.getSelection().toString().length) this.$router.push('/event/' + id) + if (!window.getSelection().toString().length) this.$router.push('/thread/' + id) }, shorten,