[Glitch] Display customized mascot in web UI

Port relevant parts of 9d4541c612 to glitch-soc
rebase/4.0.0rc2
Thibaut Girka 2018-12-19 20:23:16 +01:00 committed by ThibG
parent fb63941c47
commit 6073195a7d
2 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ import DrawerResults from './results';
import DrawerSearch from './search';
// Utils.
import { me } from 'flavours/glitch/util/initial_state';
import { me, mascot } from 'flavours/glitch/util/initial_state';
import { wrap } from 'flavours/glitch/util/redux_helpers';
// Messages.
@ -127,7 +127,7 @@ class Drawer extends React.Component {
<Composer />
{multiColumn && (
<div className='drawer__inner__mastodon'>
<button className='mastodon' onClick={onClickElefriend} />
{mascot ? <img alt='' draggable='false' src={mascot} /> : <button className='mastodon' onClick={onClickElefriend} />}
</div>
)}
</div>}

View File

@ -24,6 +24,7 @@ export const searchEnabled = getMeta('search_enabled');
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
export const invitesEnabled = getMeta('invites_enabled');
export const version = getMeta('version');
export const mascot = getMeta('mascot');
export const isStaff = getMeta('is_staff');
export default initialState;