Files
hoppscotch/packages/hoppscotch-common/src/modules/head.ts
2022-12-02 03:05:35 -05:00

22 lines
490 B
TypeScript

import { createHead, useHead } from "@vueuse/head"
import { APP_INFO } from "~/../meta"
import { HoppModule } from "."
export default <HoppModule>{
onVueAppInit(app) {
const head = createHead({
title: `${APP_INFO.name}${APP_INFO.shortDescription}`,
titleTemplate(title) {
return title === "Hoppscotch" ? title : `${title} • Hoppscotch`
},
})
app.use(head)
},
onRootSetup() {
// Load the defaults into the app
useHead({})
},
}