first pass of migration - states and obvious replacements
This commit is contained in:
parent
02f952047d
commit
24ce2dc0a5
66 changed files with 398 additions and 568 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import EmojiPicker from 'src/components/emoji_picker/emoji_picker.vue'
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -91,7 +92,7 @@ export default {
|
|||
return this.status.thread_muted
|
||||
},
|
||||
hideCustomEmoji() {
|
||||
return !this.$store.state.instance.pleromaCustomEmojiReactionsAvailable
|
||||
return !useInstanceStore().pleromaCustomEmojiReactionsAvailable
|
||||
},
|
||||
buttonInnerClass() {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
import { useStatusHistoryStore } from 'src/stores/statusHistory.js'
|
||||
|
||||
|
|
@ -159,7 +160,7 @@ export const BUTTONS = [
|
|||
icon: 'history',
|
||||
label: 'status.status_history',
|
||||
if({ status, state }) {
|
||||
return state.instance.editingAvailable && status.edited_at !== null
|
||||
return useInstanceStore().editingAvailable && status.edited_at !== null
|
||||
},
|
||||
action({ status }) {
|
||||
const originalStatus = { ...status }
|
||||
|
|
@ -189,7 +190,7 @@ export const BUTTONS = [
|
|||
if({ status, loggedIn, currentUser, state }) {
|
||||
return (
|
||||
loggedIn &&
|
||||
state.instance.editingAvailable &&
|
||||
useInstanceStore().editingAvailable &&
|
||||
status.user.id === currentUser.id
|
||||
)
|
||||
},
|
||||
|
|
@ -243,7 +244,7 @@ export const BUTTONS = [
|
|||
action({ state, status, router }) {
|
||||
navigator.clipboard.writeText(
|
||||
[
|
||||
state.instance.server,
|
||||
useInstanceStore().server,
|
||||
router.resolve({ name: 'conversation', params: { id: status.id } })
|
||||
.href,
|
||||
].join(''),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue