1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-04-26 03:25:22 -04:00

patch redundant search link when signed out

This commit is contained in:
Jake Jarvis 2022-12-09 09:28:01 -05:00
parent 7128afcaa5
commit b6fe7f09b1
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 50 additions and 0 deletions

View File

@ -21,6 +21,7 @@ systemctl restart mastodon-*
## Patches ## Patches
- [`cleanup-sidebar.patch`](patches/cleanup-sidebar.patch): Removes redudant search button from sidebar (glitch-soc only)
- [`favicons.patch`](patches/favicons.patch): Use custom icon images instead of Mastodon logo - [`favicons.patch`](patches/favicons.patch): Use custom icon images instead of Mastodon logo
- [`hide-contact-email.patch`](patches/hide-contact-email.patch): Hides the `mailto:` link on the About page - [`hide-contact-email.patch`](patches/hide-contact-email.patch): Hides the `mailto:` link on the About page
- [`hide-rules.patch`](patches/hide-rules.patch): Applies just to homepage, meant only for single-user instances - [`hide-rules.patch`](patches/hide-rules.patch): Applies just to homepage, meant only for single-user instances

View File

@ -0,0 +1,49 @@
diff --git a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
index 3b46c6eec..4999c273c 100644
--- a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
+++ b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom';
+import Logo from 'flavours/glitch/components/logo';
import { timelinePreview, showTrends } from 'flavours/glitch/initial_state';
import ColumnLink from 'flavours/glitch/features/ui/components/column_link';
import DisabledAccountBanner from './disabled_account_banner';
@@ -47,6 +48,11 @@ class NavigationPanel extends React.Component {
return (
<div className='navigation-panel'>
+ <div className='navigation-panel__logo'>
+ <Link to='/' className='column-link column-link--logo'><Logo /></Link>
+ <hr />
+ </div>
+
{signedIn && (
<React.Fragment>
<ColumnLink transparent to='/home' icon='home' text={intl.formatMessage(messages.home)} />
@@ -55,14 +61,13 @@ class NavigationPanel extends React.Component {
</React.Fragment>
)}
- {showTrends ? (
+ {showTrends && (
<ColumnLink transparent to='/explore' icon='hashtag' text={intl.formatMessage(messages.explore)} />
- ) : (
- <ColumnLink transparent to='/search' icon='search' text={intl.formatMessage(messages.search)} />
)}
{(signedIn || timelinePreview) && (
<>
+ <ColumnLink transparent to='/search' icon='search' text={intl.formatMessage(messages.search)} />
<ColumnLink transparent to='/public/local' icon='users' text={intl.formatMessage(messages.local)} />
<ColumnLink transparent exact to='/public' icon='globe' text={intl.formatMessage(messages.federated)} />
</>
@@ -70,7 +75,6 @@ class NavigationPanel extends React.Component {
{!signedIn && (
<div className='navigation-panel__sign-in-banner'>
- <hr />
{ disabledAccountId ? <DisabledAccountBanner /> : <SignInBanner /> }
</div>
)}