Added logoDisabled/Stealth Gab mode for logo in NavigationBar
• Added: - logoDisabled/Stealth Gab mode for logo in NavigationBar to turn into Gab "g"
This commit is contained in:
parent
4d042e38c0
commit
d282d1d9c7
@ -1,7 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { CX } from '../constants'
|
import { CX } from '../constants'
|
||||||
|
|
||||||
import Logo from './logo'
|
import Logo from './logo'
|
||||||
import Loading from './loading'
|
import Loading from './loading'
|
||||||
import VerifiedIcon from './verified_icon'
|
import VerifiedIcon from './verified_icon'
|
||||||
@ -13,9 +12,19 @@ class Icon extends React.PureComponent {
|
|||||||
className,
|
className,
|
||||||
id,
|
id,
|
||||||
size,
|
size,
|
||||||
|
minimizeLogo,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
if (id === 'logo') return <Logo className={className} />
|
if (id === 'logo') {
|
||||||
|
if (minimizeLogo) {
|
||||||
|
return (
|
||||||
|
<div className={[_s.d, _s.px5, _s.py5, _s.circle, _s.bgNavigationBlendLight].join(' ')}>
|
||||||
|
<i className={[_s.gfi, _s['gfi-gab-g'], _s.px5, _s.py5, _s.fillNavigationBrand].join(' ')} style={{fontSize: '22px'}} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return <Logo className={className} />
|
||||||
|
}
|
||||||
else if (id === 'loading') return <Loading size={size} className={className} />
|
else if (id === 'loading') return <Loading size={size} className={className} />
|
||||||
else if (id === 'verified') return <VerifiedIcon size={size} className={className} />
|
else if (id === 'verified') return <VerifiedIcon size={size} className={className} />
|
||||||
|
|
||||||
@ -35,6 +44,7 @@ Icon.propTypes = {
|
|||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
size: PropTypes.string,
|
size: PropTypes.string,
|
||||||
|
minimizeLogo: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Icon
|
export default Icon
|
@ -84,7 +84,7 @@ class DisplayOptionsModal extends ImmutablePureComponent {
|
|||||||
|
|
||||||
<div className={[_s.d, _s.mb15].join(' ')}>
|
<div className={[_s.d, _s.mb15].join(' ')}>
|
||||||
<Text weight='bold' size='small' color='secondary'>
|
<Text weight='bold' size='small' color='secondary'>
|
||||||
Rounded
|
Options
|
||||||
</Text>
|
</Text>
|
||||||
<div className={[_s.d, _s.radiusSmall, _s.mt10, _s.py15, _s.px15, _s.bgTertiary].join(' ')}>
|
<div className={[_s.d, _s.radiusSmall, _s.mt10, _s.py15, _s.px15, _s.bgTertiary].join(' ')}>
|
||||||
<SettingSwitch
|
<SettingSwitch
|
||||||
@ -102,6 +102,15 @@ class DisplayOptionsModal extends ImmutablePureComponent {
|
|||||||
onChange={this.handleOnRadiusKeyDisabled}
|
onChange={this.handleOnRadiusKeyDisabled}
|
||||||
label={'Circles Disabled'}
|
label={'Circles Disabled'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<SettingSwitch
|
||||||
|
prefix='displayOptions'
|
||||||
|
settings={displayOptionsSettings}
|
||||||
|
settingPath={'logoDisabled'}
|
||||||
|
onChange={this.handleOnRadiusKeyDisabled}
|
||||||
|
label={'Stealth Gab'}
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ class DefaultNavigationBar extends ImmutablePureComponent {
|
|||||||
tabs,
|
tabs,
|
||||||
account,
|
account,
|
||||||
noActions,
|
noActions,
|
||||||
|
logoDisabled,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const navigationContainerClasses = CX({
|
const navigationContainerClasses = CX({
|
||||||
@ -148,7 +149,7 @@ class DefaultNavigationBar extends ImmutablePureComponent {
|
|||||||
backgroundColor='none'
|
backgroundColor='none'
|
||||||
className={[_s.d, _s.jcCenter, _s.noSelect, _s.noUnderline, _s.h53PX, _s.cursorPointer, _s.px10, _s.mr5].join(' ')}
|
className={[_s.d, _s.jcCenter, _s.noSelect, _s.noUnderline, _s.h53PX, _s.cursorPointer, _s.px10, _s.mr5].join(' ')}
|
||||||
>
|
>
|
||||||
<Icon id='logo' className={_s.fillNavigationBrand} />
|
<Icon id='logo' className={_s.fillNavigationBrand} minimizeLogo={logoDisabled} />
|
||||||
</Button>
|
</Button>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ class DefaultNavigationBar extends ImmutablePureComponent {
|
|||||||
href='/'
|
href='/'
|
||||||
className={[_s.h53PX, _s.bgTransparent, _s.outlineNone, _s.cursorPointer, _s.d, _s.jcCenter].join(' ')}
|
className={[_s.h53PX, _s.bgTransparent, _s.outlineNone, _s.cursorPointer, _s.d, _s.jcCenter].join(' ')}
|
||||||
>
|
>
|
||||||
<Icon id='logo' className={_s.fillNavigationBrand} />
|
<Icon id='logo' className={_s.fillNavigationBrand} minimizeLogo={logoDisabled} />
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -257,6 +258,7 @@ const mapStateToProps = (state) => ({
|
|||||||
account: makeGetAccount()(state, me),
|
account: makeGetAccount()(state, me),
|
||||||
emailConfirmationResends: state.getIn(['user', 'emailConfirmationResends'], 0),
|
emailConfirmationResends: state.getIn(['user', 'emailConfirmationResends'], 0),
|
||||||
theme: state.getIn(['settings', 'displayOptions', 'theme'], DEFAULT_THEME),
|
theme: state.getIn(['settings', 'displayOptions', 'theme'], DEFAULT_THEME),
|
||||||
|
logoDisabled: state.getIn(['settings', 'displayOptions', 'logoDisabled'], false),
|
||||||
})
|
})
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
@ -290,6 +292,7 @@ DefaultNavigationBar.propTypes = {
|
|||||||
emailConfirmationResends: PropTypes.number.isRequired,
|
emailConfirmationResends: PropTypes.number.isRequired,
|
||||||
noActions: PropTypes.bool,
|
noActions: PropTypes.bool,
|
||||||
theme: PropTypes.string,
|
theme: PropTypes.string,
|
||||||
|
logoDisabled: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(DefaultNavigationBar)
|
export default connect(mapStateToProps, mapDispatchToProps)(DefaultNavigationBar)
|
@ -38,6 +38,7 @@ const initialState = ImmutableMap({
|
|||||||
fontSize: 'normal',
|
fontSize: 'normal',
|
||||||
radiusSmallDisabled: false,
|
radiusSmallDisabled: false,
|
||||||
radiusCircleDisabled: false,
|
radiusCircleDisabled: false,
|
||||||
|
logoDisabled: false,
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user