Migrate interface module to store
This commit is contained in:
parent
872569ae8e
commit
b1dcea0199
33 changed files with 244 additions and 77 deletions
|
|
@ -11,6 +11,7 @@ import {
|
|||
import FaviconService from '../../services/favicon_service/favicon_service.js'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch, faArrowUp, faMinus } from '@fortawesome/free-solid-svg-icons'
|
||||
import { useInterfaceStore } from '../../stores/interface'
|
||||
|
||||
library.add(
|
||||
faCircleNotch,
|
||||
|
|
@ -75,11 +76,11 @@ const Notifications = {
|
|||
return this.$store.state.statuses.notifications.loading
|
||||
},
|
||||
noHeading () {
|
||||
const { layoutType } = this.$store.state.interface
|
||||
const { layoutType } = useInterfaceStore()
|
||||
return this.minimalMode || layoutType === 'mobile'
|
||||
},
|
||||
teleportTarget () {
|
||||
const { layoutType } = this.$store.state.interface
|
||||
const { layoutType } = useInterfaceStore()
|
||||
const map = {
|
||||
wide: '#notifs-column',
|
||||
mobile: '#mobile-notifications'
|
||||
|
|
@ -87,7 +88,7 @@ const Notifications = {
|
|||
return map[layoutType] || '#notifs-sidebar'
|
||||
},
|
||||
popoversZLayer () {
|
||||
const { layoutType } = this.$store.state.interface
|
||||
const { layoutType } = useInterfaceStore()
|
||||
return layoutType === 'mobile' ? 'navbar' : null
|
||||
},
|
||||
notificationsToDisplay () {
|
||||
|
|
@ -114,10 +115,10 @@ const Notifications = {
|
|||
unseenCountTitle (count) {
|
||||
if (count > 0) {
|
||||
FaviconService.drawFaviconBadge()
|
||||
this.$store.dispatch('setPageTitle', `(${count})`)
|
||||
useInterfaceStore().setPageTitle(`(${count})`)
|
||||
} else {
|
||||
FaviconService.clearFaviconBadge()
|
||||
this.$store.dispatch('setPageTitle', '')
|
||||
useInterfaceStore().setPageTitle('')
|
||||
}
|
||||
},
|
||||
teleportTarget () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue