Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
efb46fc29d | |||
08ea0383fd | |||
4c58e2f4ea | |||
4d139b34d4 | |||
3984d98821 | |||
|
87aee5e931 |
16 changed files with 67 additions and 26 deletions
|
@ -70,6 +70,9 @@ Default post formatting option (markdown/bbcode/plaintext/etc...)
|
|||
### `redirectRootNoLogin`, `redirectRootLogin`
|
||||
These two settings should point to where FE should redirect visitor when they login/open up website root
|
||||
|
||||
### `scopeCopy`
|
||||
Copy post scope (visibility) when replying to a post. Instance-default.
|
||||
|
||||
### `sidebarRight`
|
||||
Change alignment of sidebar and panels to the right. Defaults to `false`.
|
||||
|
||||
|
|
|
@ -173,8 +173,10 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
|||
copyInstanceOption('redirectRootNoLogin')
|
||||
copyInstanceOption('redirectRootLogin')
|
||||
copyInstanceOption('showInstanceSpecificPanel')
|
||||
copyInstanceOption('minimalScopesMode')
|
||||
copyInstanceOption('hideMutedPosts')
|
||||
copyInstanceOption('collapseMessageWithSubject')
|
||||
copyInstanceOption('scopeCopy')
|
||||
copyInstanceOption('subjectLineBehavior')
|
||||
copyInstanceOption('postContentType')
|
||||
copyInstanceOption('alwaysShowSubjectInput')
|
||||
|
|
|
@ -4,6 +4,7 @@ const FeaturesPanel = {
|
|||
computed: {
|
||||
whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },
|
||||
mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },
|
||||
minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },
|
||||
textlimit: function () { return this.$store.state.instance.textlimit },
|
||||
uploadlimit: function () { return fileSizeFormatService.fileSizeFormat(this.$store.state.instance.uploadlimit) }
|
||||
}
|
||||
|
|
|
@ -230,6 +230,9 @@ const PostStatusForm = {
|
|||
userDefaultScope () {
|
||||
return this.$store.state.users.currentUser.default_scope
|
||||
},
|
||||
showAllScopes () {
|
||||
return !this.mergedConfig.minimalScopesMode
|
||||
},
|
||||
emojiUserSuggestor () {
|
||||
return suggestor({
|
||||
emoji: [
|
||||
|
@ -271,6 +274,9 @@ const PostStatusForm = {
|
|||
isOverLengthLimit () {
|
||||
return this.hasStatusLengthLimit && (this.charactersLeft < 0)
|
||||
},
|
||||
minimalScopesMode () {
|
||||
return this.$store.state.instance.minimalScopesMode
|
||||
},
|
||||
alwaysShowSubject () {
|
||||
return this.mergedConfig.alwaysShowSubjectInput
|
||||
},
|
||||
|
@ -752,8 +758,10 @@ const PostStatusForm = {
|
|||
if (this.copyMessageScope === 'direct') {
|
||||
return this.copyMessageScope
|
||||
}
|
||||
if (this.copyMessageScope !== 'public' && this.$store.state.users.currentUser.default_scope !== 'private') {
|
||||
return this.copyMessageScope
|
||||
if (this.$store.getters.mergedConfig.scopeCopy) {
|
||||
if (this.copyMessageScope !== 'public' && this.$store.state.users.currentUser.default_scope !== 'private') {
|
||||
return this.copyMessageScope
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.$store.state.users.currentUser.default_scope
|
||||
|
|
|
@ -193,6 +193,7 @@
|
|||
>
|
||||
<scope-selector
|
||||
v-if="!disableVisibilitySelector"
|
||||
:show-all="showAllScopes"
|
||||
:user-default="userDefaultScope"
|
||||
:original-scope="copyMessageScope"
|
||||
:initial-scope="newStatus.visibility"
|
||||
|
|
|
@ -13,14 +13,6 @@ library.add(
|
|||
faLockOpen
|
||||
)
|
||||
|
||||
const SCOPE_LEVELS = {
|
||||
'direct': 0,
|
||||
'private': 1,
|
||||
'local': 2,
|
||||
'unlisted': 2,
|
||||
'public': 3
|
||||
}
|
||||
|
||||
const ScopeSelector = {
|
||||
props: [
|
||||
'showAll',
|
||||
|
@ -65,15 +57,11 @@ const ScopeSelector = {
|
|||
},
|
||||
methods: {
|
||||
shouldShow (scope) {
|
||||
if (!this.originalScope) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (this.originalScope === 'local') {
|
||||
return scope === 'direct' || scope === 'local'
|
||||
}
|
||||
|
||||
return SCOPE_LEVELS[scope] <= SCOPE_LEVELS[this.originalScope]
|
||||
return this.showAll ||
|
||||
this.currentScope === scope ||
|
||||
this.originalScope === scope ||
|
||||
this.userDefault === scope ||
|
||||
scope === 'direct'
|
||||
},
|
||||
changeVis (scope) {
|
||||
this.currentScope = scope
|
||||
|
|
|
@ -542,12 +542,18 @@
|
|||
{{ $t('settings.default_vis') }} <ServerSideIndicator :server-side="true" />
|
||||
<ScopeSelector
|
||||
class="scope-selector"
|
||||
:show-all="true"
|
||||
:user-default="serverSide_defaultScope"
|
||||
:initial-scope="serverSide_defaultScope"
|
||||
:on-scope-change="changeDefaultScope"
|
||||
/>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="minimalScopesMode">
|
||||
{{ $t('settings.minimal_scopes_mode') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="sensitiveByDefault">
|
||||
{{ $t('settings.sensitive_by_default') }}
|
||||
|
@ -558,6 +564,14 @@
|
|||
{{ $t('settings.sensitive_if_subject') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="scopeCopy"
|
||||
expert="1"
|
||||
>
|
||||
{{ $t('settings.scope_copy') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="alwaysShowSubjectInput"
|
||||
|
@ -585,6 +599,14 @@
|
|||
{{ $t('settings.post_status_content_type') }}
|
||||
</ChoiceSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="minimalScopesMode"
|
||||
expert="1"
|
||||
>
|
||||
{{ $t('settings.minimal_scopes_mode') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="alwaysShowNewPostButton"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { extractCommit } from 'src/services/version/version.service'
|
||||
|
||||
const pleromaFeCommitUrl = 'https://akkoma.dev/AkkomaGang/pleroma-fe/commit/'
|
||||
const pleromaFeCommitUrl = 'https://akkoma.dev/lamp/akkoma-fe/commit/'
|
||||
const pleromaBeCommitUrl = 'https://akkoma.dev/AkkomaGang/akkoma/commit/'
|
||||
|
||||
const VersionTab = {
|
||||
|
|
|
@ -97,6 +97,9 @@ const UserProfile = {
|
|||
followersTabVisible () {
|
||||
return this.isUs || !this.user.hide_followers
|
||||
},
|
||||
favoritesTabVisible () {
|
||||
return this.isUs || !this.user.hide_favorites
|
||||
},
|
||||
currentUser () {
|
||||
return this.$store.state.users.currentUser
|
||||
},
|
||||
|
@ -114,14 +117,14 @@ const UserProfile = {
|
|||
replies: 'replies',
|
||||
media: 'media'
|
||||
}
|
||||
// only we can see our own favourites
|
||||
if (this.isUs) timelineTabMap['favorites'] = 'favorites'
|
||||
|
||||
if (this.favoritesTabVisible) timelineTabMap['favorites'] = 'favorites'
|
||||
|
||||
const timeline = timelineTabMap[nextTab]
|
||||
|
||||
if (timeline) {
|
||||
this.stopFetching()
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: timeline, userId: this.userId })
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: timeline, userId: nextTab == 'favorites' && this.isUs ? null : this.userId })
|
||||
}
|
||||
},
|
||||
load (userNameOrId) {
|
||||
|
|
|
@ -165,14 +165,14 @@
|
|||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
<Timeline
|
||||
v-if="isUs"
|
||||
v-if="favoritesTabVisible"
|
||||
key="favorites"
|
||||
:label="$t('user_card.favorites')"
|
||||
:disabled="!isUs"
|
||||
:embedded="true"
|
||||
:title="$t('user_card.favorites')"
|
||||
timeline-name="favorites"
|
||||
:timeline="favorites"
|
||||
:user-id="isUs ? undefined : userId"
|
||||
:in-profile="true"
|
||||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
|
|
|
@ -77,9 +77,11 @@ export const defaultState = {
|
|||
hideScopeNotice: false,
|
||||
useStreamingApi: false,
|
||||
sidebarRight: undefined, // instance default
|
||||
scopeCopy: undefined, // instance default
|
||||
subjectLineBehavior: undefined, // instance default
|
||||
alwaysShowSubjectInput: undefined, // instance default
|
||||
postContentType: undefined, // instance default
|
||||
minimalScopesMode: undefined, // instance default
|
||||
// This hides statuses filtered via a word filter
|
||||
hideFilteredStatuses: undefined, // instance default
|
||||
modalOnRepeat: undefined, // instance default
|
||||
|
|
|
@ -52,10 +52,12 @@ const defaultState = {
|
|||
logoMargin: '.2em',
|
||||
logoMask: true,
|
||||
logoLeft: false,
|
||||
minimalScopesMode: false,
|
||||
nsfwCensorImage: undefined,
|
||||
postContentType: 'text/plain',
|
||||
redirectRootLogin: '/main/friends',
|
||||
redirectRootNoLogin: '/main/all',
|
||||
scopeCopy: true,
|
||||
showFeaturesPanel: true,
|
||||
showInstanceSpecificPanel: false,
|
||||
showNavShortcuts: true,
|
||||
|
|
|
@ -314,7 +314,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
})
|
||||
|
||||
// Keep the visible statuses sorted
|
||||
if (timeline && !(timeline === 'bookmarks')) {
|
||||
if (timeline && !(['favorites', 'publicFavorites', 'bookmarks'].includes(timeline))) {
|
||||
sortTimeline(timelineObject)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ const PLEROMA_ANNOUNCEMENTS_URL = '/api/v1/pleroma/admin/announcements'
|
|||
const PLEROMA_POST_ANNOUNCEMENT_URL = '/api/v1/pleroma/admin/announcements'
|
||||
const PLEROMA_EDIT_ANNOUNCEMENT_URL = id => `/api/v1/pleroma/admin/announcements/${id}`
|
||||
const PLEROMA_DELETE_ANNOUNCEMENT_URL = id => `/api/v1/pleroma/admin/announcements/${id}`
|
||||
const PLEROMA_USER_FAVORITES_TIMELINE_URL = id => `/api/v1/pleroma/accounts/${id}/favourites`
|
||||
const AKKOMA_SETTING_PROFILE_URL = (name) => `/api/v1/akkoma/frontend_settings/pleroma-fe/${name}`
|
||||
const AKKOMA_SETTING_PROFILE_LIST = `/api/v1/akkoma/frontend_settings/pleroma-fe`
|
||||
const MASTODON_TAG_URL = (name) => `/api/v1/tags/${name}`
|
||||
|
@ -709,6 +710,7 @@ const fetchTimeline = ({
|
|||
media: MASTODON_USER_TIMELINE_URL,
|
||||
list: MASTODON_LIST_TIMELINE_URL,
|
||||
favorites: MASTODON_USER_FAVORITES_TIMELINE_URL,
|
||||
publicFavorites: PLEROMA_USER_FAVORITES_TIMELINE_URL,
|
||||
tag: MASTODON_TAG_TIMELINE_URL,
|
||||
bookmarks: MASTODON_BOOKMARK_TIMELINE_URL
|
||||
}
|
||||
|
@ -717,6 +719,10 @@ const fetchTimeline = ({
|
|||
|
||||
let url = timelineUrls[timeline]
|
||||
|
||||
if (timeline === 'favorites' && userId) {
|
||||
url = timelineUrls.publicFavorites(userId)
|
||||
}
|
||||
|
||||
if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
|
||||
url = url(userId)
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ export const parseUser = (data) => {
|
|||
|
||||
output.allow_following_move = data.pleroma.allow_following_move
|
||||
|
||||
output.hide_favorites = data.pleroma.hide_favorites
|
||||
output.hide_follows = data.pleroma.hide_follows
|
||||
output.hide_followers = data.pleroma.hide_followers
|
||||
output.hide_follows_count = data.pleroma.hide_follows_count
|
||||
|
|
|
@ -13,10 +13,12 @@
|
|||
"logoMargin": ".1em",
|
||||
"logoMask": true,
|
||||
"logoLeft": false,
|
||||
"minimalScopesMode": false,
|
||||
"nsfwCensorImage": "",
|
||||
"postContentType": "text/plain",
|
||||
"redirectRootLogin": "/main/friends",
|
||||
"redirectRootNoLogin": "/main/all",
|
||||
"scopeCopy": true,
|
||||
"showFeaturesPanel": true,
|
||||
"showInstanceSpecificPanel": false,
|
||||
"sidebarRight": false,
|
||||
|
|
Loading…
Reference in a new issue