chore: split app to commons and web (squash commit)
This commit is contained in:
21
packages/hoppscotch-common/src/modules/head.ts
Normal file
21
packages/hoppscotch-common/src/modules/head.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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({})
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user