mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 01:09:55 +00:00
[Glitch] Add UI support for disabled live feeds
Port 2fa5dd6d1f to glitch-soc
Co-authored-by: diondiondion <mail@diondiondion.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
me,
|
||||
} from 'flavours/glitch/initial_state';
|
||||
import { transientSingleColumn } from 'flavours/glitch/is_mobile';
|
||||
import { canViewFeed } from 'flavours/glitch/permissions';
|
||||
import { selectUnreadNotificationGroupsCount } from 'flavours/glitch/selectors/notifications';
|
||||
import { useAppSelector, useAppDispatch } from 'flavours/glitch/store';
|
||||
|
||||
@@ -208,7 +209,7 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({
|
||||
multiColumn = false,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const { signedIn, disabledAccountId } = useIdentity();
|
||||
const { signedIn, permissions, disabledAccountId } = useIdentity();
|
||||
const location = useLocation();
|
||||
const showSearch = useBreakpoint('full') && !multiColumn;
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -286,13 +287,12 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({
|
||||
/>
|
||||
)}
|
||||
|
||||
{(signedIn ||
|
||||
localLiveFeedAccess === 'public' ||
|
||||
remoteLiveFeedAccess === 'public') && (
|
||||
{(canViewFeed(signedIn, permissions, localLiveFeedAccess) ||
|
||||
canViewFeed(signedIn, permissions, remoteLiveFeedAccess)) && (
|
||||
<ColumnLink
|
||||
transparent
|
||||
to={
|
||||
signedIn || localLiveFeedAccess === 'public'
|
||||
canViewFeed(signedIn, permissions, localLiveFeedAccess)
|
||||
? '/public/local'
|
||||
: '/public/remote'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user