๐Ÿ“ฆ LinkLeong / zima-nodes

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching โš–๏ธ Apache License 2.0
๐Ÿ“ฅ Clone https://github.com/LinkLeong/zima-nodes.git
HTTPS git clone https://github.com/LinkLeong/zima-nodes.git
SSH git clone git@github.com:LinkLeong/zima-nodes.git
CLI gh repo clone LinkLeong/zima-nodes
a624669980@163.com a624669980@163.com Merge remote main branch 6554f39 5 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ icons
๐Ÿ“ scripts
๐Ÿ“ styles
๐Ÿ“„ background.js
๐Ÿ“„ LICENSE
๐Ÿ“„ manifest.json
๐Ÿ“„ options.html
๐Ÿ“„ popup.html
๐Ÿ“„ README.md
๐Ÿ“„ README.md

ZimaOS Client - Chrome Extension

A Chrome browser extension for managing and quickly accessing ZimaOS systems.

Features

  • ๐Ÿ”ง Configuration Management: Easily configure ZimaOS IP address, username, and password
  • ๐Ÿ” Auto Login: Integrated ZimaOS login API with automatic token acquisition and management
  • ๐Ÿ”„ Token Management: Automatically refresh expired access tokens without re-login
  • ๐Ÿ  Quick Access: One-click access to ZimaOS homepage
  • ๐Ÿ“ฑ App Shortcuts: Quick access to commonly used ZimaOS applications
  • ๐Ÿ”„ Connection Status: Real-time display of ZimaOS connection status
  • โš™๏ธ Settings Management: Modify connection configuration anytime
  • ๐Ÿ› Debug Features: Built-in debug logging for development and troubleshooting

Installation

Developer Mode Installation (Recommended for Testing)

  • Download or clone this project locally
  • Open Chrome browser and navigate to the extensions management page:
  • Method 1: Enter chrome://extensions/ in the address bar
  • Method 2: Click the three-dot menu in the top right โ†’ More tools โ†’ Extensions
  • Enable "Developer mode" in the top right corner
  • Click "Load unpacked"
  • Select the project folder
  • Extension installation complete!

Usage Instructions

Initial Configuration

  • After installing the extension, click the ZimaOS icon in the browser toolbar
  • First-time use will show a configuration prompt, click "Start Configuration"
  • Fill in the following information:
  • ZimaOS Address: Your ZimaOS system IP address and port (e.g., 192.168.1.100:8080)
  • Username: ZimaOS login username
  • Password: ZimaOS login password
  • Click "Test Connection" to verify the configuration is correct
  • Click "Save Configuration" to complete setup

Daily Usage

  • Quick Access: Click the extension icon, then click "Open ZimaOS" to directly access the system homepage
  • App Shortcuts: Click app icons in the extension popup to quickly open corresponding features
  • View Status: The extension displays current ZimaOS connection status (online/offline)
  • Modify Configuration: Click the settings button or "Modify Configuration" to update connection information

Available App Shortcuts

  • ๐Ÿ“ File Manager: Access ZimaOS file manager
  • ๐ŸŽต Media Center: Open media playback and management
  • ๐Ÿณ Docker: Manage Docker containers
  • โš™๏ธ System Settings: Access system configuration
  • ๐Ÿ’ป Terminal: Open web terminal
  • ๐Ÿ“Š System Monitor: View system performance monitoring

Debug Guide

Development Environment Setup

  • Ensure the extension is installed following the above method
  • Find "ZimaOS Client" on the Chrome extensions page
  • Click "Details" to enter the extension details page

Debugging Methods

1. View Console Logs

Popup Page Debugging:

  • Right-click the extension icon and select "Inspect popup"
  • View logs in the Console tab of developer tools
Configuration Page Debugging:
  • Click "Extension options" on the extension details page
  • Press F12 on the configuration page to open developer tools
Background Script Debugging:
  • Click "Inspect views" next to "service worker" on the extension details page
  • View background script logs

2. Common Issue Troubleshooting

Connection Test Failed:

  • Check if ZimaOS address format is correct
  • Confirm ZimaOS system is running
  • Check network connection
  • Look for CORS errors in browser console
Extension Cannot Load:
  • Check if manifest.json syntax is correct
  • Confirm all referenced file paths exist
  • Check error messages on Chrome extensions page
Style Display Issues:
  • Check if CSS file paths are correct
  • Confirm files exist in styles directory
  • Use developer tools to check CSS loading

3. Reload Extension

After modifying code, you need to reload the extension:

  • Go to chrome://extensions/
  • Find the "Zima Nodes" extension
  • Click the refresh button (๐Ÿ”„)
  • Re-test functionality

File Structure

zima-client/
โ”œโ”€โ”€ manifest.json          # Extension configuration file
โ”œโ”€โ”€ popup.html             # Main popup page
โ”œโ”€โ”€ options.html           # Configuration page
โ”œโ”€โ”€ background.js          # Background script
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ popup.js          # Popup page script
โ”‚   โ””โ”€โ”€ options.js        # Configuration page script
โ”œโ”€โ”€ styles/
โ”‚   โ”œโ”€โ”€ popup.css         # Popup page styles
โ”‚   โ””โ”€โ”€ options.css       # Configuration page styles
โ”œโ”€โ”€ icons/
โ”‚   โ””โ”€โ”€ icon.svg          # Extension icon
โ””โ”€โ”€ README.md             # Documentation

Technical Details

  • Manifest Version: 3 (Latest version)
  • Permissions: storage (store configuration), activeTab (open tabs)
  • Storage: Uses Chrome Storage API for synchronized configuration storage
  • Compatibility: Chrome 88+

Important Notes

  • The extension uses Chrome Storage API to store configuration information, data will sync across devices logged into the same Google account
  • Passwords are stored locally in plain text, please ensure device security
  • Connection testing uses simple HTTP requests, which may be limited by CORS policies
  • Recommended for use in LAN environments to ensure ZimaOS system security

License

Apache License 2.0