docs/.vitepress/theme/composables/op.ts

8a394e25eafa30996343d8254c57f0cec5c15a55
wotaku/docs/.vitepress/theme/composables/op.ts
taskylizard hello world, again319b2575cd 1 year ago

21 lines · 498 bytes

 1import type { App, InjectionKey } from 'vue'
 2import { Internal } from '../internal/browser'
 3
 4export const opSymbol: InjectionKey<Internal> = Symbol('op')
 5
 6export function createOpProvider(app: App) {
 7  // Disable in dev
 8  if (import.meta.env.DEV) return
 9
10  const op = new Internal({
11    clientId: 'e0e39d6b-2692-45a0-9422-4d668f113f70',
12    trackScreenViews: true,
13    trackOutgoingLinks: true,
14    trackAttributes: true,
15    trackHashChanges: true
16  })
17
18  op.init()
19
20  app.provide(opSymbol, op)
21}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form