docs/.vitepress/theme/composables/useEffects.ts

78ea9fc554970c86ce26acb3978ead8147153dad
wotaku/docs/.vitepress/theme/composables/useEffects.ts
Duck updated822be9529 4 months ago

11 lines · 314 bytes

 1import { useStorage } from '@vueuse/core'
 2import { computed } from 'vue'
 3
 4import { EffectsStorageKey } from '../constants'
 5
 6export function useEffects() {
 7  const effects = useStorage(EffectsStorageKey, 'off')
 8  const effectsEnabled = computed(() => effects.value === 'on')
 9
10  return { effects, effectsEnabled }
11}
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