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

13e49c8f073b9581e3f55d76076033066175bfe7
wotaku/docs/.vitepress/theme/composables/op.ts
taskylizard wotaku 2bea9706e6c 1 year ago

28 lines · 788 bytes

 1/**
 2 *  All Rights Reserved
 3 *
 4 *  Copyright (c) 2025 taskylizard
 5 *
 6 *  All rights reserved. This code and its associated files may not be copied, modified, distributed, sublicensed, or used in any form, in whole or in part, without prior written permission from the copyright holder.
 7 */
 8import type { App, InjectionKey } from 'vue'
 9import { Internal } from '../internal/browser'
10
11export const opSymbol: InjectionKey<Internal> = Symbol('op')
12
13export function createOpProvider(app: App) {
14  // Disable in dev
15  if (import.meta.env.DEV) return
16
17  const op = new Internal({
18    clientId: 'e0e39d6b-2692-45a0-9422-4d668f113f70',
19    trackScreenViews: true,
20    trackOutgoingLinks: true,
21    trackAttributes: true,
22    trackHashChanges: true
23  })
24
25  op.init()
26
27  app.provide(opSymbol, op)
28}
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