diff --git a/.gitignore b/.gitignore index 3292ceb..66e3797 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ node_modules/ # Generated by Cordova /plugins/ /platforms/ +.vscode diff --git a/geografia-vue/src/App.vue b/geografia-vue/src/App.vue index 0fbaad4..44e6649 100644 --- a/geografia-vue/src/App.vue +++ b/geografia-vue/src/App.vue @@ -1,9 +1,31 @@ + + diff --git a/geografia-vue/src/assets/cat_skate.png b/geografia-vue/src/assets/cat_skate.png new file mode 100644 index 0000000..bf059ba Binary files /dev/null and b/geografia-vue/src/assets/cat_skate.png differ diff --git a/geografia-vue/src/assets/demo_chats.json b/geografia-vue/src/assets/demo_chats.json index ddff6c0..804c1b6 100644 --- a/geografia-vue/src/assets/demo_chats.json +++ b/geografia-vue/src/assets/demo_chats.json @@ -2,6 +2,7 @@ "history": [ { "id": 1, + "picture": "../assets/cat_skate.png", "name": "test-name1", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, @@ -11,6 +12,7 @@ }, { "id": 2, + "picture": "../assets/cat_skate.png", "name": "test-name2", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, @@ -20,6 +22,7 @@ }, { "id": 3, + "picture": "../assets/cat_skate.png", "name": "test-name3", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, @@ -29,6 +32,7 @@ }, { "id": 4, + "picture": "../assets/cat_skate.png", "name": "test-name4", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, @@ -38,6 +42,7 @@ }, { "id": 5, + "picture": "../assets/cat_skate.png", "name": "test-name5", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, @@ -47,6 +52,7 @@ }, { "id": 6, + "picture": "../assets/cat_skate.png", "name": "test-name6", "last_message": "馃惐鉀革笍鉃★笍?", "seen": false, diff --git a/geografia-vue/src/assets/logo.svg b/geografia-vue/src/assets/logo.svg deleted file mode 100644 index bc826fe..0000000 --- a/geografia-vue/src/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/geografia-vue/src/components/ChatList.vue b/geografia-vue/src/components/ChatList.vue index 6f644ab..7b436a9 100644 --- a/geografia-vue/src/components/ChatList.vue +++ b/geografia-vue/src/components/ChatList.vue @@ -1,19 +1,23 @@ @@ -21,6 +25,13 @@ import ChatMsg from "@/components/ChatMsg.vue"; import demo_chats_json from "../assets/demo_chats.json"; export default { demo_chats: demo_chats_json, + selectedChat: false, + methods: { + showChat(chat) { + this.$emit("change-header", [chat.picture, chat.name]); + this.selectedChat = true; + }, + }, }; diff --git a/geografia-vue/src/components/ChatPreview.vue b/geografia-vue/src/components/ChatPreview.vue index b94758b..c7b4347 100644 --- a/geografia-vue/src/components/ChatPreview.vue +++ b/geografia-vue/src/components/ChatPreview.vue @@ -1,7 +1,9 @@ diff --git a/geografia-vue/src/components/Header.vue b/geografia-vue/src/components/Header.vue new file mode 100644 index 0000000..197094b --- /dev/null +++ b/geografia-vue/src/components/Header.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/geografia-vue/src/components/Keyboard.vue b/geografia-vue/src/components/Keyboard.vue index 94d0b8d..fc829e1 100644 --- a/geografia-vue/src/components/Keyboard.vue +++ b/geografia-vue/src/components/Keyboard.vue @@ -1,17 +1,5 @@ - - \ No newline at end of file diff --git a/geografia-vue/src/components/MessageComposition.vue b/geografia-vue/src/components/MessageComposition.vue new file mode 100644 index 0000000..b9a2739 --- /dev/null +++ b/geografia-vue/src/components/MessageComposition.vue @@ -0,0 +1,19 @@ + + + + + + + diff --git a/geografia-vue/src/main.js b/geografia-vue/src/main.js index 7bda948..9722180 100644 --- a/geografia-vue/src/main.js +++ b/geografia-vue/src/main.js @@ -1,8 +1,6 @@ import { createApp } from "vue"; import { createPinia } from "pinia"; - import App from "./App.vue"; - import "./assets/main.css"; const app = createApp(App); diff --git a/geografia-vue/src/router.js.bck b/geografia-vue/src/router.js.bck new file mode 100644 index 0000000..ed310d5 --- /dev/null +++ b/geografia-vue/src/router.js.bck @@ -0,0 +1,24 @@ +/* + VueRouter inutile fino allo sviluppo dell'handler dei messaggi + e solo nel caso si voglia supportare l'uso di url nella versione web +*/ + +import { createRouter, createWebHashHistory } from "vue-router"; + +2; // 1. Define route components. +const ChatList = { template: "./components/ChatList.vue" }; +// const ChatView = { template: "./components/ChatView.vue" }; +// const MessageComposition = { template: "./components/MessageComposition.vue" }; + +// 2. Define some routes +const routes = [ + { path: "/", component: ChatList }, + // { path: "/chat_view", component: ChatView }, + // { path: "/chat_view/write", component: MessageComposition }, +]; + +// 3. Create the router instance and pass the `routes` option +export const router = createRouter({ + history: createWebHashHistory(), + routes, +});