mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
58 lines
2.2 KiB
TypeScript
58 lines
2.2 KiB
TypeScript
import { combineUrl } from 'kea-router'
|
|
|
|
import { urls } from 'scenes/urls'
|
|
|
|
import { FileSystemIconColor, ProductManifest, RecordingUniversalFilters, ReplayTabs } from '../../frontend/src/types'
|
|
|
|
export const manifest: ProductManifest = {
|
|
name: 'Replay',
|
|
urls: {
|
|
replay: (
|
|
tab?: ReplayTabs,
|
|
filters?: Partial<RecordingUniversalFilters>,
|
|
sessionRecordingId?: string,
|
|
order?: string
|
|
): string =>
|
|
combineUrl(tab ? `/replay/${tab}` : '/replay/home', {
|
|
...(filters ? { filters } : {}),
|
|
...(sessionRecordingId ? { sessionRecordingId } : {}),
|
|
...(order ? { order } : {}),
|
|
}).url,
|
|
replayPlaylist: (id: string): string => `/replay/playlists/${id}`,
|
|
replaySingle: (id: string): string => `/replay/${id}`,
|
|
replayFilePlayback: (): string => '/replay/file-playback',
|
|
replaySettings: (sectionId?: string): string => `/replay/settings${sectionId ? `?sectionId=${sectionId}` : ''}`,
|
|
},
|
|
fileSystemTypes: {
|
|
session_recording_playlist: {
|
|
name: 'Replay playlist',
|
|
iconType: 'session_replay',
|
|
href: (ref: string) => urls.replayPlaylist(ref),
|
|
iconColor: ['var(--color-product-session-replay-light)', 'var(--color-product-session-replay-dark)'],
|
|
filterKey: 'session_recording_playlist',
|
|
},
|
|
},
|
|
treeItemsNew: [
|
|
{
|
|
path: `Replay playlist`,
|
|
type: 'session_recording_playlist',
|
|
href: urls.replayPlaylist('new'),
|
|
iconType: 'session_replay',
|
|
iconColor: [
|
|
'var(--color-product-session-replay-light)',
|
|
'var(--color-product-session-replay-dark)',
|
|
] as FileSystemIconColor,
|
|
},
|
|
],
|
|
treeItemsProducts: [
|
|
{
|
|
path: 'Session replay',
|
|
category: 'Behavior',
|
|
href: urls.replay(ReplayTabs.Home),
|
|
type: 'session_recording_playlist',
|
|
iconType: 'session_replay',
|
|
iconColor: ['var(--color-product-session-replay-light)', 'var(--color-product-session-replay-dark)'],
|
|
},
|
|
],
|
|
}
|