mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 13:46:16 -08:00
refactor: update nx monorepo structure
This commit is contained in:
1 parent
0ad1eeb785
commit
aa739f43e0
63 files changed
+1113
-427
No files matched your search
@@ -0,0 +1,2 @@
|
||||
export * from './lib/settings-context.service';
|
||||
export * from './lib/workspace-shell-actions';
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Injectable, signal } from '@angular/core';
|
||||
|
||||
export interface SettingsNavItem {
|
||||
id: string;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SettingsContextService {
|
||||
readonly sections = signal<SettingsNavItem[]>([]);
|
||||
readonly activeSection = signal<string>('general');
|
||||
readonly pendingScrollTarget = signal<string | null>(null);
|
||||
|
||||
setSections(items: SettingsNavItem[]): void {
|
||||
this.sections.set(items);
|
||||
}
|
||||
|
||||
setActiveSection(id: string): void {
|
||||
this.activeSection.set(id);
|
||||
}
|
||||
|
||||
navigateToSection(id: string): void {
|
||||
this.activeSection.set(id);
|
||||
this.pendingScrollTarget.set(id);
|
||||
}
|
||||
|
||||
clearPendingScrollTarget(): void {
|
||||
this.pendingScrollTarget.set(null);
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
this.sections.set([]);
|
||||
this.activeSection.set('general');
|
||||
this.pendingScrollTarget.set(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
export type WorkspacePlaylistType = 'xtream' | 'url' | 'text' | 'file' | 'stalker';
|
||||
|
||||
export interface WorkspaceAccountInfoData {
|
||||
vodStreamsCount: number;
|
||||
liveStreamsCount: number;
|
||||
seriesCount: number;
|
||||
}
|
||||
|
||||
export interface WorkspaceShellActions {
|
||||
openAddPlaylistDialog(type: WorkspacePlaylistType): void;
|
||||
openGlobalSearch(initialQuery?: string): void;
|
||||
openGlobalRecent(): void;
|
||||
openAccountInfo(data: WorkspaceAccountInfoData): void;
|
||||
}
|
||||
|
||||
export const WORKSPACE_SHELL_ACTIONS =
|
||||
new InjectionToken<WorkspaceShellActions>('WORKSPACE_SHELL_ACTIONS');
|
||||
Reference in new issue
Block a user