Merge branch 'fixes-roundup4' into shigusegubu-themes3
This commit is contained in:
commit
5a918d94df
6 changed files with 12 additions and 10 deletions
|
@ -3,7 +3,7 @@ import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
faPen
|
faPen
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
import { usePostStatusStore } from 'src/stores/postStatus'
|
import { usePostStatusStore } from 'src/stores/post_status'
|
||||||
|
|
||||||
library.add(
|
library.add(
|
||||||
faPen
|
faPen
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
||||||
import Modal from '../modal/modal.vue'
|
import Modal from '../modal/modal.vue'
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
import { usePostStatusStore } from 'src/stores/postStatus'
|
import { usePostStatusStore } from 'src/stores/post_status'
|
||||||
|
|
||||||
const PostStatusModal = {
|
const PostStatusModal = {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
||||||
const PRIVATE_SCOPES = new Set(['private', 'direct'])
|
const PRIVATE_SCOPES = new Set(['private', 'direct'])
|
||||||
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
|
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
|
||||||
export const BUTTONS = [{
|
export const BUTTONS = [{
|
||||||
|
@ -151,7 +152,7 @@ export const BUTTONS = [{
|
||||||
},
|
},
|
||||||
action ({ dispatch, status }) {
|
action ({ dispatch, status }) {
|
||||||
return dispatch('fetchStatusSource', { id: status.id })
|
return dispatch('fetchStatusSource', { id: status.id })
|
||||||
.then(data => dispatch('openEditStatusModal', {
|
.then(data => useEditStatusStore().openEditStatusModal({
|
||||||
statusId: status.id,
|
statusId: status.id,
|
||||||
subject: data.spoiler_text,
|
subject: data.spoiler_text,
|
||||||
statusText: data.text,
|
statusText: data.text,
|
||||||
|
|
|
@ -11,7 +11,7 @@ import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||||
import MuteConfirm from '../confirm_modal/mute_confirm.vue'
|
import MuteConfirm from '../confirm_modal/mute_confirm.vue'
|
||||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { usePostStatusStore } from 'src/stores/postStatus'
|
import { usePostStatusStore } from 'src/stores/post_status'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
faBell,
|
faBell,
|
||||||
|
|
|
@ -4,8 +4,6 @@ import { defaultState } from 'src/modules/default_config_state.js'
|
||||||
import { chunk } from 'lodash'
|
import { chunk } from 'lodash'
|
||||||
import localforage from 'localforage'
|
import localforage from 'localforage'
|
||||||
|
|
||||||
console.log('CONFIG', defaultState)
|
|
||||||
|
|
||||||
// On platforms where this is not supported, it will return undefined
|
// On platforms where this is not supported, it will return undefined
|
||||||
// Otherwise it will return an array
|
// Otherwise it will return an array
|
||||||
const supportsAdoptedStyleSheets = !!document.adoptedStyleSheets
|
const supportsAdoptedStyleSheets = !!document.adoptedStyleSheets
|
||||||
|
@ -139,7 +137,6 @@ export const applyTheme = (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cache
|
|
||||||
const { lazyProcessFunc } = generateTheme(
|
const { lazyProcessFunc } = generateTheme(
|
||||||
input,
|
input,
|
||||||
{
|
{
|
||||||
|
@ -152,13 +149,15 @@ export const applyTheme = (
|
||||||
},
|
},
|
||||||
onEagerFinished () {
|
onEagerFinished () {
|
||||||
adoptStyleSheets([eagerStyles])
|
adoptStyleSheets([eagerStyles])
|
||||||
cache = { engineChecksum: getEngineChecksum(), data: [eagerStyles.rules, lazyStyles.rules] }
|
|
||||||
localforage.setItem('pleromafe-theme-cache', cache)
|
|
||||||
onEagerFinish()
|
onEagerFinish()
|
||||||
|
console.info('Eager part of theme finished, waiting for lazy part to finish to store cache')
|
||||||
},
|
},
|
||||||
onLazyFinished () {
|
onLazyFinished () {
|
||||||
adoptStyleSheets([eagerStyles, lazyStyles])
|
adoptStyleSheets([eagerStyles, lazyStyles])
|
||||||
|
const cache = { engineChecksum: getEngineChecksum(), data: [eagerStyles.rules, lazyStyles.rules] }
|
||||||
onFinish(cache)
|
onFinish(cache)
|
||||||
|
localforage.setItem('pleromafe-theme-cache', cache)
|
||||||
|
console.info('Theme cache stored')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
debug
|
debug
|
||||||
|
@ -207,7 +206,6 @@ const extractStyleConfig = ({
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(defaultState)
|
|
||||||
const defaultStyleConfig = extractStyleConfig(defaultState)
|
const defaultStyleConfig = extractStyleConfig(defaultState)
|
||||||
|
|
||||||
export const applyConfig = (input) => {
|
export const applyConfig = (input) => {
|
||||||
|
|
|
@ -12,6 +12,9 @@ export const usePostStatusStore = defineStore('postStatus', {
|
||||||
},
|
},
|
||||||
closePostStatusModal () {
|
closePostStatusModal () {
|
||||||
this.modalActivated = false
|
this.modalActivated = false
|
||||||
|
},
|
||||||
|
resetPostStatusModal () {
|
||||||
|
this.params = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
Loading…
Add table
Reference in a new issue