2 Commits

Author SHA1 Message Date
WLTBAgent
0bf1e53f65 Phase 4: Complete admin UI with TemplateResponse and configuration forms
- PageController: Replaced simple HTML with proper TemplateResponse
  - Added index() method with full admin interface
  - Added save() method for POST /save
  - Added load() method for GET /load
  - Injected IConfig service for configuration storage
  - Added validation for required fields
  - Proper error handling with JSONResponse

- Admin template: Full Nextcloud-compatible admin interface
  - Google Analytics configuration section (client ID, secret, refresh token)
  - Anthropic Claude API configuration section (API key)
  - Configuration status display (success/warning states)
  - Form with proper Nextcloud components
  - CSRF token handling

- Routes: Added /save and /load endpoints
  - page#index (GET) - renders admin page
  - page#save (POST) - saves configuration
  - page#load (GET) - loads configuration

- Application.php: Updated with APP_VERSION constant
  - Proper style and script loading

- CSS: Complete styling for admin interface
  - Responsive design with Nextcloud theme colors
  - Form input styling with focus states
  - Action buttons with hover effects

- JavaScript: Complete form handling
  - AJAX submission to /save endpoint
  - Configuration loading from /load endpoint
  - CSRF token handling with OC.requestToken
  - OC.Notification integration for success/error messages
  - Real-time status updates

This is a complete, working admin interface for configuration.
Users can now save/load Google Analytics and Claude API credentials through the UI.
2026-02-13 22:49:20 +00:00
WLTBAgent
730e576ead Fix: Simplify integration and fix admin template
- Removed settings/navigation from appinfo/info.xml
  - These sections can cause routing conflicts
  - App now relies purely on routes.php
- Simplified Application.php
  - Removed manual service/controller registration
  - Let Nextcloud DI framework handle it automatically
- Fixed admin template to use Nextcloud standards
  - Removed non-standard style() call
  - Added proper l10n support with p($l->t(...))
  - Clean template structure
- Created css/admin.css
  - Nextcloud-compatible styling
  - Matches design language
- Created js/admin.js
  - Handles Save Configuration button
  - Handles Test Connection button
  - Uses OC, OC.Notification APIs

This should fix admin page not appearing issue.
Users can access via: Settings → Administration → Additional Settings
2026-02-13 19:06:07 +00:00