separation support
This commit is contained in:
parent
5e21134d9b
commit
e554eeeef6
30 changed files with 92 additions and 102 deletions
|
|
@ -201,11 +201,7 @@ export default {
|
||||||
'styleDataUsed',
|
'styleDataUsed',
|
||||||
'layoutType',
|
'layoutType',
|
||||||
]),
|
]),
|
||||||
...mapState(useInstanceStore, [
|
...mapState(useInstanceStore, ['styleDataUsed', 'private']),
|
||||||
'styleDataUsed',
|
|
||||||
'instanceSpecificPanelContent',
|
|
||||||
'private',
|
|
||||||
]),
|
|
||||||
...mapState(useInstanceStore, {
|
...mapState(useInstanceStore, {
|
||||||
background: (store) => store.instanceIdentity.background,
|
background: (store) => store.instanceIdentity.background,
|
||||||
showFeaturesPanel: (store) => store.instanceIdentity.showFeaturesPanel,
|
showFeaturesPanel: (store) => store.instanceIdentity.showFeaturesPanel,
|
||||||
|
|
@ -213,6 +209,8 @@ export default {
|
||||||
store.instanceIdentity.showInstanceSpecificPanel,
|
store.instanceIdentity.showInstanceSpecificPanel,
|
||||||
suggestionsEnabled: (store) => store.featureSet.suggestionsEnabled,
|
suggestionsEnabled: (store) => store.featureSet.suggestionsEnabled,
|
||||||
editingAvailable: (store) => store.featureSet.editingAvailable,
|
editingAvailable: (store) => store.featureSet.editingAvailable,
|
||||||
|
instanceSpecificPanelContent: (store) =>
|
||||||
|
store.instanceIdentity.instanceSpecificPanelContent,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import {
|
||||||
} from 'src/modules/default_config_state.js'
|
} from 'src/modules/default_config_state.js'
|
||||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||||
import { useAuthFlowStore } from 'src/stores/auth_flow'
|
import { useAuthFlowStore } from 'src/stores/auth_flow'
|
||||||
|
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||||
import { useI18nStore } from 'src/stores/i18n'
|
import { useI18nStore } from 'src/stores/i18n'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||||
|
|
@ -169,10 +170,10 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(staticOrApiConfigDefault)
|
Object.keys(staticOrApiConfigDefault)
|
||||||
.map((k) => ({ source: k, destination: `instanceIdentity.${k}`}))
|
.map((k) => ({ source: k, destination: `instanceIdentity.${k}` }))
|
||||||
.forEach(copyInstanceOption)
|
.forEach(copyInstanceOption)
|
||||||
Object.keys(instanceDefaultConfig)
|
Object.keys(instanceDefaultConfig)
|
||||||
.map((k) => ({ source: k, destination: `prefsStorage.${k}`}))
|
.map((k) => ({ source: k, destination: `prefsStorage.${k}` }))
|
||||||
.forEach(copyInstanceOption)
|
.forEach(copyInstanceOption)
|
||||||
|
|
||||||
useAuthFlowStore().setInitialStrategy(config.loginMethod)
|
useAuthFlowStore().setInitialStrategy(config.loginMethod)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'pinia'
|
||||||
|
|
||||||
import UserListMenu from 'src/components/user_list_menu/user_list_menu.vue'
|
import UserListMenu from 'src/components/user_list_menu/user_list_menu.vue'
|
||||||
import UserTimedFilterModal from 'src/components/user_timed_filter_modal/user_timed_filter_modal.vue'
|
import UserTimedFilterModal from 'src/components/user_timed_filter_modal/user_timed_filter_modal.vue'
|
||||||
|
|
@ -93,10 +93,10 @@ const AccountActions = {
|
||||||
shouldConfirmRemoveUserFromFollowers() {
|
shouldConfirmRemoveUserFromFollowers() {
|
||||||
return this.$store.getters.mergedConfig.modalOnRemoveUserFromFollowers
|
return this.$store.getters.mergedConfig.modalOnRemoveUserFromFollowers
|
||||||
},
|
},
|
||||||
...mapState({
|
...mapState(useInstanceStore, {
|
||||||
blockExpirationSupported: (state) => useInstanceStore().blockExpiration,
|
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||||
pleromaChatMessagesAvailable: (state) =>
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
useInstanceStore().pleromaChatMessagesAvailable,
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { take } from 'lodash'
|
||||||
|
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import ScreenReaderNotice from 'src/components/screen_reader_notice/screen_reader_notice.vue'
|
import ScreenReaderNotice from 'src/components/screen_reader_notice/screen_reader_notice.vue'
|
||||||
|
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||||
import { ensureFinalFallback } from '../../i18n/languages.js'
|
import { ensureFinalFallback } from '../../i18n/languages.js'
|
||||||
import Completion from '../../services/completion/completion.js'
|
import Completion from '../../services/completion/completion.js'
|
||||||
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,22 @@
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
||||||
|
|
||||||
const FeaturesPanel = {
|
const FeaturesPanel = {
|
||||||
computed: {
|
computed: {
|
||||||
shout: function () {
|
...mapState(useInstanceStore, {
|
||||||
return useInstanceStore().shoutAvailable
|
shout: (store) => store.shoutAvailable,
|
||||||
},
|
pleromaChatMessages: (store) =>
|
||||||
pleromaChatMessages: function () {
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
return useInstanceStore().pleromaChatMessagesAvailable
|
gopher: (store) => store.featureSet.gopherAvailable,
|
||||||
},
|
whoToFollow: (store) => store.featureSet.suggestionsEnabled,
|
||||||
gopher: function () {
|
mediaProxy: (store) => store.featureSet.mediaProxyAvailable,
|
||||||
return useInstanceStore().gopherAvailable
|
minimalScopesMode: (store) => store.prefsStorage.minimalScopesMode,
|
||||||
},
|
textlimit: (store) => store.limits.textlimit,
|
||||||
whoToFollow: function () {
|
uploadlimit: (store) =>
|
||||||
return useInstanceStore().suggestionsEnabled
|
fileSizeFormatService.fileSizeFormat(store.limits.uploadlimit),
|
||||||
},
|
}),
|
||||||
mediaProxy: function () {
|
|
||||||
return useInstanceStore().mediaProxyAvailable
|
|
||||||
},
|
|
||||||
minimalScopesMode: function () {
|
|
||||||
return useInstanceStore().minimalScopesMode
|
|
||||||
},
|
|
||||||
textlimit: function () {
|
|
||||||
return useInstanceStore().textlimit
|
|
||||||
},
|
|
||||||
uploadlimit: function () {
|
|
||||||
return fileSizeFormatService.fileSizeFormat(
|
|
||||||
useInstanceStore().uploadlimit,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ const ModerationTools = {
|
||||||
},
|
},
|
||||||
canUseTagPolicy() {
|
canUseTagPolicy() {
|
||||||
return (
|
return (
|
||||||
useInstanceStore().tagPolicyAvailable &&
|
useInstanceStore().featureSet.tagPolicyAvailable &&
|
||||||
this.privileged('users_manage_tags')
|
this.privileged('users_manage_tags')
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,14 @@ const NavPanel = {
|
||||||
unreadAnnouncementCount: 'unreadAnnouncementCount',
|
unreadAnnouncementCount: 'unreadAnnouncementCount',
|
||||||
supportsAnnouncements: (store) => store.supportsAnnouncements,
|
supportsAnnouncements: (store) => store.supportsAnnouncements,
|
||||||
}),
|
}),
|
||||||
|
...mapPiniaState(useInstanceStore, ['private', 'federating']),
|
||||||
|
...mapPiniaState(useInstanceStore, {
|
||||||
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
|
bookmarkFolders: (store) =>
|
||||||
|
store.fetaureSet.pleromaBookmarkFoldersAvailable,
|
||||||
|
bubbleTimeline: (store) => store.fetaureSet.localBubble,
|
||||||
|
}),
|
||||||
...mapPiniaState(useServerSideStorageStore, {
|
...mapPiniaState(useServerSideStorageStore, {
|
||||||
collapsed: (store) => store.prefsStorage.simple.collapseNav,
|
collapsed: (store) => store.prefsStorage.simple.collapseNav,
|
||||||
pinnedItems: (store) =>
|
pinnedItems: (store) =>
|
||||||
|
|
@ -119,14 +127,6 @@ const NavPanel = {
|
||||||
...mapState({
|
...mapState({
|
||||||
currentUser: (state) => state.users.currentUser,
|
currentUser: (state) => state.users.currentUser,
|
||||||
followRequestCount: (state) => state.api.followRequests.length,
|
followRequestCount: (state) => state.api.followRequests.length,
|
||||||
privateMode: (state) => useInstanceStore().private,
|
|
||||||
federating: (state) => useInstanceStore().federating,
|
|
||||||
pleromaChatMessagesAvailable: (state) =>
|
|
||||||
useInstanceStore().pleromaChatMessagesAvailable,
|
|
||||||
bookmarkFolders: (state) =>
|
|
||||||
useInstanceStore().pleromaBookmarkFoldersAvailable,
|
|
||||||
bubbleTimeline: (state) =>
|
|
||||||
useInstanceStore().localBubbleInstances.length > 0,
|
|
||||||
}),
|
}),
|
||||||
timelinesItems() {
|
timelinesItems() {
|
||||||
return filterNavigation(
|
return filterNavigation(
|
||||||
|
|
|
||||||
|
|
@ -72,15 +72,16 @@ const NavPanel = {
|
||||||
pinnedItems: (store) =>
|
pinnedItems: (store) =>
|
||||||
new Set(store.prefsStorage.collections.pinnedNavItems),
|
new Set(store.prefsStorage.collections.pinnedNavItems),
|
||||||
}),
|
}),
|
||||||
|
...mapPiniaState(useInstanceStore, {
|
||||||
|
bookmarks: getBookmarkFolderEntries,
|
||||||
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
|
bubbleTimeline: (store) => store.featureSet.localBubble,
|
||||||
|
}),
|
||||||
|
...mapPiniaState(useInstanceStore, ['private', 'federating']),
|
||||||
...mapState({
|
...mapState({
|
||||||
currentUser: (state) => state.users.currentUser,
|
currentUser: (state) => state.users.currentUser,
|
||||||
followRequestCount: (state) => state.api.followRequests.length,
|
followRequestCount: (state) => state.api.followRequests.length,
|
||||||
privateMode: (state) => useInstanceStore().private,
|
|
||||||
federating: (state) => useInstanceStore().federating,
|
|
||||||
pleromaChatMessagesAvailable: (state) =>
|
|
||||||
useInstanceStore().pleromaChatMessagesAvailable,
|
|
||||||
bubbleTimeline: (state) =>
|
|
||||||
useInstanceStore().localBubbleInstances.length > 0,
|
|
||||||
}),
|
}),
|
||||||
pinnedList() {
|
pinnedList() {
|
||||||
if (!this.currentUser) {
|
if (!this.currentUser) {
|
||||||
|
|
@ -94,7 +95,7 @@ const NavPanel = {
|
||||||
hasChats: this.pleromaChatMessagesAvailable,
|
hasChats: this.pleromaChatMessagesAvailable,
|
||||||
hasAnnouncements: this.supportsAnnouncements,
|
hasAnnouncements: this.supportsAnnouncements,
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.private,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
supportsBubbleTimeline: this.bubbleTimeline,
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
supportsBookmarkFolders: this.bookmarks,
|
supportsBookmarkFolders: this.bookmarks,
|
||||||
|
|
@ -118,7 +119,7 @@ const NavPanel = {
|
||||||
supportsBubbleTimeline: this.bubbleTimeline,
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
supportsBookmarkFolders: this.bookmarks,
|
supportsBookmarkFolders: this.bookmarks,
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.private,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
},
|
},
|
||||||
).slice(0, this.limit)
|
).slice(0, this.limit)
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ const passwordReset = {
|
||||||
signedIn: (state) => !!state.users.currentUser,
|
signedIn: (state) => !!state.users.currentUser,
|
||||||
}),
|
}),
|
||||||
...mapPiniaState(useInstanceStore, ['server', 'mailerEnabled']),
|
...mapPiniaState(useInstanceStore, ['server', 'mailerEnabled']),
|
||||||
mailerEnabled() {
|
|
||||||
return this.mailerEnabled
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.signedIn) {
|
if (this.signedIn) {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pollLimits() {
|
pollLimits() {
|
||||||
return useInstanceStore().pollLimits
|
return useInstanceStore().limits.pollLimits
|
||||||
},
|
},
|
||||||
maxOptions() {
|
maxOptions() {
|
||||||
return this.pollLimits.max_options
|
return this.pollLimits.max_options
|
||||||
|
|
|
||||||
|
|
@ -307,15 +307,15 @@ const PostStatusForm = {
|
||||||
return this.mergedConfig.alwaysShowSubjectInput
|
return this.mergedConfig.alwaysShowSubjectInput
|
||||||
},
|
},
|
||||||
postFormats() {
|
postFormats() {
|
||||||
return useInstanceStore().postFormats || []
|
return useInstanceStore().featureSet.postFormats || []
|
||||||
},
|
},
|
||||||
safeDMEnabled() {
|
safeDMEnabled() {
|
||||||
return useInstanceStore().safeDM
|
return useInstanceStore().featureSet.safeDM
|
||||||
},
|
},
|
||||||
pollsAvailable() {
|
pollsAvailable() {
|
||||||
return (
|
return (
|
||||||
useInstanceStore().pollsAvailable &&
|
useInstanceStore().featureSet.pollsAvailable &&
|
||||||
useInstanceStore().pollLimits.max_options >= 2 &&
|
useInstanceStore().limits.pollLimits.max_options >= 2 &&
|
||||||
this.disablePolls !== true
|
this.disablePolls !== true
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
@ -344,7 +344,7 @@ const PostStatusForm = {
|
||||||
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== ''
|
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== ''
|
||||||
},
|
},
|
||||||
quotable() {
|
quotable() {
|
||||||
if (!useInstanceStore().quotingAvailable) {
|
if (!useInstanceStore().featureSet.quotingAvailable) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { mapActions, mapState } from 'pinia'
|
import { mapActions, mapState } from 'pinia'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { mapState as mapVuexState } from 'vuex'
|
|
||||||
|
|
||||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||||
import Select from 'src/components/select/select.vue'
|
import Select from 'src/components/select/select.vue'
|
||||||
|
|
@ -33,8 +32,8 @@ const ClutterTab = {
|
||||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||||
}),
|
}),
|
||||||
...mapVuexState({
|
...mapState(useInstanceStore, {
|
||||||
blockExpirationSupported: (state) => useInstanceStore().blockExpiration,
|
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||||
}),
|
}),
|
||||||
onMuteDefaultActionLv1: {
|
onMuteDefaultActionLv1: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ const ComposingTab = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...SharedComputedObject(),
|
...SharedComputedObject(),
|
||||||
...mapState({
|
...mapState(useInstanceStore, {
|
||||||
blockExpirationSupported: (state) => useInstanceStore().blockExpiration,
|
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { mapActions, mapState } from 'pinia'
|
import { mapActions, mapState } from 'pinia'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { mapState as mapVuexState } from 'vuex'
|
|
||||||
|
|
||||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||||
import Select from 'src/components/select/select.vue'
|
import Select from 'src/components/select/select.vue'
|
||||||
|
|
@ -99,8 +98,8 @@ const FilteringTab = {
|
||||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||||
}),
|
}),
|
||||||
...mapVuexState({
|
...mapState(useInstanceStore, {
|
||||||
blockExpirationSupported: (state) => useInstanceStore().blockExpiration,
|
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||||
}),
|
}),
|
||||||
onMuteDefaultActionLv1: {
|
onMuteDefaultActionLv1: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'pinia'
|
||||||
|
|
||||||
import FontControl from 'src/components/font_control/font_control.vue'
|
import FontControl from 'src/components/font_control/font_control.vue'
|
||||||
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
||||||
|
|
@ -50,8 +50,8 @@ const GeneralTab = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...SharedComputedObject(),
|
...SharedComputedObject(),
|
||||||
...mapState({
|
...mapState(useInstanceStore, {
|
||||||
blockExpirationSupported: (state) => useInstanceStore().blockExpiration,
|
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ const GeneralTab = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
postFormats() {
|
postFormats() {
|
||||||
return useInstanceStore().postFormats || []
|
return useInstanceStore().featureSet.postFormats || []
|
||||||
},
|
},
|
||||||
instanceShoutboxPresent() {
|
instanceShoutboxPresent() {
|
||||||
return useInstanceStore().shoutAvailable
|
return useInstanceStore().featureSet.shoutAvailable
|
||||||
},
|
},
|
||||||
columns() {
|
columns() {
|
||||||
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ const SecurityTab = {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
pleromaExtensionsAvailable() {
|
pleromaExtensionsAvailable() {
|
||||||
return useInstanceStore().pleromaExtensionsAvailable
|
return useInstanceStore().featureSet.pleromaExtensionsAvailable
|
||||||
},
|
},
|
||||||
oauthTokens() {
|
oauthTokens() {
|
||||||
return useOAuthTokensStore().tokens.map((oauthToken) => {
|
return useOAuthTokensStore().tokens.map((oauthToken) => {
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,7 @@ const Status = {
|
||||||
return this.status.edited_at !== null
|
return this.status.edited_at !== null
|
||||||
},
|
},
|
||||||
editingAvailable() {
|
editingAvailable() {
|
||||||
return useInstanceStore().editingAvailable
|
return useInstanceStore().featureSet.editingAvailable
|
||||||
},
|
},
|
||||||
hasVisibleQuote() {
|
hasVisibleQuote() {
|
||||||
return this.status.quote_url && this.status.quote_visible
|
return this.status.quote_url && this.status.quote_visible
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,10 @@ export const BUTTONS = [
|
||||||
icon: 'history',
|
icon: 'history',
|
||||||
label: 'status.status_history',
|
label: 'status.status_history',
|
||||||
if({ status, state }) {
|
if({ status, state }) {
|
||||||
return useInstanceStore().editingAvailable && status.edited_at !== null
|
return (
|
||||||
|
useInstanceStore().featureSet.editingAvailable &&
|
||||||
|
status.edited_at !== null
|
||||||
|
)
|
||||||
},
|
},
|
||||||
action({ status }) {
|
action({ status }) {
|
||||||
const originalStatus = { ...status }
|
const originalStatus = { ...status }
|
||||||
|
|
@ -190,7 +193,7 @@ export const BUTTONS = [
|
||||||
if({ status, loggedIn, currentUser, state }) {
|
if({ status, loggedIn, currentUser, state }) {
|
||||||
return (
|
return (
|
||||||
loggedIn &&
|
loggedIn &&
|
||||||
useInstanceStore().editingAvailable &&
|
useInstanceStore().featureSet.editingAvailable &&
|
||||||
status.user.id === currentUser.id
|
status.user.id === currentUser.id
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
/* eslint-env browser */
|
/* eslint-env browser */
|
||||||
|
|
||||||
|
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import statusPosterService from '../../services/status_poster/status_poster.service.js'
|
import statusPosterService from '../../services/status_poster/status_poster.service.js'
|
||||||
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { mapState as mapPiniaState } from 'pinia'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
import { filterNavigation } from 'src/components/navigation/filter.js'
|
import { filterNavigation } from 'src/components/navigation/filter.js'
|
||||||
|
|
@ -59,14 +60,16 @@ const TimelineMenu = {
|
||||||
(route === 'bookmark-folder' || route === 'bookmarks')
|
(route === 'bookmark-folder' || route === 'bookmarks')
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
...mapPiniaState(useInstanceStore, ['private', 'federating']),
|
||||||
|
...mapPiniaState(useInstanceStore, {
|
||||||
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
|
bookmarkFolders: (store) =>
|
||||||
|
store.featureSet.pleromaBookmarkFoldersAvailable,
|
||||||
|
bubbleTimeline: (store) => store.featureSet.localBubble,
|
||||||
|
}),
|
||||||
...mapState({
|
...mapState({
|
||||||
currentUser: (state) => state.users.currentUser,
|
currentUser: (state) => state.users.currentUser,
|
||||||
privateMode: (state) => useInstanceStore().private,
|
|
||||||
federating: (state) => useInstanceStore().federating,
|
|
||||||
bookmarkFolders: (state) =>
|
|
||||||
useInstanceStore().pleromaBookmarkFoldersAvailable,
|
|
||||||
bubbleTimeline: (state) =>
|
|
||||||
useInstanceStore().localBubbleInstances.length > 0,
|
|
||||||
}),
|
}),
|
||||||
timelinesList() {
|
timelinesList() {
|
||||||
return filterNavigation(
|
return filterNavigation(
|
||||||
|
|
@ -74,7 +77,7 @@ const TimelineMenu = {
|
||||||
{
|
{
|
||||||
hasChats: this.pleromaChatMessagesAvailable,
|
hasChats: this.pleromaChatMessagesAvailable,
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.private,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
supportsBookmarkFolders: this.bookmarkFolders,
|
supportsBookmarkFolders: this.bookmarkFolders,
|
||||||
supportsBubbleTimeline: this.bubbleTimeline,
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ export default {
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
groupActorAvailable() {
|
groupActorAvailable() {
|
||||||
return useInstanceStore().groupActorAvailable
|
return useInstanceStore().featureSet.groupActorAvailable
|
||||||
},
|
},
|
||||||
availableActorTypes() {
|
availableActorTypes() {
|
||||||
return this.groupActorAvailable
|
return this.groupActorAvailable
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ const UserProfile = {
|
||||||
favoritesTabVisible() {
|
favoritesTabVisible() {
|
||||||
return (
|
return (
|
||||||
this.isUs ||
|
this.isUs ||
|
||||||
(useInstanceStore().pleromaPublicFavouritesAvailable &&
|
(useInstanceStore().featureSet.pleromaPublicFavouritesAvailable &&
|
||||||
!this.user.hide_favorites)
|
!this.user.hide_favorites)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const WhoToFollowPanel = {
|
||||||
return this.$store.state.users.currentUser.screen_name
|
return this.$store.state.users.currentUser.screen_name
|
||||||
},
|
},
|
||||||
suggestionsEnabled() {
|
suggestionsEnabled() {
|
||||||
return useInstanceStore().suggestionsEnabled
|
return useInstanceStore().featureSet.suggestionsEnabled
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ const api = {
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
timeline === 'favourites' &&
|
timeline === 'favourites' &&
|
||||||
!useInstanceStore().pleromaPublicFavouritesAvailable
|
!useInstanceStore().featureSet.pleromaPublicFavouritesAvailable
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
if (store.state.fetchers[timeline]) return
|
if (store.state.fetchers[timeline]) return
|
||||||
|
|
@ -323,7 +323,7 @@ const api = {
|
||||||
// Bookmark folders
|
// Bookmark folders
|
||||||
startFetchingBookmarkFolders(store) {
|
startFetchingBookmarkFolders(store) {
|
||||||
if (store.state.fetchers.bookmarkFolders) return
|
if (store.state.fetchers.bookmarkFolders) return
|
||||||
if (!useInstanceStore().pleromaBookmarkFoldersAvailable) return
|
if (!useInstanceStore().featureSet.pleromaBookmarkFoldersAvailable) return
|
||||||
const fetcher =
|
const fetcher =
|
||||||
store.state.backendInteractor.startFetchingBookmarkFolders({ store })
|
store.state.backendInteractor.startFetchingBookmarkFolders({ store })
|
||||||
store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher })
|
store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher })
|
||||||
|
|
|
||||||
|
|
@ -763,7 +763,9 @@ const users = {
|
||||||
// Start fetching notifications
|
// Start fetching notifications
|
||||||
dispatch('startFetchingNotifications')
|
dispatch('startFetchingNotifications')
|
||||||
|
|
||||||
if (useInstanceStore().pleromaChatMessagesAvailable) {
|
if (
|
||||||
|
useInstanceStore().featureSet.pleromaChatMessagesAvailable
|
||||||
|
) {
|
||||||
// Start fetching chats
|
// Start fetching chats
|
||||||
dispatch('startFetchingChats')
|
dispatch('startFetchingChats')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
|
||||||
const timelineData = rootState.notifications
|
const timelineData = rootState.notifications
|
||||||
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
||||||
|
|
||||||
if (useInstanceStore().pleromaChatMessagesAvailable) {
|
if (useInstanceStore().featureSet.pleromaChatMessagesAvailable) {
|
||||||
mastoApiNotificationTypes.add('pleroma:chat_mention')
|
mastoApiNotificationTypes.add('pleroma:chat_mention')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ const fetchAndUpdate = ({
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.errors) {
|
if (response.errors) {
|
||||||
if (timeline === 'favorites') {
|
if (timeline === 'favorites') {
|
||||||
useInstanceStore().pleromaPublicFavouritesAvailable = false
|
useInstanceStore().featureSet.pleromaPublicFavouritesAvailable = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
throw new Error(`${response.status} ${response.statusText}`)
|
throw new Error(`${response.status} ${response.statusText}`)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const defaultState = {
|
||||||
unicodeEmojiAnnotations: {},
|
unicodeEmojiAnnotations: {},
|
||||||
|
|
||||||
// Stickers
|
// Stickers
|
||||||
stickers: null
|
stickers: null,
|
||||||
}
|
}
|
||||||
|
|
||||||
const SORTED_EMOJI_GROUP_IDS = [
|
const SORTED_EMOJI_GROUP_IDS = [
|
||||||
|
|
@ -130,7 +130,7 @@ export const useEmojiStore = defineStore('emoji', {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setStickers (stickers) {
|
setStickers(stickers) {
|
||||||
this.stickers = stickers
|
this.stickers = stickers
|
||||||
},
|
},
|
||||||
async getStaticEmoji() {
|
async getStaticEmoji() {
|
||||||
|
|
|
||||||
|
|
@ -92,10 +92,6 @@ const defaultState = {
|
||||||
localBubble: false, // Akkoma
|
localBubble: false, // Akkoma
|
||||||
},
|
},
|
||||||
|
|
||||||
// Html stuff
|
|
||||||
instanceSpecificPanelContent: '',
|
|
||||||
tos: '',
|
|
||||||
|
|
||||||
// Version Information
|
// Version Information
|
||||||
backendVersion: '',
|
backendVersion: '',
|
||||||
backendRepository: '',
|
backendRepository: '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue