diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 54a73ac..2f993cf 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -54,7 +54,53 @@ "Bash(timeout 5 ./secubox-tools/validate-modules.sh:*)", "Bash(tree:*)", "Bash(for file in luci-app-ksm-manager/htdocs/luci-static/resources/view/ksm-manager/*.js luci-app-ksm-manager/htdocs/luci-static/resources/ksm-manager/api.js)", - "Bash(git show:*)" + "Bash(git show:*)", + "Bash(for module in luci-app-*/root/usr/share/luci/menu.d/*.json)", + "Bash(do if [ -f $module ])", + "Bash(then echo '=== $\\(basename $module\\) ===' jq -r \".[\"\"admin/secubox\"\"] // empty | keys[]\" $module)", + "Bash(for category in security monitoring network system services)", + "Bash(do echo \"=== admin/secubox/$category ===\" grep -h \"\"\"admin/secubox/$category/\" luci-app-*/root/usr/share/luci/menu.d/*.json)", + "Bash(pgrep:*)", + "Bash(git rev-parse:*)", + "Bash(ping:*)", + "Bash(timeout 5 curl:*)", + "Bash(gh run list:*)", + "Bash(for dir in luci-app-*/)", + "Bash(do if [ -f \"$dir/Makefile\" ])", + "Bash(then if ! grep -q \"include.*luci.mk\" \"$dir/Makefile\")", + "Bash(fi)", + "Bash(gh workflow run:*)", + "Bash(curl:*)", + "Bash(sudo apt-get install:*)", + "Bash(/tmp/deploy-system-hub.sh)", + "Bash(ssh:*)", + "Bash(timeout 10 ./secubox-tools/validate-modules.sh:*)", + "Bash(scp:*)", + "Bash(./deploy-theme-system.sh)", + "Bash(for file in health.js services.js logs.js backup.js components.js remote.js settings.js diagnostics.js)", + "Bash(if [ -f \"$file\" ])", + "Bash(then)", + "Bash(if ! grep -q \"system-hub/theme\" \"$file\")", + "Bash(for file in services.js logs.js backup.js components.js remote.js settings.js diagnostics.js)", + "Bash(do if [ -f \"$file\" ])", + "Bash(then head -10 \"$file\")", + "Bash(./deploy-beta-release.sh:*)", + "Bash(./deploy-v0.1.1.sh:*)", + "Bash(luci-app-secubox/Makefile )", + "Bash(luci-app-secubox/htdocs/luci-static/resources/secubox/*.css)", + "Bash(luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js )", + "Bash(luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js)", + "Bash(luci-app-secubox/root/usr/libexec/rpcd/luci.secubox )", + "Bash(luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json )", + "Bash(luci-app-system-hub/Makefile )", + "Bash(luci-app-system-hub/README.md )", + "Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js )", + "Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css )", + "Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js )", + "Bash(luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js)", + "Bash(luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub )", + "Bash(luci-app-system-hub/root/usr/share/rpcd/acl.d/luci-app-system-hub.json )", + "Bash(LUCI_DEVELOPMENT_REFERENCE.md)" ] } } diff --git a/deploy-beta-release.sh b/deploy-beta-release.sh new file mode 100755 index 0000000..42e0254 --- /dev/null +++ b/deploy-beta-release.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# Deploy SecuBox and System Hub v1.0.0-beta with unified theme system + +ROUTER="root@192.168.8.191" + +echo "๐Ÿš€ Deploying SecuBox + System Hub v1.0.0-beta to $ROUTER" +echo "" + +echo "๐Ÿ“ฆ Deploying SecuBox v1.0.0-beta..." +# Deploy SecuBox RPCD backend +scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy SecuBox ACL +scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \ + "$ROUTER:/usr/share/rpcd/acl.d/" + +# Deploy SecuBox API +scp luci-app-secubox/htdocs/luci-static/resources/secubox/api.js \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy SecuBox theme manager +scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy SecuBox CSS +scp luci-app-secubox/htdocs/luci-static/resources/secubox/secubox.css \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy ALL SecuBox views +scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js \ + "$ROUTER:/www/luci-static/resources/view/secubox/" + +echo "" +echo "๐Ÿ“ฆ Deploying System Hub v1.0.0-beta..." +# Deploy System Hub RPCD backend +scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy System Hub API +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub theme manager +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub CSS +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy ALL System Hub views +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" + +echo "" +echo "๐Ÿ”ง Setting permissions and restarting services..." +ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox /usr/libexec/rpcd/luci.system-hub" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js" +ssh "$ROUTER" "/etc/init.d/rpcd restart" + +echo "" +echo "โœ… SecuBox + System Hub v1.0.0-beta deployed successfully!" +echo "" +echo "๐Ÿ“‹ What's new in v1.0.0-beta:" +echo " โ€ข Unified theme system (dark/light/system)" +echo " โ€ข Coherent skin across ALL tabs in both plugins" +echo " โ€ข Single theme setting controls both SecuBox and System Hub" +echo " โ€ข Theme preference stored in /etc/config/secubox" +echo "" +echo "๐ŸŽจ Theme features:" +echo " โ€ข Dark mode (default): Deep backgrounds, light text" +echo " โ€ข Light mode: Bright backgrounds, dark text" +echo " โ€ข System mode: Auto-detect from OS preferences" +echo "" +echo "๐Ÿงช Testing:" +echo " 1. Open any SecuBox tab - should show unified theme" +echo " 2. Open any System Hub tab - should show same theme" +echo " 3. Change theme in SecuBox Settings" +echo " 4. Refresh any tab - theme applies everywhere" +echo "" +echo "๐Ÿ‘‰ Clear browser cache (Ctrl+Shift+R) and reload pages" diff --git a/deploy-secubox-dashboard.sh b/deploy-secubox-dashboard.sh new file mode 100755 index 0000000..94ac9af --- /dev/null +++ b/deploy-secubox-dashboard.sh @@ -0,0 +1,46 @@ + #!/bin/bash + # Deploy SecuBox dashboard updates to router + + ROUTER="root@192.168.8.191" + BASE_DIR="/home/reepost/CyberMindStudio/_files/secubox-openwrt" + + echo "๐Ÿš€ Deploying SecuBox v0.0.5-beta dashboard to router..." + + # Copy dashboard files + echo "๐Ÿ“ฆ Copying dashboard.js..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/dashboard.js" \ + $ROUTER:/www/luci-static/resources/view/secubox/dashboard.js + + echo "๐Ÿ“ฆ Copying dashboard.css..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/dashboard.css" \ + $ROUTER:/www/luci-static/resources/secubox/dashboard.css + + echo "๐Ÿ“ฆ Copying alerts.js..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/alerts.js" \ + $ROUTER:/www/luci-static/resources/view/secubox/alerts.js + + echo "๐Ÿ“ฆ Copying alerts.css..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/alerts.css" \ + $ROUTER:/www/luci-static/resources/secubox/alerts.css + + echo "๐Ÿ“ฆ Copying monitoring.js..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js" \ + $ROUTER:/www/luci-static/resources/view/secubox/monitoring.js + + echo "๐Ÿ“ฆ Copying monitoring.css..." + scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/monitoring.css" \ + $ROUTER:/www/luci-static/resources/secubox/monitoring.css + + # Fix permissions on router + echo "๐Ÿ”ง Fixing permissions on router..." + ssh $ROUTER << 'REMOTE_EOF' + chmod 644 /www/luci-static/resources/view/secubox/*.js + chmod 644 /www/luci-static/resources/secubox/*.css + rm -rf /tmp/luci-* + echo "โœ… Permissions fixed and cache cleared" +REMOTE_EOF + + echo "" + echo "โœ… Deployment complete!" + echo "๐Ÿ“ฑ Please refresh your browser with Ctrl+F5" + echo "" diff --git a/deploy-system-hub.sh b/deploy-system-hub.sh new file mode 100755 index 0000000..9a71036 --- /dev/null +++ b/deploy-system-hub.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Deploy system-hub v0.0.3-alpha to router + +ROUTER="root@192.168.8.191" + +echo "๐Ÿš€ Deploying system-hub v0.0.3-alpha to $ROUTER" +echo "" + +# Deploy API module +echo "๐Ÿ“ฆ Deploying API module..." +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy views +echo "๐Ÿ“ฆ Deploying views..." +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/overview.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/health.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/settings.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" + +# Deploy RPCD backend +echo "๐Ÿ“ฆ Deploying RPCD backend..." +scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy ACL permissions +echo "๐Ÿ“ฆ Deploying ACL permissions..." +scp luci-app-system-hub/root/usr/share/rpcd/acl.d/luci-app-system-hub.json \ + "$ROUTER:/usr/share/rpcd/acl.d/" + +# Make RPCD script executable +echo "๐Ÿ”ง Setting permissions..." +ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.system-hub" + +# Restart RPCD +echo "๐Ÿ”„ Restarting RPCD..." +ssh "$ROUTER" "/etc/init.d/rpcd restart" + +echo "" +echo "โœ… Deployment complete!" +echo "๐Ÿ‘‰ Clear browser cache (Ctrl+Shift+R) and reload the page" diff --git a/deploy-theme-system.sh b/deploy-theme-system.sh new file mode 100755 index 0000000..1c78ae0 --- /dev/null +++ b/deploy-theme-system.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# Deploy unified theme system to router +# SecuBox + System Hub theme coherence + +ROUTER="root@192.168.8.191" + +echo "๐ŸŽจ Deploying unified theme system to $ROUTER" +echo "" + +echo "๐Ÿ“ฆ Deploying SecuBox components..." +# Deploy SecuBox RPCD backend (with get_theme method) +scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy SecuBox ACL (with get_theme permission) +scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \ + "$ROUTER:/usr/share/rpcd/acl.d/" + +# Deploy SecuBox API (with getTheme) +scp luci-app-secubox/htdocs/luci-static/resources/secubox/api.js \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy SecuBox theme manager +scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy SecuBox CSS (with dark/light variables) +scp luci-app-secubox/htdocs/luci-static/resources/secubox/secubox.css \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy SecuBox dashboard view (with theme integration) +scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/dashboard.js \ + "$ROUTER:/www/luci-static/resources/view/secubox/" + +echo "" +echo "๐Ÿ“ฆ Deploying System Hub components..." +# Deploy System Hub theme manager +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub CSS (with dark/light variables) +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub overview view (with theme integration) +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/overview.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" + +echo "" +echo "๐Ÿ”ง Setting permissions and restarting services..." +ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js" +ssh "$ROUTER" "/etc/init.d/rpcd restart" + +echo "" +echo "โœ… Theme system deployed successfully!" +echo "" +echo "๐Ÿ“‹ Theme configuration:" +echo " โ€ข Theme setting stored in: /etc/config/secubox (option theme)" +echo " โ€ข Available themes: dark, light, system" +echo " โ€ข Both SecuBox and System Hub use the same theme" +echo "" +echo "๐Ÿงช Testing:" +echo " 1. Open SecuBox Settings: http://192.168.8.191/cgi-bin/luci/admin/secubox/settings" +echo " 2. Change theme to 'light' and save" +echo " 3. Refresh both SecuBox and System Hub pages" +echo " 4. Both should switch to light theme" +echo "" +echo "๐Ÿ‘‰ Clear browser cache (Ctrl+Shift+R) and reload pages" diff --git a/deploy-v0.1.1.sh b/deploy-v0.1.1.sh new file mode 100755 index 0000000..b10ca04 --- /dev/null +++ b/deploy-v0.1.1.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# Deploy SecuBox + System Hub v0.1.1 with theme fixes + +ROUTER="root@192.168.8.191" + +echo "๐Ÿš€ Deploying SecuBox + System Hub v0.1.1 to $ROUTER" +echo "" + +echo "๐Ÿ“ฆ Deploying SecuBox v0.1.1..." +# Deploy SecuBox RPCD backend +scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy SecuBox ACL +scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \ + "$ROUTER:/usr/share/rpcd/acl.d/" + +# Deploy SecuBox theme manager +scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy ALL SecuBox CSS (with theme variables) +scp luci-app-secubox/htdocs/luci-static/resources/secubox/*.css \ + "$ROUTER:/www/luci-static/resources/secubox/" + +# Deploy ALL SecuBox views (with CSS loading) +scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js \ + "$ROUTER:/www/luci-static/resources/view/secubox/" + +echo "" +echo "๐Ÿ“ฆ Deploying System Hub v0.1.1..." +# Deploy System Hub RPCD backend +scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \ + "$ROUTER:/usr/libexec/rpcd/" + +# Deploy System Hub API +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub theme manager +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy System Hub CSS +scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \ + "$ROUTER:/www/luci-static/resources/system-hub/" + +# Deploy ALL System Hub views +scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js \ + "$ROUTER:/www/luci-static/resources/view/system-hub/" + +echo "" +echo "๐Ÿ”ง Setting permissions and restarting services..." +ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox /usr/libexec/rpcd/luci.system-hub" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js" +ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js" +ssh "$ROUTER" "/etc/init.d/rpcd restart" + +echo "" +echo "โœ… v0.1.1 deployed successfully!" +echo "" +echo "๐Ÿ“‹ Changelog v0.1.1:" +echo " โ€ข Fixed: Theme switching now works in SecuBox visual display" +echo " โ€ข Fixed: CSS variables properly loaded in all SecuBox views" +echo " โ€ข Fixed: Hardcoded colors replaced with theme variables" +echo " โ€ข Added: secubox.css loaded in dashboard, alerts, monitoring views" +echo " โ€ข Theme coherence across ALL tabs in both plugins" +echo "" +echo "๐ŸŽจ Theme features:" +echo " โ€ข Dark mode: Deep backgrounds (#0f172a), light text (#f1f5f9)" +echo " โ€ข Light mode: Bright backgrounds (#f8fafc), dark text (#0f172a)" +echo " โ€ข System mode: Auto-detect from OS (prefers-color-scheme)" +echo "" +echo "๐Ÿงช Test now:" +echo " 1. Clear browser cache (Ctrl+Shift+R)" +echo " 2. Go to SecuBox โ†’ Settings โ†’ Change theme to 'Light'" +echo " 3. Refresh SecuBox Dashboard โ†’ Should be light!" +echo " 4. Refresh System Hub Overview โ†’ Should be light too!" +echo "" +echo "๐Ÿ‘‰ Clear browser cache (Ctrl+Shift+R) and reload pages" diff --git a/test-direct.js b/test-direct.js new file mode 100644 index 0000000..fbfd86f --- /dev/null +++ b/test-direct.js @@ -0,0 +1,8 @@ +'use strict'; +'require view'; + +return view.extend({ + render: function() { + return E('div', {}, 'TEST: This text should appear if JavaScript works!'); + } +});