fix(blacklist): use callback prop for navigation to blacklist manager
- Replace direct navigateTo import with onBlacklistManagerClick callback - Pass navigation callback from +page.svelte to SettingsView - Follows same pattern as other view navigation (playlist-manager, etc)
This commit is contained in:
1 parent
f95348bb1e
commit
958f0d7dca
2 files changed
+4
-2
No files matched your search
@@ -75,7 +75,6 @@
|
||||
type UpdatePreferences
|
||||
} from '$lib/stores/updatesStore';
|
||||
import { openReleasePageAndAcknowledge } from '$lib/services/updatesService';
|
||||
import { navigateTo } from '$lib/stores/navigationStore';
|
||||
import {
|
||||
getCount as getBlacklistCount,
|
||||
isEnabled as isBlacklistEnabled,
|
||||
@@ -85,6 +84,7 @@
|
||||
interface Props {
|
||||
onBack?: () => void;
|
||||
onLogout?: () => void;
|
||||
onBlacklistManagerClick?: () => void;
|
||||
userName?: string;
|
||||
userEmail?: string;
|
||||
subscription?: string;
|
||||
@@ -115,6 +115,7 @@
|
||||
let {
|
||||
onBack,
|
||||
onLogout,
|
||||
onBlacklistManagerClick,
|
||||
userName = 'User',
|
||||
userEmail = '',
|
||||
subscription = 'Qobuz™',
|
||||
@@ -2422,7 +2423,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="link-btn" onclick={() => navigateTo('blacklist-manager')}>
|
||||
<button class="link-btn" onclick={onBlacklistManagerClick}>
|
||||
{$t('settings.contentFiltering.manage')}
|
||||
<ChevronRight size={16} />
|
||||
</button>
|
||||
|
||||
@@ -2954,6 +2954,7 @@
|
||||
<SettingsView
|
||||
onBack={navGoBack}
|
||||
onLogout={handleLogout}
|
||||
onBlacklistManagerClick={() => navigateTo('blacklist-manager')}
|
||||
userName={userInfo?.userName}
|
||||
subscription={userInfo?.subscription}
|
||||
subscriptionValidUntil={userInfo?.subscriptionValidUntil}
|
||||
|
||||
Reference in new issue
Block a user