Chat-Page: Archivieren-Button durch 3-Dot-Menü ersetzt

This commit is contained in:
Meleki committed 2026-02-27 10:45:35 +01:00
1 parent aa2d9f1200
commit a927d6da33
5 files changed
+90 -12

No files matched your search

+15 -4
View File
@@ -1,16 +1,27 @@
#!/bin/bash
set -e
if [ "$(hostname)" = "stein2" ]; then
echo "stein2 is not allowed to do this"
_hostname=$(hostname)
if [ "$_hostname" = "stein2" ]; then
cd /home/node/.openclaw/workspace/projects/gott
elif [ "$_hostname" = "meleki" ]; then
cd ~/.openclaw/workspace/projects/gott
else
echo "$_hostname: deployment not allowed"
exit
fi
export PATH="$HOME/.dotnet:$PATH"
cd ~/.openclaw/workspace/projects/gott
dotnet publish -c Release -o publish
cp wwwroot/index.html publish/wwwroot/index.html
ssh -o ConnectTimeout=5 meleki@192.168.100.200 "nohup sudo systemctl restart gott > /dev/null 2>&1 &"
if [ "$_hostname" = "stein2" ]; then
systemctl restart gott
elif [ "$_hostname" = "meleki" ]; then
ssh -o ConnectTimeout=5 meleki@192.168.100.200 "nohup sudo systemctl restart gott > /dev/null 2>&1 &"
fi
echo "Service restarted"
+5 -5
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<NoWarn>ASP0015;IDE0017;IDE0028;IDE0130;IDE0305;IDE1006;SYSLIB1045</NoWarn>
</PropertyGroup>
@@ -19,10 +19,10 @@
<None Remove="data/**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Anthropic" Version="12.8.0" />
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
<ItemGroup>
<PackageReference Include="Anthropic" Version="12.8.0" />
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
</ItemGroup>
</Project>
+43 -1
View File
@@ -1,3 +1,45 @@
/* Header Menu */
.header-menu {
position: relative;
margin-left: auto;
}
.header-menu-trigger {
padding: var(--s1) var(--s2);
line-height: 1;
}
.header-menu-dropdown {
position: absolute;
top: 100%;
right: 0;
margin-top: var(--s1);
background: var(--f3-bg);
border: var(--border-width) solid var(--f3-border);
min-width: 10em;
z-index: 100;
display: flex;
flex-direction: column;
}
.header-menu-dropdown[hidden] {
display: none;
}
.header-menu-item {
border: none;
text-align: left;
padding: var(--s2) var(--s3);
background: none;
white-space: nowrap;
}
.header-menu-item:not(:disabled):hover {
background: var(--f2-bg);
border: none;
}
#chat {
flex: 1;
overflow-y: auto;
@@ -56,10 +98,10 @@
}
.tool-box {
align-self: center;
padding: var(--s2);
background: var(--f3-bg);
border: var(--border-width) solid var(--f3-border);
opacity: 0.5;
}
.input-area {
+6 -1
View File
@@ -122,7 +122,12 @@
<header>
<button class="back-btn" id="chatBackBtn">←</button>
<h1 id="sessionTitle">-</h1>
<button class="header-btn" id="archiveBtn">Archivieren</button>
<div class="header-menu">
<button class="header-menu-trigger" id="chatMenuBtn">⋮</button>
<div class="header-menu-dropdown" id="chatMenuDropdown" hidden>
<button class="header-menu-item" id="archiveBtn">Archivieren</button>
</div>
</div>
</header>
<div class="meta-bar" id="meta"></div>
<div id="chat"></div>
+21 -1
View File
@@ -93,9 +93,25 @@ registerPage('chat', {
});
}
// Header-Menü (3-Dot)
const chatMenuBtn = document.getElementById('chatMenuBtn');
const chatMenuDropdown = document.getElementById('chatMenuDropdown');
if (chatMenuBtn && chatMenuDropdown) {
chatMenuBtn.addEventListener('click', (e) => {
e.stopPropagation();
chatMenuDropdown.hidden = !chatMenuDropdown.hidden;
});
document.addEventListener('click', this._closeMenu = () => {
chatMenuDropdown.hidden = true;
});
}
// Archivieren
const archiveBtn = document.getElementById('archiveBtn');
if (archiveBtn) archiveBtn.addEventListener('click', clearChat);
if (archiveBtn) archiveBtn.addEventListener('click', () => {
if (chatMenuDropdown) chatMenuDropdown.hidden = true;
clearChat();
});
// State zurücksetzen und History laden
messages.length = 0;
@@ -107,6 +123,10 @@ registerPage('chat', {
},
destroy() {
if (this._closeMenu) {
document.removeEventListener('click', this._closeMenu);
this._closeMenu = null;
}
stopHistoryPolling();
messages.length = 0;
lastKnownMessageId = 0;