pinafore/src/routes/_components/Title.html
Nolan Lawson 16e66346d7
fix!: remove esm package, use native Node ES modules (#2064)
BREAKING CHANGE: Node v12.20+, v14.14+, or v16.0+ is required

* fix!: remove esm package, use native Node ES modules

* fix: fix some CJS imports
2021-07-04 20:19:04 -07:00

28 lines
799 B
HTML

<svelte:head>
<title>{title}</title>
</svelte:head>
<script>
import { store } from '../_store/store.js'
import { formatIntl } from '../_utils/formatIntl.js'
export default {
data: () => ({
settingsPage: false
}),
store: () => store,
computed: {
showInstanceName: ({ $isUserLoggedIn, settingsPage, $currentInstance }) => (
!!($isUserLoggedIn && !settingsPage && $currentInstance)
),
title: ({ showInstanceName, $currentInstance, $hasNotifications, $numberOfNotifications, name }) => {
return formatIntl('intl.pageTitle', {
showInstanceName,
instanceName: $currentInstance,
hasNotifications: $hasNotifications,
count: $numberOfNotifications,
name
})
}
}
}
</script>