mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 04:26:16 -08:00
feat(settings): search settings from the header and the command palette (#1714)
* feat(settings): search settings from the header and the command palette The header search on the Settings page was shown but disabled. It now searches a shared index of all 56 settings rows by translated title, description and English synonyms, replaces the section page with ranked results, and opens a result by scrolling to, focusing and briefly highlighting its row. Enter opens the best match, and the section navigation shows per-section match counts. The command palette gains a "Settings" group that lists the best six matches for a non-empty query, so any setting is one Ctrl/Cmd+K away. Rows hidden by the current form state fall back to the control that reveals them; rows the runtime cannot render are never returned. The index ships through a new @iptvnator/workspace/shell/util/settings-search sub-entrypoint so it stays out of the eager bundle, and a registry spec keeps it in step with the section templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(settings): let search reveals win over pending input and gate embedded MPV rows - A reveal (result click, command palette, Enter) now cancels a search keystroke still waiting for its debounce, so its q navigation can no longer supersede the reveal and leave the results open. - Embedded MPV extra options and auto-reconnect require a lazily probed embedded MPV capability; frame copy also needs frameCopyAvailable, so search never offers a row the settings page cannot render. - Keyboard users keep a focus-visible ring on the revealed row after the highlight fades. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(workspace): wait for palette probes without Promise.allSettled The web tsconfig lib predates Promise.allSettled; use Promise.all over rejection-safe probes instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: 4gray <fourgray@proton.me> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
77 files changed
+3304
-316
No files matched your search
@@ -16,113 +16,137 @@
|
||||
<!-- Only the routed section renders. The parent keeps the shared
|
||||
form alive across section switches, so edits staged on one
|
||||
page survive a visit to another. -->
|
||||
@switch (activeSection()) {
|
||||
@case ('playback') {
|
||||
<app-settings-playback-section
|
||||
[form]="settingsForm"
|
||||
[players]="players()"
|
||||
[streamFormatEnum]="streamFormatEnum"
|
||||
[isDesktop]="isDesktop"
|
||||
[supportsManagedExternalPlayers]="
|
||||
supportsManagedExternalPlayers
|
||||
"
|
||||
[supportsExternalPlayerPathSettings]="
|
||||
supportsExternalPlayerPathSettings
|
||||
"
|
||||
[supportsVodMultiSource]="supportsVodMultiSource"
|
||||
[frameCopyAvailable]="embeddedMpv.frameCopyAvailable()"
|
||||
[frameCopyActive]="embeddedMpv.frameCopyActive()"
|
||||
(selectRecordingFolder)="selectRecordingFolder()"
|
||||
/>
|
||||
}
|
||||
@case ('epg') {
|
||||
<app-settings-epg-section
|
||||
[form]="settingsForm"
|
||||
[epgUrl]="form.epgUrl"
|
||||
[isClearingEpgData]="epg.isClearing()"
|
||||
[canBrowseFiles]="epg.supportsFilePicker"
|
||||
[epgViewModeOptions]="epgViewModeOptions"
|
||||
(refreshEpg)="epg.refresh($event)"
|
||||
(browseEpgSource)="epg.browse($event)"
|
||||
(removeEpgSource)="form.removeEpgSource($event)"
|
||||
(addEpgSource)="form.addEpgSource()"
|
||||
(refreshAllEpg)="epg.refreshAll()"
|
||||
(clearEpgData)="epg.clear()"
|
||||
(selectEpgViewMode)="form.selectEpgViewMode($event)"
|
||||
/>
|
||||
}
|
||||
@case ('dashboard') {
|
||||
<app-settings-dashboard-section [form]="settingsForm" />
|
||||
}
|
||||
@case ('remote-control') {
|
||||
<app-settings-remote-control-section
|
||||
[form]="settingsForm"
|
||||
[localIpAddresses]="remoteControl.localIpAddresses()"
|
||||
[visibleQrCodeIp]="remoteControl.visibleQrCodeIp()"
|
||||
(toggleQrCode)="remoteControl.toggleQrCode($event)"
|
||||
/>
|
||||
}
|
||||
@case ('tmdb') {
|
||||
<app-settings-tmdb-section [form]="settingsForm" />
|
||||
}
|
||||
@case ('backup') {
|
||||
<app-settings-backup-section
|
||||
[isPwa]="isPwa"
|
||||
[isRemovingAllPlaylists]="
|
||||
playlistReset.isRemovingAllPlaylists()
|
||||
"
|
||||
[isExportingData]="backup.isExportingData()"
|
||||
(importData)="importData()"
|
||||
(exportData)="exportData()"
|
||||
/>
|
||||
}
|
||||
@case ('reset') {
|
||||
<app-settings-reset-section
|
||||
[isRemovingAllPlaylists]="
|
||||
playlistReset.isRemovingAllPlaylists()
|
||||
"
|
||||
[canRemoveAllPlaylists]="playlistReset.canRemoveAll()"
|
||||
[playlistDeleteSummary]="playlistReset.deleteSummary()"
|
||||
[removeAllProgressLabel]="
|
||||
playlistReset.removeAllProgressLabel()
|
||||
"
|
||||
(removeAll)="removeAll()"
|
||||
/>
|
||||
}
|
||||
@case ('about') {
|
||||
<app-settings-about-section
|
||||
[isDesktop]="isDesktop"
|
||||
[form]="settingsForm"
|
||||
[updateChannelOptions]="updateChannelOptions"
|
||||
[version]="appUpdate.version()"
|
||||
[buildCommit]="buildCommit"
|
||||
[updateMessage]="appUpdate.updateMessage()"
|
||||
[appUpdateStatus]="appUpdate.status()"
|
||||
(checkForAppUpdate)="appUpdate.checkForAppUpdate()"
|
||||
(saveAndCheckForAppUpdate)="onSubmit()"
|
||||
(downloadAppUpdate)="appUpdate.downloadAppUpdate()"
|
||||
(installAppUpdate)="appUpdate.installAppUpdate()"
|
||||
(openManualAppUpdate)="appUpdate.openManualAppUpdate()"
|
||||
(openAppUpdateReleaseNotes)="
|
||||
appUpdate.openReleaseNotes()
|
||||
"
|
||||
/>
|
||||
}
|
||||
@default {
|
||||
<app-settings-general-section
|
||||
[form]="settingsForm"
|
||||
[languageEnum]="languageEnum"
|
||||
[themeOptions]="themeOptions"
|
||||
[coverSizeOptions]="coverSizeOptions"
|
||||
[startupBehaviorOptions]="startupBehaviorOptions"
|
||||
[startupWindowModeOptions]="startupWindowModeOptions"
|
||||
[supportsPortalConnectivityGuard]="
|
||||
supportsPortalConnectivityGuard
|
||||
"
|
||||
[supportsStartupWindowMode]="supportsStartupWindowMode"
|
||||
(selectTheme)="form.selectTheme($event)"
|
||||
(selectCoverSize)="form.selectCoverSize($event)"
|
||||
/>
|
||||
<!-- An active header search term (`q`) replaces the section page
|
||||
with ranked results across every section. -->
|
||||
@if (search.isSearching()) {
|
||||
<app-settings-search-results
|
||||
[query]="search.query()"
|
||||
[results]="search.results()"
|
||||
(selected)="search.select($event)"
|
||||
/>
|
||||
} @else {
|
||||
@switch (activeSection()) {
|
||||
@case ('playback') {
|
||||
<app-settings-playback-section
|
||||
[form]="settingsForm"
|
||||
[players]="players()"
|
||||
[streamFormatEnum]="streamFormatEnum"
|
||||
[isDesktop]="isDesktop"
|
||||
[supportsManagedExternalPlayers]="
|
||||
supportsManagedExternalPlayers
|
||||
"
|
||||
[supportsExternalPlayerPathSettings]="
|
||||
supportsExternalPlayerPathSettings
|
||||
"
|
||||
[supportsVodMultiSource]="supportsVodMultiSource"
|
||||
[frameCopyAvailable]="
|
||||
embeddedMpv.frameCopyAvailable()
|
||||
"
|
||||
[frameCopyActive]="embeddedMpv.frameCopyActive()"
|
||||
(selectRecordingFolder)="selectRecordingFolder()"
|
||||
/>
|
||||
}
|
||||
@case ('epg') {
|
||||
<app-settings-epg-section
|
||||
[form]="settingsForm"
|
||||
[epgUrl]="form.epgUrl"
|
||||
[isClearingEpgData]="epg.isClearing()"
|
||||
[canBrowseFiles]="epg.supportsFilePicker"
|
||||
[epgViewModeOptions]="epgViewModeOptions"
|
||||
(refreshEpg)="epg.refresh($event)"
|
||||
(browseEpgSource)="epg.browse($event)"
|
||||
(removeEpgSource)="form.removeEpgSource($event)"
|
||||
(addEpgSource)="form.addEpgSource()"
|
||||
(refreshAllEpg)="epg.refreshAll()"
|
||||
(clearEpgData)="epg.clear()"
|
||||
(selectEpgViewMode)="form.selectEpgViewMode($event)"
|
||||
/>
|
||||
}
|
||||
@case ('dashboard') {
|
||||
<app-settings-dashboard-section [form]="settingsForm" />
|
||||
}
|
||||
@case ('remote-control') {
|
||||
<app-settings-remote-control-section
|
||||
[form]="settingsForm"
|
||||
[localIpAddresses]="
|
||||
remoteControl.localIpAddresses()
|
||||
"
|
||||
[visibleQrCodeIp]="remoteControl.visibleQrCodeIp()"
|
||||
(toggleQrCode)="remoteControl.toggleQrCode($event)"
|
||||
/>
|
||||
}
|
||||
@case ('tmdb') {
|
||||
<app-settings-tmdb-section [form]="settingsForm" />
|
||||
}
|
||||
@case ('backup') {
|
||||
<app-settings-backup-section
|
||||
[isPwa]="isPwa"
|
||||
[isRemovingAllPlaylists]="
|
||||
playlistReset.isRemovingAllPlaylists()
|
||||
"
|
||||
[isExportingData]="backup.isExportingData()"
|
||||
(importData)="importData()"
|
||||
(exportData)="exportData()"
|
||||
/>
|
||||
}
|
||||
@case ('reset') {
|
||||
<app-settings-reset-section
|
||||
[isRemovingAllPlaylists]="
|
||||
playlistReset.isRemovingAllPlaylists()
|
||||
"
|
||||
[canRemoveAllPlaylists]="
|
||||
playlistReset.canRemoveAll()
|
||||
"
|
||||
[playlistDeleteSummary]="
|
||||
playlistReset.deleteSummary()
|
||||
"
|
||||
[removeAllProgressLabel]="
|
||||
playlistReset.removeAllProgressLabel()
|
||||
"
|
||||
(removeAll)="removeAll()"
|
||||
/>
|
||||
}
|
||||
@case ('about') {
|
||||
<app-settings-about-section
|
||||
[isDesktop]="isDesktop"
|
||||
[form]="settingsForm"
|
||||
[updateChannelOptions]="updateChannelOptions"
|
||||
[version]="appUpdate.version()"
|
||||
[buildCommit]="buildCommit"
|
||||
[updateMessage]="appUpdate.updateMessage()"
|
||||
[appUpdateStatus]="appUpdate.status()"
|
||||
(checkForAppUpdate)="appUpdate.checkForAppUpdate()"
|
||||
(saveAndCheckForAppUpdate)="onSubmit()"
|
||||
(downloadAppUpdate)="appUpdate.downloadAppUpdate()"
|
||||
(installAppUpdate)="appUpdate.installAppUpdate()"
|
||||
(openManualAppUpdate)="
|
||||
appUpdate.openManualAppUpdate()
|
||||
"
|
||||
(openAppUpdateReleaseNotes)="
|
||||
appUpdate.openReleaseNotes()
|
||||
"
|
||||
/>
|
||||
}
|
||||
@default {
|
||||
<app-settings-general-section
|
||||
[form]="settingsForm"
|
||||
[languageEnum]="languageEnum"
|
||||
[themeOptions]="themeOptions"
|
||||
[coverSizeOptions]="coverSizeOptions"
|
||||
[startupBehaviorOptions]="startupBehaviorOptions"
|
||||
[startupWindowModeOptions]="
|
||||
startupWindowModeOptions
|
||||
"
|
||||
[supportsPortalConnectivityGuard]="
|
||||
supportsPortalConnectivityGuard
|
||||
"
|
||||
[supportsStartupWindowMode]="
|
||||
supportsStartupWindowMode
|
||||
"
|
||||
(selectTheme)="form.selectTheme($event)"
|
||||
(selectCoverSize)="form.selectCoverSize($event)"
|
||||
/>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user