feat: add web dashboard with slide-in drawer navigation

- Flask backend with 23 API routes (entertainment, telegram, docker, system)
- Alpine.js + Tailwind CSS dark-mode SPA with 4 tabs
- pos-dashboard CLI tool with port/config management
- Mobile slide-in drawer with swipe-to-close
- Sticky header stays pinned on scroll
- Tab completion fixes for category-less tools
- POST /api/telegram/commands endpoint for adding commands
This commit is contained in:
Your Name
2026-08-18 11:54:41 -04:00
parent 06b077db40
commit 99085adc76
63 changed files with 5905 additions and 122852 deletions
+5 -3
View File
@@ -180,12 +180,14 @@ cfg_value() {
# "-" removes the key's line. Same semantics as write_config_key(). Replaces
# via grep-v + append (not sed), so values may contain &, |, \ etc. safely.
cfg_write() {
local file="$1" key="$2" val="$3" tmp
local file="$1" key="$2" val="$3" tmp _esc_key
# Escape regex special characters in the key for safe use in grep -v
_esc_key="$(printf '%s' "$key" | sed 's/[.[\*^$()+?{|]/\\&/g')"
mkdir -p "$(dirname "$file")"
if [ "$val" = "-" ]; then
[ -f "$file" ] || return 0
tmp="$(mktemp)"
grep -v "^${key}=" "$file" >"$tmp" || true
grep -v "^${_esc_key}=" "$file" >"$tmp" || true
mv "$tmp" "$file"
chmod 600 "$file"
return 0
@@ -196,7 +198,7 @@ cfg_write() {
warn "multi-line paste — using first line only"
fi
tmp="$(mktemp)"
grep -v "^${key}=" "$file" 2>/dev/null >"$tmp" || true
grep -v "^${_esc_key}=" "$file" 2>/dev/null >"$tmp" || true
printf '%s="%s"\n' "$key" "$val" >>"$tmp"
mv "$tmp" "$file"
chmod 600 "$file"