From caeaac8c19394efe2a625d8263abbaefd037ce7f Mon Sep 17 00:00:00 2001 From: Andrei O Date: Fri, 20 Sep 2024 12:11:14 +0300 Subject: [PATCH] chore: improve cross-post modal --- .../src/views/CrossPostModal.vue | 140 ++++++++++-------- .../src/components/content/post/crossPost.vue | 14 +- 2 files changed, 84 insertions(+), 70 deletions(-) diff --git a/apps/yup-live-mobile/src/views/CrossPostModal.vue b/apps/yup-live-mobile/src/views/CrossPostModal.vue index 42dd982..7036142 100644 --- a/apps/yup-live-mobile/src/views/CrossPostModal.vue +++ b/apps/yup-live-mobile/src/views/CrossPostModal.vue @@ -8,7 +8,7 @@ Cancel - -
+ > + + + {{ + farcasterChannel + ? "Remove farcaster channel" + : "Add farcaster channel" + }} + +
+
@@ -275,7 +277,7 @@
-
-
+

No channels found

@@ -514,6 +519,7 @@ export default defineComponent({ const mentionsOpen = ref(false); const mentionsCoords = ref({ x: 0, y: 0 }); const mentions = ref([]) as Ref; + const searchChannelTerm = ref(""); const addToThread = () => { if (posts.length > 30) { @@ -545,11 +551,11 @@ export default defineComponent({ if (isChannelSearching.value) return; isChannelSearching.value = true; let result: TChannel[]; - let searchTerm = ""; + searchChannelTerm.value = ""; do { - searchTerm = searchString; + searchChannelTerm.value = searchString; result = await searchChannel(searchString); - } while (searchTerm !== searchString); + } while (searchChannelTerm.value !== searchString); channels.value = result; isChannelSearching.value = false; }; @@ -996,6 +1002,7 @@ export default defineComponent({ mentions, insertMention, isChannelSearching, + searchChannelTerm, }; }, }); @@ -1019,5 +1026,10 @@ export default defineComponent({ border-radius: 0.7rem; min-height: 13rem; color: aliceblue; + overflow-y: scroll; + word-wrap: break-word; + overflow-wrap: break-word; + overflow-x: hidden; + white-space: pre-wrap; } diff --git a/apps/yup-live/src/components/content/post/crossPost.vue b/apps/yup-live/src/components/content/post/crossPost.vue index 207b21c..9175293 100644 --- a/apps/yup-live/src/components/content/post/crossPost.vue +++ b/apps/yup-live/src/components/content/post/crossPost.vue @@ -67,7 +67,7 @@ class="leading-7 text-sm dark:text-gray-300 text-stone-100" >Content -
+ >