-
Notifications
You must be signed in to change notification settings - Fork 0
Add user setting for fetch-details tab auto-close delay #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1282,6 +1282,27 @@ | |||||||||
| </div> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| <!-- Fetch Details Settings --> | ||||||||||
| <div class="card mb-4"> | ||||||||||
| <div class="card-header"> | ||||||||||
| <h5 class="mb-0"><i class="bi bi-globe"></i> Fetch Details Settings</h5> | ||||||||||
| </div> | ||||||||||
| <div class="card-body"> | ||||||||||
| <div class="mb-3"> | ||||||||||
| <label class="form-label">Auto-Close Tab Delay</label> | ||||||||||
| <div class="input-group" style="max-width: 250px;"> | ||||||||||
| <input type="number" class="form-control" @bind="editFetchDetailsAutoCloseSeconds" min="5" max="300" step="5" /> | ||||||||||
| <span class="input-group-text">seconds</span> | ||||||||||
| </div> | ||||||||||
| <small class="text-muted">How long to keep browser tabs open when fetching job details before auto-closing. Default: 30 seconds. Range: 5-300 seconds.</small> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| <button class="btn btn-primary" @onclick="SaveFetchDetailsSettings"> | ||||||||||
| <i class="bi bi-check-lg"></i> Save Fetch Details Settings | ||||||||||
| </button> | ||||||||||
| </div> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| <!-- Download Backup --> | ||||||||||
| <div class="card mb-4"> | ||||||||||
| <div class="card-header"> | ||||||||||
|
|
@@ -1478,6 +1499,7 @@ | |||||||||
| // Backup directory | ||||||||||
| private string editBackupDirectory = ""; | ||||||||||
| private int editHistoryMax = 50000; | ||||||||||
| private int editFetchDetailsAutoCloseSeconds = 30; | ||||||||||
| private bool editBackupOnStartup; | ||||||||||
| private int editBackupsToKeep = 10; | ||||||||||
|
|
||||||||||
|
|
@@ -1561,6 +1583,7 @@ | |||||||||
| editBackupOnStartup = settings.BackupOnStartup; | ||||||||||
| editBackupsToKeep = settings.BackupsToKeep > 0 ? settings.BackupsToKeep : 10; | ||||||||||
| editHistoryMax = settings.HistoryMaxEntries > 0 ? settings.HistoryMaxEntries : 50000; | ||||||||||
| editFetchDetailsAutoCloseSeconds = settings.FetchDetailsAutoCloseSeconds > 0 ? settings.FetchDetailsAutoCloseSeconds : 30; | ||||||||||
|
||||||||||
| editFetchDetailsAutoCloseSeconds = settings.FetchDetailsAutoCloseSeconds > 0 ? settings.FetchDetailsAutoCloseSeconds : 30; | |
| editFetchDetailsAutoCloseSeconds = settings.FetchDetailsAutoCloseSeconds > 0 | |
| ? Math.Clamp(settings.FetchDetailsAutoCloseSeconds, 5, 300) | |
| : 30; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,7 @@ public class AppSettings | |
| public bool BackupOnStartup { get; set; } | ||
| public int BackupsToKeep { get; set; } = 10; | ||
| public int HistoryMaxEntries { get; set; } = 50000; | ||
| public int FetchDetailsAutoCloseSeconds { get; set; } = 30; | ||
| public List<CrawlPage> CrawlPages { get; set; } = new(); | ||
|
Comment on lines
45
to
49
|
||
| public List<JobSearchQuery> SearchQueries { get; set; } = new(); | ||
| public SkillExtractionSettings SkillExtraction { get; set; } = new(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenTabAndAutoClose()usesSettingsService.GetSettings().FetchDetailsAutoCloseSecondsdirectly without enforcing the documented 5–300 second range (or even a> 0fallback). If the setting is 0/negative/huge (e.g., from manual JSON edits or older data), tabs may close immediately or stay open indefinitely. Consider clamping to the supported bounds (or defaulting to 30) before callingopenAndScheduleClose.