Merge branch 'next-logo' into 'next'

Next: fix logo

See merge request soapbox-pub/soapbox-fe!1123
virtualized-window
Alex Gleason 2022-03-21 20:41:28 +00:00
commit c6ab95349e
3 zmienionych plików z 15 dodań i 17 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ import { getHost } from 'soapbox/actions/instance';
import KVStore from 'soapbox/storage/kv_store';
import { getFeatures } from 'soapbox/utils/features';
import { staticClient } from '../api';
import api, { staticClient } from '../api';
export const SOAPBOX_CONFIG_REQUEST_SUCCESS = 'SOAPBOX_CONFIG_REQUEST_SUCCESS';
export const SOAPBOX_CONFIG_REQUEST_FAIL = 'SOAPBOX_CONFIG_REQUEST_FAIL';
@ -88,19 +88,17 @@ export function rememberSoapboxConfig(host) {
}
export function fetchSoapboxConfig(host) {
return fetchSoapboxJson(host);
// return (dispatch, getState) => {
// api(getState).get('/api/pleroma/frontend_configurations').then(response => {
// if (response.data.soapbox_fe) {
// dispatch(importSoapboxConfig(response.data.soapbox_fe, host));
// } else {
// dispatch(fetchSoapboxJson(host));
// }
// }).catch(error => {
// dispatch(fetchSoapboxJson(host));
// });
// };
return (dispatch, getState) => {
api(getState).get('/api/pleroma/frontend_configurations').then(response => {
if (response.data.soapbox_fe) {
dispatch(importSoapboxConfig(response.data.soapbox_fe, host));
} else {
dispatch(fetchSoapboxJson(host));
}
}).catch(error => {
dispatch(fetchSoapboxJson(host));
});
};
}
// Tries to remember the config from browser storage before fetching it

Wyświetl plik

@ -48,7 +48,7 @@ const Navbar = () => {
>
{logo ? (
<Link key='logo' to='/' data-preview-title-id='column.home' className='flex-shrink-0 flex items-center'>
<img alt='Logo' src={logo} className='h-5 lg:h-6 w-auto lg:min-w-[160px] cursor-pointer' />
<img alt='Logo' src={logo} className='h-5 lg:h-6 w-auto cursor-pointer' />
<span className='hidden'><FormattedMessage id='tabs_bar.home' defaultMessage='Home' /></span>
</Link>
) : (

Wyświetl plik

@ -89,7 +89,7 @@ import {
EditPassword,
EmailConfirmation,
DeleteAccount,
// SoapboxConfig,
SoapboxConfig,
// ExportData,
// ImportData,
// Backups,
@ -330,7 +330,7 @@ class SwitchingColumnsArea extends React.PureComponent {
<WrappedRoute path='/settings/media_display' page={DefaultPage} component={MediaDisplay} content={children} />
<WrappedRoute path='/settings' page={DefaultPage} component={Settings} content={children} />
{/* <WrappedRoute path='/backups' page={DefaultPage} component={Backups} content={children} /> */}
{/* <WrappedRoute path='/soapbox/config' adminOnly page={DefaultPage} component={SoapboxConfig} content={children} /> */}
<WrappedRoute path='/soapbox/config' adminOnly page={DefaultPage} component={SoapboxConfig} content={children} />
{/*
<Redirect from='/admin/dashboard' to='/admin' exact />