Compare commits

..

7 Commits

Author SHA1 Message Date
lamp d697f6b968 Merge remote-tracking branch 'upstream/stable' into custom 2025-10-14 00:58:07 -07:00
lamp efb46fc29d oneric fix sort 2024-05-15 17:55:16 -07:00
lamp 08ea0383fd fix 403 2024-05-06 02:48:41 -07:00
lamp 4c58e2f4ea fix disabled favorites 2024-05-06 02:17:40 -07:00
lamp 4d139b34d4 merge "Display public favorites on user profiles if enabled"
merged from 6f452d672fe740035cf1d29d03bcda0d39438753 and 1ceffb4e713b4b20d70121fba92d2b50f2d3cadf
2024-05-06 02:00:16 -07:00
lamp 3984d98821 version tab url 2024-05-06 00:31:48 -07:00
fox 87aee5e931 really obnoxious change
revert Prevent replying with a more open visibility than the parent post
2024-05-04 15:45:13 -07:00
13 changed files with 48 additions and 9 deletions
+3
View File
@@ -70,6 +70,9 @@ Default post formatting option (markdown/bbcode/plaintext/etc...)
### `redirectRootNoLogin`, `redirectRootLogin` ### `redirectRootNoLogin`, `redirectRootLogin`
These two settings should point to where FE should redirect visitor when they login/open up website root 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` ### `sidebarRight`
Change alignment of sidebar and panels to the right. Defaults to `false`. Change alignment of sidebar and panels to the right. Defaults to `false`.
+2
View File
@@ -173,8 +173,10 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
copyInstanceOption('redirectRootNoLogin') copyInstanceOption('redirectRootNoLogin')
copyInstanceOption('redirectRootLogin') copyInstanceOption('redirectRootLogin')
copyInstanceOption('showInstanceSpecificPanel') copyInstanceOption('showInstanceSpecificPanel')
copyInstanceOption('minimalScopesMode')
copyInstanceOption('hideMutedPosts') copyInstanceOption('hideMutedPosts')
copyInstanceOption('collapseMessageWithSubject') copyInstanceOption('collapseMessageWithSubject')
copyInstanceOption('scopeCopy')
copyInstanceOption('subjectLineBehavior') copyInstanceOption('subjectLineBehavior')
copyInstanceOption('postContentType') copyInstanceOption('postContentType')
copyInstanceOption('alwaysShowSubjectInput') copyInstanceOption('alwaysShowSubjectInput')
@@ -4,6 +4,7 @@ const FeaturesPanel = {
computed: { computed: {
whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled }, whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },
mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable }, mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },
minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },
textlimit: function () { return this.$store.state.instance.textlimit }, textlimit: function () { return this.$store.state.instance.textlimit },
uploadlimit: function () { return fileSizeFormatService.fileSizeFormat(this.$store.state.instance.uploadlimit) } uploadlimit: function () { return fileSizeFormatService.fileSizeFormat(this.$store.state.instance.uploadlimit) }
} }
@@ -247,6 +247,9 @@ const PostStatusForm = {
userDefaultScope () { userDefaultScope () {
return this.$store.state.users.currentUser.default_scope return this.$store.state.users.currentUser.default_scope
}, },
showAllScopes () {
return !this.mergedConfig.minimalScopesMode
},
emojiUserSuggestor () { emojiUserSuggestor () {
return suggestor({ return suggestor({
emoji: [ emoji: [
@@ -288,6 +291,9 @@ const PostStatusForm = {
isOverLengthLimit () { isOverLengthLimit () {
return this.hasStatusLengthLimit && (this.charactersLeft < 0) return this.hasStatusLengthLimit && (this.charactersLeft < 0)
}, },
minimalScopesMode () {
return this.$store.state.instance.minimalScopesMode
},
alwaysShowSubject () { alwaysShowSubject () {
return this.mergedConfig.alwaysShowSubjectInput return this.mergedConfig.alwaysShowSubjectInput
}, },
@@ -197,6 +197,7 @@
<scope-selector <scope-selector
ref="scopeselector" ref="scopeselector"
v-if="!disableVisibilitySelector" v-if="!disableVisibilitySelector"
:show-all="showAllScopes"
:user-default="userDefaultScope" :user-default="userDefaultScope"
:original-scope="copyMessageScope" :original-scope="copyMessageScope"
:initial-scope="newStatus.visibility" :initial-scope="newStatus.visibility"
@@ -565,12 +565,18 @@
{{ $t('settings.default_vis') }} <ServerSideIndicator :server-side="true" /> {{ $t('settings.default_vis') }} <ServerSideIndicator :server-side="true" />
<ScopeSelector <ScopeSelector
class="scope-selector" class="scope-selector"
:show-all="true"
:user-default="serverSide_defaultScope" :user-default="serverSide_defaultScope"
:initial-scope="serverSide_defaultScope" :initial-scope="serverSide_defaultScope"
:on-scope-change="changeDefaultScope" :on-scope-change="changeDefaultScope"
/> />
</label> </label>
</li> </li>
<li>
<BooleanSetting path="minimalScopesMode">
{{ $t('settings.minimal_scopes_mode') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting path="sensitiveByDefault"> <BooleanSetting path="sensitiveByDefault">
{{ $t('settings.sensitive_by_default') }} {{ $t('settings.sensitive_by_default') }}
@@ -581,6 +587,14 @@
{{ $t('settings.sensitive_if_subject') }} {{ $t('settings.sensitive_if_subject') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting
path="scopeCopy"
expert="1"
>
{{ $t('settings.scope_copy') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting <BooleanSetting
path="alwaysShowSubjectInput" path="alwaysShowSubjectInput"
@@ -617,6 +631,14 @@
{{ $t('settings.post_language') }} {{ $t('settings.post_language') }}
</ChoiceSetting> </ChoiceSetting>
</li> </li>
<li>
<BooleanSetting
path="minimalScopesMode"
expert="1"
>
{{ $t('settings.minimal_scopes_mode') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting <BooleanSetting
path="alwaysShowNewPostButton" path="alwaysShowNewPostButton"
+2 -6
View File
@@ -118,17 +118,13 @@ const UserProfile = {
media: 'media' media: 'media'
} }
if (this.isUs) { if (this.favoritesTabVisible) timelineTabMap['favorites'] = 'favorites'
timelineTabMap['favorites'] = 'favorites'
} else if (!this.user.hide_favorites) {
timelineTabMap['favorites'] = 'publicFavorites'
}
const timeline = timelineTabMap[nextTab] const timeline = timelineTabMap[nextTab]
if (timeline) { if (timeline) {
this.stopFetching() 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) { load (userNameOrId) {
+1 -1
View File
@@ -172,7 +172,7 @@
:title="$t('user_card.favorites')" :title="$t('user_card.favorites')"
timeline-name="favorites" timeline-name="favorites"
:timeline="favorites" :timeline="favorites"
:user-id="userId" :user-id="isUs ? undefined : userId"
:in-profile="true" :in-profile="true"
:footer-slipgate="footerRef" :footer-slipgate="footerRef"
/> />
+1
View File
@@ -83,6 +83,7 @@ export const defaultState = {
subjectLineBehavior: undefined, // instance default subjectLineBehavior: undefined, // instance default
alwaysShowSubjectInput: undefined, // instance default alwaysShowSubjectInput: undefined, // instance default
postContentType: undefined, // instance default postContentType: undefined, // instance default
minimalScopesMode: undefined, // instance default
// This hides statuses filtered via a word filter // This hides statuses filtered via a word filter
hideFilteredStatuses: undefined, // instance default hideFilteredStatuses: undefined, // instance default
modalOnRepeat: undefined, // instance default modalOnRepeat: undefined, // instance default
+2
View File
@@ -52,10 +52,12 @@ const defaultState = {
logoMargin: '.2em', logoMargin: '.2em',
logoMask: true, logoMask: true,
logoLeft: false, logoLeft: false,
minimalScopesMode: false,
nsfwCensorImage: undefined, nsfwCensorImage: undefined,
postContentType: 'text/plain', postContentType: 'text/plain',
redirectRootLogin: '/main/friends', redirectRootLogin: '/main/friends',
redirectRootNoLogin: '/main/all', redirectRootNoLogin: '/main/all',
scopeCopy: true,
showFeaturesPanel: true, showFeaturesPanel: true,
showInstanceSpecificPanel: false, showInstanceSpecificPanel: false,
showNavShortcuts: true, showNavShortcuts: true,
+1 -2
View File
@@ -57,7 +57,6 @@ export const defaultState = () => ({
public: emptyTl(), public: emptyTl(),
user: emptyTl(), user: emptyTl(),
favorites: emptyTl(), favorites: emptyTl(),
publicFavorites: emptyTl(),
media: emptyTl(), media: emptyTl(),
publicAndExternal: emptyTl(), publicAndExternal: emptyTl(),
friends: emptyTl(), friends: emptyTl(),
@@ -315,7 +314,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
}) })
// Keep the visible statuses sorted // Keep the visible statuses sorted
if (timeline && !(['bookmarks', 'favorites', 'publicFavorites'].includes(timeline))) { if (timeline && !(['bookmarks', 'favorites'].includes(timeline))) {
sortTimeline(timelineObject) sortTimeline(timelineObject)
} }
} }
+4
View File
@@ -719,6 +719,10 @@ const fetchTimeline = ({
let url = timelineUrls[timeline] let url = timelineUrls[timeline]
if (timeline === 'favorites' && userId) {
url = timelineUrls.publicFavorites(userId)
}
if (timeline === 'user' || timeline === 'media' || timeline === 'replies') { if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
url = url(userId) url = url(userId)
} }
+2
View File
@@ -13,10 +13,12 @@
"logoMargin": ".1em", "logoMargin": ".1em",
"logoMask": true, "logoMask": true,
"logoLeft": false, "logoLeft": false,
"minimalScopesMode": false,
"nsfwCensorImage": "", "nsfwCensorImage": "",
"postContentType": "text/plain", "postContentType": "text/plain",
"redirectRootLogin": "/main/friends", "redirectRootLogin": "/main/friends",
"redirectRootNoLogin": "/main/all", "redirectRootNoLogin": "/main/all",
"scopeCopy": true,
"showFeaturesPanel": true, "showFeaturesPanel": true,
"showInstanceSpecificPanel": false, "showInstanceSpecificPanel": false,
"sidebarRight": false, "sidebarRight": false,