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