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