diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 2817aee8d..3baf61ae1 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -312,8 +312,6 @@ class Status extends ImmutablePureComponent { return null; } - const moreStatusCount = this.props.status.replies; - const handlers = this.props.muted ? {} : { reply : this.handleHotkeyReply, favourite : this.handleHotkeyFavourite, diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index ab54aa494..936142f10 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -551,9 +551,9 @@ class Status extends ImmutablePureComponent { className={classNames('scrollable', { fullscreen })} ref={this.setRef} > -

ancestors:

+ {/*

ancestors:

*/} {ancestors} -

common:

+ {/*

common:

*/}
-

Descendants:

+ {/*

Descendants:

*/} {descendants} diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index 6149da970..2341caba4 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -31,6 +31,7 @@ import NavigationPanel from './navigation_panel'; import detectPassiveEvents from 'detect-passive-events'; import { scrollRight } from '../../../scroll'; +import LinkFooter from './link_footer'; const componentMap = { 'COMPOSE' : Compose, @@ -157,10 +158,10 @@ class ColumnsArea extends ImmutablePureComponent { const view = (index === columnIndex) ? React.cloneElement(this.props.children) : - ; + />); return (
; + >); const content = columnIndex !== -1 ? ( +
@@ -255,17 +257,20 @@ class ColumnsArea extends ImmutablePureComponent { loading={this.renderLoading(column.get('id'))} error={this.renderError} > - {SpecificComponent => (} + multiColumn {...other} + />)} + ); })} {React.Children.map(children, child => React.cloneElement(child, { multiColumn: true }))}
- ); + ) + ; } } diff --git a/app/javascript/mastodon/features/ui/components/compose_panel.js b/app/javascript/mastodon/features/ui/components/compose_panel.js index c7821f473..efc4ea0f8 100644 --- a/app/javascript/mastodon/features/ui/components/compose_panel.js +++ b/app/javascript/mastodon/features/ui/components/compose_panel.js @@ -2,15 +2,20 @@ import React from 'react'; import SearchContainer from 'mastodon/features/compose/containers/search_container'; import ComposeFormContainer from 'mastodon/features/compose/containers/compose_form_container'; import NavigationContainer from 'mastodon/features/compose/containers/navigation_container'; -import LinkFooter from './link_footer'; +import InstantMessaging from './messaging/instantMessaging'; +const showIM = false; const ComposePanel = () => (
- -
+ + {showIM && ( + + )} + +
); export default ComposePanel; diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js index 5ea4f7c3f..416886426 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.js +++ b/app/javascript/mastodon/features/ui/components/link_footer.js @@ -70,7 +70,7 @@ class LinkFooter extends React.PureComponent { .then((snowstorm) => { Window.snowstorm = snowstorm.default; this.state.snow = Window.snowstorm; - console.log('snowstorm', snowstorm); + console.log('this.state.snow ', this.state.snow); // snowstorm.start(); this.state.snowActive = true; }) @@ -79,7 +79,7 @@ class LinkFooter extends React.PureComponent { } - toggleSnow() { + toggleSnow = () => { console.log('toggle snow'); if (this.state.snow) { if (this.state.snowActive) { @@ -91,7 +91,7 @@ class LinkFooter extends React.PureComponent { } } - } + }; changeTheme(newTheme) { console.log('change theme en ', newTheme); @@ -104,6 +104,7 @@ class LinkFooter extends React.PureComponent { return (
+
{/*// TODO*/} @@ -127,7 +128,7 @@ class LinkFooter extends React.PureComponent { {this.state.enableChristmasSnow && (
@@ -136,17 +137,23 @@ class LinkFooter extends React.PureComponent { aria-hidden='true' />
-
Joyeuses fĂȘtes!
+ {isStaff && ( + + + + Trending hashtags + + )}
// ); - const contactlist = ['machin', 'bidule', 'chuck norris']; - const conversationList = ['machin', 'bidule', 'chuck norris']; + const renderedList = this.state.contactList.forEach(elem => { + return ( +
  • + {elem} +
  • + ); + }); return (
    -
    +
    Messaging box - {isStaff && - - Je suis admin oui oui - - } +
    -

    la liste de contacts

    -
      - {contactlist.forEach(elem => { - return ( -
    • - {elem} -
    • - ); - })} -
    +

    la liste de {this.state.contactList.lengh} contacts + + +

    + {this.state.showList && ( +
    +

    show list

    +
      + {renderedList} +
    +
    + )}
    -
    -
      - {conversationList.forEach(elem => { - return ( -
      - {elem} -
      - ); - })} - -
    -
    ); } diff --git a/app/javascript/mastodon/features/ui/components/messaging/conversations.js b/app/javascript/mastodon/features/ui/components/messaging/conversations.js index 25702dcc5..1be09cd89 100644 --- a/app/javascript/mastodon/features/ui/components/messaging/conversations.js +++ b/app/javascript/mastodon/features/ui/components/messaging/conversations.js @@ -1,24 +1,38 @@ import React from 'react'; -export default class Conversation extends React.PureComponent { +import PropTypes from 'prop-types'; - following = []; +const following = ['bidule', 'chose', 'truc']; + +export default class Conversation extends React.Component { + + static propTypes = { + following: PropTypes.array, + // conversations: PropTypes.array, + }; + + static defaultProps = { + following: following, + }; + + openConversationWith(name) { + console.log('openConversationWith name', name); + } render() { - const contactlist = this.following.foreEach(elem => ( -
  • - {/**/} - Machin {elem} - {/*
  • */} - {/*
    3 min
    */} - - )); - return contactlist; + return this.props.following.map(elem => - } + (
  • +
    + Machin {elem} +
    +
    3 min
    +
  • ), + ); + }; } diff --git a/app/javascript/mastodon/features/ui/components/messaging/messaging.js b/app/javascript/mastodon/features/ui/components/messaging/instantMessaging.js similarity index 76% rename from app/javascript/mastodon/features/ui/components/messaging/messaging.js rename to app/javascript/mastodon/features/ui/components/messaging/instantMessaging.js index 8a004dbce..34cf3c5d7 100644 --- a/app/javascript/mastodon/features/ui/components/messaging/messaging.js +++ b/app/javascript/mastodon/features/ui/components/messaging/instantMessaging.js @@ -1,13 +1,15 @@ import React from 'react'; import ContactsList from './contacts-list'; -export default class Messaging extends React.PureComponent { +export default class InstantMessaging extends React.PureComponent { // static propTypes = { - // following : ImmutablePropTypes.list, - // conversations: ImmutablePropTypes.list, + // following : PropTypes.array, + // conversations: PropTypes.array, + // }; + // static defaultProps = { + // threadsCompile: true, // }; - // openConversationWith(account) { // let conversationFound = account; // if conversation exist, focus on it @@ -49,9 +51,12 @@ export default class Messaging extends React.PureComponent { render() { return (
    - messagerie todo +
    - + messagerie todo + + +
    {/**/}
    ); diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.js b/app/javascript/mastodon/features/ui/components/navigation_panel.js index 0cc23e9c8..4775e9aa7 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.js +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.js @@ -7,26 +7,54 @@ import NotificationsCounterIcon from './notifications_counter_icon'; import FollowRequestsNavLink from './follow_requests_nav_link'; import ListPanel from './list_panel'; import TrendsContainer from 'mastodon/features/getting_started/containers/trends_container'; -import Messaging from './messaging/messaging'; - -const showMessaging = true; const NavigationPanel = () => (
    +
    + + - + + +
    +
    ( id='tabs_bar.notifications' defaultMessage='Notifications' /> - - - ( id='navigation_bar.direct' defaultMessage='Direct messages' /> + + +
    + ( {showTrends &&
    } {showTrends && } - {showMessaging && }
    ); diff --git a/app/javascript/mastodon/features/ui/components/tabs_bar.js b/app/javascript/mastodon/features/ui/components/tabs_bar.js index 1911da8ba..480812fed 100644 --- a/app/javascript/mastodon/features/ui/components/tabs_bar.js +++ b/app/javascript/mastodon/features/ui/components/tabs_bar.js @@ -8,19 +8,81 @@ import Icon from 'mastodon/components/icon'; import NotificationsCounterIcon from './notifications_counter_icon'; export const links = [ - , - , - , - , - , - , + , + , + , + , + , + , ]; -export function getIndex (path) { +export function getIndex(path) { return links.findIndex(link => link.props.to === path); } -export function getLink (index) { +export function getLink(index) { return links[index].props.to; } @@ -29,13 +91,13 @@ export default @injectIntl class TabsBar extends React.PureComponent { static propTypes = { - intl: PropTypes.object.isRequired, + intl : PropTypes.object.isRequired, history: PropTypes.object.isRequired, - } + }; setRef = ref => { this.node = ref; - } + }; handleClick = (e) => { // Only apply optimization for touch devices, which we assume are slower @@ -50,7 +112,6 @@ class TabsBar extends React.PureComponent { const nextTab = tabs.find(tab => tab.contains(e.target)); const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)]; - if (currentTab !== nextTab) { if (currentTab) { currentTab.classList.remove('active'); @@ -67,19 +128,28 @@ class TabsBar extends React.PureComponent { }); } - } + }; - render () { + render() { const { intl: { formatMessage } } = this.props; return (
    - + +
    -
    + +
    ); } diff --git a/app/javascript/styles/bliss/basics.scss b/app/javascript/styles/bliss/basics.scss index f9332caa3..2c9e13d18 100644 --- a/app/javascript/styles/bliss/basics.scss +++ b/app/javascript/styles/bliss/basics.scss @@ -160,3 +160,5 @@ button { height: 100%; } } + + diff --git a/app/javascript/styles/bliss/components.scss b/app/javascript/styles/bliss/components.scss index e1851857c..1c342162e 100644 --- a/app/javascript/styles/bliss/components.scss +++ b/app/javascript/styles/bliss/components.scss @@ -2663,6 +2663,28 @@ a.account__display-name { padding: 15px; text-decoration: none; + .timelines & { + display: inline-block; + width: 20%; + display: inline-block !important; + float: left; + text-align: center; + + span { + opacity: 0; + transition: opacity ease-in 1s; + + + } + + &:hover { + span { + opacity: 1; + transition: opacity ease-in 0.2s; + } + } + } + &:hover, &:focus, &:active { diff --git a/app/javascript/styles/bliss/footer.scss b/app/javascript/styles/bliss/footer.scss index 55786d424..46fc97453 100644 --- a/app/javascript/styles/bliss/footer.scss +++ b/app/javascript/styles/bliss/footer.scss @@ -137,6 +137,13 @@ } .getting-started__footer { + display: block; + position: fixed; + bottom: 0; + left: 1em; + width: 32vw; + z-index: 10; + text-align: right; ul { list-style-type: none; @@ -150,4 +157,8 @@ i { margin: 0.5ch; } + + a { + margin-left: 2ch; + } } diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index 819a92234..c5f770449 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -36,3 +36,21 @@ $media-modal-media-max-height: 80%; color: #222; } + +.spacer { + display: block; + padding: 2em; +} + +.small-texts { + .timelines { + .column-link { + + + } + + span { + display: none; + } + } +}