Ver a proveniência

Hide floating action button on thread views (#6859)

master
Eugen Rochko há 6 anos
committed by GitHub
ascendente
cometimento
f66a786029
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com 3 adições e 1 eliminações
  1. +3
    -1
      app/javascript/mastodon/features/ui/components/columns_area.js

+ 3
- 1
app/javascript/mastodon/features/ui/components/columns_area.js Ver ficheiro

@@ -28,6 +28,8 @@ const componentMap = {
'LIST': ListTimeline,
};

const shouldHideFAB = path => path.match(/^\/statuses\//);

@component => injectIntl(component, { withRef: true })
export default class ColumnsArea extends ImmutablePureComponent {

@@ -153,7 +155,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
this.pendingIndex = null;

if (singleColumn) {
const floatingActionButton = this.context.router.history.location.pathname === '/statuses/new' ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button'><i className='fa fa-pencil' /></Link>;
const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button'><i className='fa fa-pencil' /></Link>;

return columnIndex !== -1 ? [
<ReactSwipeableViews key='content' index={columnIndex} onChangeIndex={this.handleSwipe} onTransitionEnd={this.handleAnimationEnd} animateTransitions={shouldAnimate} springConfig={{ duration: '400ms', delay: '0s', easeFunction: 'ease' }} style={{ height: '100%' }}>


Carregando…
Cancelar
Guardar