massive rename and separation merged config into its own "store"
This commit is contained in:
parent
1be0debc63
commit
4e235562aa
65 changed files with 272 additions and 221 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export const piniaPushNotificationsPlugin = ({ store }) => {
|
||||
if (
|
||||
|
|
@ -20,7 +20,7 @@ export const piniaPushNotificationsPlugin = ({ store }) => {
|
|||
|
||||
// Initial state
|
||||
let vapidPublicKey = useInstanceStore().vapidPublicKey
|
||||
let enabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
||||
let enabled = useMergedConfigStore().mergedConfig.webPushNotifications
|
||||
let permissionGranted =
|
||||
useInterfaceStore().notificationPermission === 'granted'
|
||||
let permissionPresent =
|
||||
|
|
@ -70,7 +70,7 @@ export const vuexPushNotificationsPlugin = (store) => {
|
|||
store.subscribe((mutation, state) => {
|
||||
// Initial state
|
||||
const vapidPublicKey = useInstanceStore().vapidPublicKey
|
||||
const enabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
||||
const enabled = useMergedConfigStore().mergedConfig.webPushNotifications
|
||||
const permissionGranted =
|
||||
useInterfaceStore().notificationPermission === 'granted'
|
||||
const permissionPresent =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { applyStyleConfig } from 'src/services/style_setter/style_setter.js'
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ export const piniaStylePlugin = ({ store, options }) => {
|
|||
if (ACTIONS.has(name)) {
|
||||
const { path } = args[0]
|
||||
if (MIXED_KEYS.has(path)) {
|
||||
after(() => applyStyleConfig(useSyncConfigStore().mergedConfig))
|
||||
after(() => applyStyleConfig(useMergedConfigStore().mergedConfig))
|
||||
}
|
||||
if (HACKS_KEYS.has(path)) {
|
||||
after(() => useInterfaceStore().applyTheme({ recompile: true }))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue