Iniziata keyboard, sposto su branch feature_message_composition

feature_keyboard
reddigriz 2 years ago
parent ed4ea2df0f
commit 3e4630fe36

@ -1,5 +1,16 @@
<template> <template>
<div class="msg-composition"><p>I'm writing hereee</p></div> <div class="keyboard" @click="selectWord">
<p>I'm writing hereee</p>
</div>
</template> </template>
<script>
export default {
methods: {
selectedWord() {
this.$emit("selectedWord", "a");
},
},
};
</script>
<style scoped></style> <style scoped></style>

@ -1,14 +1,12 @@
<template> <template>
<div class="msg-composition"> <div class="keyboard-word">
<KeyboardWord /> <p>placeholder word</p>
</div> </div>
</template> </template>
<script> <script>
import KeyboardWord from "./KeyboardWord.vue";
export default { export default {
components: { KeyboardWord }, props: {},
setup() {},
}; };
</script> </script>

@ -5,14 +5,26 @@ import KeyboardWord from "./KeyboardWord.vue";
<template> <template>
<div> <div>
<KeyboardWord /> <KeyboardWord :key="soggetto" @click="test" />
<Keyboard /> <KeyboardWord :key="oggetto" @click="test" />
<KeyboardWord :key="verbo" @click="test" />
<Keyboard @selectedWord="selectedWord" />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
setup() {}, data() {
return { focus: "" };
},
methods: {
test(e) {
console.log(e);
},
selectedWord() {
console.log("selectedWord");
},
},
}; };
</script> </script>

@ -1,30 +1,34 @@
<script setup> <script setup>
import Keyboard from "../keyboard/Keyboard.vue"; import MessageComposition from "../keyboard/MessageComposition.vue";
import ChatHistory from "./ChatHistory.vue"; import ChatHistory from "./ChatHistory.vue";
</script> </script>
<template> <template>
<div> <div>
<!-- Move this button in the header --> <!-- Move this button in the header -->
<div id="chat-view" v-show="!writeMessage">
<button alt="Back" name="Back" @click="this.$emit('hideChat')"></button> <button alt="Back" name="Back" @click="this.$emit('hideChat')"></button>
<ChatHistory :chat-id="chatId" /> <ChatHistory :chat-id="chatId" />
<button <button
alt="write message" alt="write message"
name="write-message" name="write-message"
@click="$options.writeMessage = true" @click="this.writeMessage = true"
> >
+ +
</button> </button>
<Keyboard v-if="writeMessage" :chat-id="chatId" /> </div>
<MessageComposition
v-if="writeMessage"
:chat-id="chatId"
@hideMessageHistory="this.writeMessage = false"
/>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
writeMessage: Boolean, data() {
setup() { return { writeMessage: false };
this.writeMessage = false;
console.log(this.writeMessage);
}, },
props: { chatId: Number }, props: { chatId: Number },
}; };

Loading…
Cancel
Save