Correct message date formatting bug
This commit is contained in:
parent
081313a140
commit
08df3b8bb7
1
frontend/dist/assets/index-DIsRwQnG.css
vendored
Normal file
1
frontend/dist/assets/index-DIsRwQnG.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/dist/assets/index-DTfx5B6F.css
vendored
1
frontend/dist/assets/index-DTfx5B6F.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
frontend/dist/index.html
vendored
4
frontend/dist/index.html
vendored
@ -10,8 +10,8 @@
|
|||||||
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
<script type="module" crossorigin src="/assets/index-adnA05sT.js"></script>
|
<script type="module" crossorigin src="/assets/index-lEa7rgri.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DTfx5B6F.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DIsRwQnG.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -22,6 +22,7 @@ import { ref, onMounted } from 'vue'
|
|||||||
import ChatSidebar from './ChatSidebar.vue'
|
import ChatSidebar from './ChatSidebar.vue'
|
||||||
import ChatMain from './ChatMain.vue'
|
import ChatMain from './ChatMain.vue'
|
||||||
import { chatService } from '../services/chatService.ts'
|
import { chatService } from '../services/chatService.ts'
|
||||||
|
import { dateUtils } from '../utils/dateUtils.ts'
|
||||||
|
|
||||||
// Estado reactivo
|
// Estado reactivo
|
||||||
const chatId = ref('')
|
const chatId = ref('')
|
||||||
@ -86,7 +87,7 @@ const sendMessage = async (prompt) => {
|
|||||||
const userMessage = {
|
const userMessage = {
|
||||||
role: "user",
|
role: "user",
|
||||||
text: prompt,
|
text: prompt,
|
||||||
date: new Date().toISOString()
|
date: dateUtils.formatDate(new Date())
|
||||||
}
|
}
|
||||||
messages.value.push(userMessage)
|
messages.value.push(userMessage)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
v-show="msg.text"
|
v-show="msg.text"
|
||||||
>
|
>
|
||||||
<span>{{ msg.text }}</span>
|
<span>{{ msg.text }}</span>
|
||||||
<em class="timestamp">{{ formatDate(msg.date) }}</em>
|
<em class="timestamp">{{ msg.date }}</em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, nextTick } from 'vue'
|
import { ref, watch, nextTick } from 'vue'
|
||||||
import { dateUtils } from '../utils/dateUtils.ts'
|
|
||||||
import Spinner from './Spinner.vue'
|
import Spinner from './Spinner.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user