FreeDATA/gui_vue/src/components/chat_conversations.vue

46 lines
1.4 KiB
Vue
Raw Normal View History

2023-09-12 15:52:16 +00:00
<script setup lang="ts">
import {saveSettingsToFile} from '../js/settingsHandler';
import { setActivePinia } from 'pinia';
import pinia from '../store/index';
setActivePinia(pinia);
2023-09-14 19:45:07 +00:00
import {deleteChatByCallsign} from '../js/chatHandler'
2023-09-12 15:52:16 +00:00
import { useSettingsStore } from '../store/settingsStore.js';
const settings = useSettingsStore(pinia);
import { useStateStore } from '../store/stateStore.js';
const state = useStateStore(pinia);
import { useChatStore } from '../store/chatStore.js';
const chat = useChatStore(pinia);
2023-09-14 19:45:07 +00:00
function deleteChat(callsign){
deleteChatByCallsign(callsign)
}
2023-09-12 15:52:16 +00:00
import chat_conversations_entry from './chat_conversations_entry.vue'
</script>
<template>
<div class="list-group" id="chat-list-tab" role="chat-tablist">
<template v-for="item in chat.callsign_list" :key="item.dxcallsign">
2023-09-14 19:45:07 +00:00
<a class="list-group-item list-group-item-action" :id="`list-chat-list-${item}`" data-bs-toggle="list" :href="`#list-${item}-messages`" role="tab" aria-controls="list-{{item}}-messages">
<div class="row">
<div class="col-9">{{item}}</div>
<div class="col-3">
<button class="btn btn-sm btn-outline-danger ms-5" @click="deleteChat(item)"><i class="bi bi-trash"></i></button>
</div>
</div>
</a>
2023-09-12 15:52:16 +00:00
</template>
<!--<chat_conversations_entry/>-->
</div>
</template>