Enhanced setup and settings pages with full configuration
- Extended SetupRequest model to include all configuration fields - Updated setup API endpoint to handle comprehensive configuration - Created new setup.html with organized configuration sections - Enhanced config modal in index.html with all settings - Updated JavaScript modules to use unified config API - Added backup configuration section - Documented new features in features.md and instructions.md
This commit is contained in:
@@ -186,6 +186,23 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- General Settings -->
|
||||
<div class="config-section">
|
||||
<h4 data-text="general-settings">General Settings</h4>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="app-name-input" data-text="app-name">Application Name:</label>
|
||||
<input type="text" id="app-name-input" class="input-field"
|
||||
placeholder="Aniworld">
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="data-dir-input" data-text="data-directory">Data Directory:</label>
|
||||
<input type="text" id="data-dir-input" class="input-field"
|
||||
placeholder="data">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="anime-directory-input" data-text="anime-directory">Anime Directory:</label>
|
||||
<div class="input-group">
|
||||
@@ -233,10 +250,18 @@
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" id="scheduled-rescan-enabled">
|
||||
<span class="checkbox-custom"></span>
|
||||
<span data-text="enable-scheduled-rescan">Enable Daily Rescan</span>
|
||||
<span data-text="enable-scheduled-rescan">Enable Scheduler</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="config-item" id="rescan-interval-config">
|
||||
<label for="scheduled-rescan-interval" data-text="rescan-interval">Check Interval (minutes):</label>
|
||||
<input type="number" id="scheduled-rescan-interval" value="60" min="1" class="input-field">
|
||||
<small class="config-hint" data-text="rescan-interval-hint">
|
||||
How often to check for new episodes (minimum 1 minute)
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item" id="rescan-time-config">
|
||||
<label for="scheduled-rescan-time" data-text="rescan-time">Rescan Time (24h format):</label>
|
||||
<input type="time" id="scheduled-rescan-time" value="03:00" class="input-field">
|
||||
@@ -295,6 +320,30 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="log-file" data-text="log-file">Log File Path (optional):</label>
|
||||
<input type="text" id="log-file" placeholder="logs/app.log" class="input-field">
|
||||
<small class="config-hint" data-text="log-file-hint">
|
||||
Leave empty to log to console only
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="log-max-bytes" data-text="log-max-bytes">Max File Size (bytes):</label>
|
||||
<input type="number" id="log-max-bytes" placeholder="10485760" min="0" class="input-field">
|
||||
<small class="config-hint" data-text="log-max-bytes-hint">
|
||||
Maximum size before log rotation (leave empty for no rotation)
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="log-backup-count" data-text="log-backup-count">Backup Count:</label>
|
||||
<input type="number" id="log-backup-count" value="3" min="0" class="input-field">
|
||||
<small class="config-hint" data-text="log-backup-count-hint">
|
||||
Number of rotated log files to keep
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<div class="checkbox-container">
|
||||
<input type="checkbox" id="enable-console-logging">
|
||||
@@ -428,6 +477,45 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Backup Configuration -->
|
||||
<div class="config-section">
|
||||
<h4 data-text="backup-config">Backup Configuration</h4>
|
||||
|
||||
<div class="config-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" id="backup-enabled">
|
||||
<span class="checkbox-custom"></span>
|
||||
<span data-text="backup-enabled">Enable Automatic Backups</span>
|
||||
</label>
|
||||
<small class="config-hint" data-text="backup-enabled-hint">
|
||||
Automatically backup configuration files
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="backup-path" data-text="backup-path">Backup Path:</label>
|
||||
<input type="text" id="backup-path" value="data/backups" class="input-field">
|
||||
<small class="config-hint" data-text="backup-path-hint">
|
||||
Directory where backups will be stored
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="backup-keep-days" data-text="backup-keep-days">Keep Backups (days):</label>
|
||||
<input type="number" id="backup-keep-days" value="30" min="0" class="input-field">
|
||||
<small class="config-hint" data-text="backup-keep-days-hint">
|
||||
How many days to keep old backups
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="config-actions">
|
||||
<button id="save-backup-config" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i>
|
||||
<span data-text="save-backup-config">Save Backup Settings</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Configuration Management -->
|
||||
<div class="config-section">
|
||||
<h4 data-text="config-management">Configuration Management</h4>
|
||||
|
||||
Reference in New Issue
Block a user