diff --git a/src/pages/IndexPage.vue b/src/pages/IndexPage.vue index 54d22b5..b16504b 100644 --- a/src/pages/IndexPage.vue +++ b/src/pages/IndexPage.vue @@ -9,31 +9,46 @@

{{searchQuery}}

-
-
-
-

Max Mustermann

-

Hey! I am using ptpChat

-
-
+ +
-
+
+ + + + + + + + + + +
-

{{tenorStore.gifs[0].media_formats.nanogif.url}}

-

Not loaded

+
-
- + + + + + + +
+ @@ -43,23 +58,14 @@
- Gif + Gif
-

{{selectedGifURL}}

- -
-
- - -
@@ -69,6 +75,7 @@ import { ref } from 'vue'; import MessageComponent from 'components/MessageComponent.vue'; import { useTenorStore } from 'stores/tenor-store'; +import ProfileCardComponent from 'components/ProfileCardComponent.vue'; defineOptions({ name: 'IndexPage' @@ -79,8 +86,9 @@ const message = ref(""); const gifSearch = ref(""); const selectedGifURL = ref(""); +const showGifMenu = ref(false); -const changed = ref(false) +const changed = ref(false); function inputChanged() { changed.value = true; @@ -95,6 +103,25 @@ function getGifs() { } } +function toggleGifMenu() { + showGifMenu.value = !showGifMenu.value; + if(showGifMenu.value) { + // Somehow focus the input field + document.getElementById("gifSearchBar")!.focus(); + } +} + +function sendMessage() { + alert(message.value); + message.value = ""; +} + +function sendGif(url : string) { + alert(url); + toggleGifMenu(); +} + +tenorStore.getGifsBySearchTerm("shrek"); setInterval(getGifs, 500); @@ -119,12 +146,4 @@ setInterval(getGifs, 500); transition: .3s; filter: brightness(0.5); } - - .profilePicture { - width: 50px; - height: 50px; - border-radius: 50%; - background-size: cover; - background-position: center; - }