Remove CMake configuration and application source files. This includes the deletion of CMakeLists.txt, application logic in app.cpp and app.h, and broadcast functionality in broadcast.cpp. This cleanup streamlines the project structure by removing unused files and configurations.

This commit is contained in:
Torsten Schulz (local)
2026-03-19 11:59:58 +01:00
parent 65cce920f5
commit 10569bd097
13 changed files with 461 additions and 3925 deletions

View File

@@ -67,9 +67,12 @@ const smileys = {
};
function sendMessage() {
if (!message.value.trim() || !chatStore.currentConversation) return;
const trimmed = message.value.trim();
if (!trimmed) return;
const isCommand = trimmed.startsWith('/');
if (!isCommand && !chatStore.currentConversation) return;
chatStore.sendMessage(chatStore.currentConversation, message.value.trim());
chatStore.sendMessage(chatStore.currentConversation, trimmed);
message.value = '';
}

View File

@@ -185,6 +185,10 @@ export const useChatStore = defineStore('chat', () => {
handleWebSocketMessage({ type: 'historyResults', ...data });
});
socketInstance.on('commandResult', (data) => {
handleWebSocketMessage({ type: 'commandResult', ...data });
});
socketInstance.on('unreadChats', (data) => {
handleWebSocketMessage({ type: 'unreadChats', ...data });
});
@@ -287,6 +291,27 @@ export const useChatStore = defineStore('chat', () => {
case 'historyResults':
historyResults.value = data.results;
break;
case 'commandResult': {
const lines = Array.isArray(data.lines) ? data.lines : [];
if (!currentConversation.value) {
errorMessage.value = lines.join(' | ');
setTimeout(() => {
errorMessage.value = null;
}, 5000);
break;
}
const timestamp = new Date().toISOString();
for (const line of lines) {
messages.value.push({
from: 'System',
message: String(line),
timestamp,
self: false,
isImage: false
});
}
break;
}
case 'unreadChats':
unreadChatsCount.value = data.count || 0;
break;
@@ -354,19 +379,23 @@ export const useChatStore = defineStore('chat', () => {
}
const messageId = Date.now().toString();
const trimmed = message.trim();
const isCommand = trimmed.startsWith('/');
socket.value.emit('message', {
toUserName,
message,
message: trimmed,
messageId
});
// Lokal hinzufügen
messages.value.push({
from: userName.value,
message,
timestamp: new Date().toISOString(),
self: true
});
// Lokal hinzufügen (außer bei Commands, die serverseitig beantwortet werden)
if (!isCommand) {
messages.value.push({
from: userName.value,
message: trimmed,
timestamp: new Date().toISOString(),
self: true
});
}
// Timeout zurücksetzen bei Aktivität
resetTimeoutTimer();