Remove deprecated scripts for adding head-matter to wt_config.xml, including Python and Bash implementations, to streamline configuration management.
This commit is contained in:
37
client/src/components/HistoryView.vue
Normal file
37
client/src/components/HistoryView.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="history-list">
|
||||
<div v-html="$t('history_title')"></div>
|
||||
|
||||
<div v-if="chatStore.historyResults.length === 0">
|
||||
<p>{{ $t('history_empty') }}</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="item in chatStore.historyResults"
|
||||
:key="item.userName"
|
||||
class="history-item"
|
||||
@click="selectUser(item.userName)"
|
||||
>
|
||||
{{ item.userName }}
|
||||
<small v-if="item.lastMessage">
|
||||
- {{ formatTime(item.lastMessage.timestamp) }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useChatStore } from '../stores/chat';
|
||||
|
||||
const chatStore = useChatStore();
|
||||
|
||||
function selectUser(userName) {
|
||||
chatStore.requestConversation(userName);
|
||||
}
|
||||
|
||||
function formatTime(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
return date.toLocaleString('de-DE');
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user