forked from AkkomaGang/akkoma-fe
format missed files
This commit is contained in:
parent
8e880c349e
commit
13f92fa2b1
10 changed files with 52 additions and 47 deletions
|
@ -423,8 +423,14 @@ const getNodeInfo = async ({ store }) => {
|
|||
typeof federation.enabled === 'undefined' ? true : federation.enabled
|
||||
})
|
||||
|
||||
store.dispatch('setInstanceOption', { name: 'publicTimelineVisibility', value: metadata.publicTimelineVisibility })
|
||||
store.dispatch('setInstanceOption', { name: 'federatedTimelineAvailable', value: metadata.federatedTimelineAvailable })
|
||||
store.dispatch('setInstanceOption', {
|
||||
name: 'publicTimelineVisibility',
|
||||
value: metadata.publicTimelineVisibility
|
||||
})
|
||||
store.dispatch('setInstanceOption', {
|
||||
name: 'federatedTimelineAvailable',
|
||||
value: metadata.federatedTimelineAvailable
|
||||
})
|
||||
|
||||
const accountActivationRequired = metadata.accountActivationRequired
|
||||
store.dispatch('setInstanceOption', {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { library } from '@fortawesome/fontawesome-svg-core'
|
|||
import {
|
||||
publicTimelineVisible,
|
||||
federatedTimelineVisible,
|
||||
bubbleTimelineVisible,
|
||||
bubbleTimelineVisible
|
||||
} from '../../lib/timeline_visibility'
|
||||
import {
|
||||
faSignInAlt,
|
||||
|
@ -135,7 +135,7 @@ export default {
|
|||
...mapState({
|
||||
publicTimelineVisible,
|
||||
federatedTimelineVisible,
|
||||
bubbleTimelineVisible,
|
||||
bubbleTimelineVisible
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="publicTimelineVisible"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="publicTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
@ -68,9 +68,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federatedTimelineVisible"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="federatedTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
|
@ -5,7 +5,7 @@ const EMOJI_REACTION_COUNT_CUTOFF = 12
|
|||
|
||||
const findEmojiByReplacement = (state, replacement) => {
|
||||
const allEmojis = state.instance.emoji.concat(state.instance.customEmoji)
|
||||
return allEmojis.find(emoji => emoji.replacement === replacement)
|
||||
return allEmojis.find((emoji) => emoji.replacement === replacement)
|
||||
}
|
||||
|
||||
const EmojiReactions = {
|
||||
|
|
|
@ -112,9 +112,7 @@
|
|||
:placeholder="$t('settings.expire_posts_input_placeholder')"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p></p>
|
||||
<p>
|
||||
<interface-language-switcher
|
||||
:prompt-text="$t('settings.email_language')"
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import Popover from '../popover/popover.vue'
|
||||
import TimelineMenuContent from './timeline_menu_content.vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faChevronDown
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { faChevronDown } from '@fortawesome/free-solid-svg-icons'
|
||||
import { mapState } from 'vuex'
|
||||
import {
|
||||
publicTimelineVisible,
|
||||
federatedTimelineVisible,
|
||||
bubbleTimelineVisible,
|
||||
bubbleTimelineVisible
|
||||
} from '../../lib/timeline_visibility'
|
||||
|
||||
library.add(faChevronDown)
|
||||
|
@ -46,10 +44,10 @@ const TimelineMenuTabs = {
|
|||
return this.$store.state.instance.private
|
||||
},
|
||||
...mapState({
|
||||
currentUser: state => state.users.currentUser,
|
||||
currentUser: (state) => state.users.currentUser,
|
||||
publicTimelineVisible,
|
||||
federatedTimelineVisible,
|
||||
bubbleTimelineVisible,
|
||||
bubbleTimelineVisible
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="publicTimelineVisible"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="publicTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
@ -40,9 +40,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federatedTimelineVisible"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="federatedTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
|
@ -21,7 +21,7 @@ const saveImmedeatelyActions = [
|
|||
'setClientData',
|
||||
'setToken',
|
||||
'clearToken',
|
||||
'emojiUsed',
|
||||
'emojiUsed'
|
||||
]
|
||||
|
||||
const defaultStorage = (() => {
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
const timelineVisibleUnauthenticated = (state, timeline) => (
|
||||
const timelineVisibleUnauthenticated = (state, timeline) =>
|
||||
state.instance.publicTimelineVisibility[timeline] ?? false
|
||||
);
|
||||
|
||||
const currentUser = (state) => state.users.currentUser;
|
||||
const currentUser = (state) => state.users.currentUser
|
||||
|
||||
const currentUserOrTimelineVisibleUnauthenticated = (state, timeline) => (
|
||||
const currentUserOrTimelineVisibleUnauthenticated = (state, timeline) =>
|
||||
currentUser(state) || timelineVisibleUnauthenticated(state, timeline)
|
||||
);
|
||||
|
||||
const federatedTimelineAvailable = (state) => state.instance.federatedTimelineAvailable;
|
||||
const federatedTimelineAvailable = (state) =>
|
||||
state.instance.federatedTimelineAvailable
|
||||
|
||||
export const federatedTimelineVisible = (state) => (
|
||||
federatedTimelineAvailable(state) && currentUserOrTimelineVisibleUnauthenticated(state, 'federated')
|
||||
);
|
||||
export const federatedTimelineVisible = (state) =>
|
||||
federatedTimelineAvailable(state) &&
|
||||
currentUserOrTimelineVisibleUnauthenticated(state, 'federated')
|
||||
|
||||
export const publicTimelineVisible = (state) => (
|
||||
export const publicTimelineVisible = (state) =>
|
||||
currentUserOrTimelineVisibleUnauthenticated(state, 'local')
|
||||
);
|
||||
|
||||
export const bubbleTimelineVisible = (state) => (
|
||||
state.instance.localBubbleInstances.length > 0 && currentUserOrTimelineVisibleUnauthenticated(state, 'bubble')
|
||||
);
|
||||
export const bubbleTimelineVisible = (state) =>
|
||||
state.instance.localBubbleInstances.length > 0 &&
|
||||
currentUserOrTimelineVisibleUnauthenticated(state, 'bubble')
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const RECENT_MAX = 7 * 6
|
||||
|
||||
const defaultState = {
|
||||
emojis: [],
|
||||
emojis: []
|
||||
}
|
||||
|
||||
const recentEmojis = {
|
||||
|
@ -32,19 +32,24 @@ const recentEmojis = {
|
|||
emojis.splice(i, 1)
|
||||
emojis.unshift(emoji.displayText)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
getters: {
|
||||
recentEmojis: (state, getters, rootState) => state.emojis.reduce((objects, displayText) => {
|
||||
const allEmojis = rootState.instance.emoji.concat(rootState.instance.customEmoji)
|
||||
let emojiObject = allEmojis.find(emoji => emoji.displayText === displayText)
|
||||
recentEmojis: (state, getters, rootState) =>
|
||||
state.emojis.reduce((objects, displayText) => {
|
||||
const allEmojis = rootState.instance.emoji.concat(
|
||||
rootState.instance.customEmoji
|
||||
)
|
||||
let emojiObject = allEmojis.find(
|
||||
(emoji) => emoji.displayText === displayText
|
||||
)
|
||||
if (emojiObject !== undefined) {
|
||||
objects.push(emojiObject)
|
||||
}
|
||||
return objects
|
||||
}, []),
|
||||
},
|
||||
}, [])
|
||||
}
|
||||
}
|
||||
|
||||
export default recentEmojis
|
||||
|
|
Loading…
Reference in a new issue