From 3689c119f0ad8d523ab8deb3c2c8ed0a9c84db6e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 26 Dec 2016 21:33:51 +0100 Subject: Replacing follow requests in the settings area with in-UI column --- .../javascripts/components/features/getting_started/index.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/components/features/getting_started') diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx index bff75f86f..7c2491954 100644 --- a/app/assets/javascripts/components/features/getting_started/index.jsx +++ b/app/assets/javascripts/components/features/getting_started/index.jsx @@ -7,7 +7,8 @@ import { connect } from 'react-redux'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Public timeline' }, - settings: { id: 'navigation_bar.settings', defaultMessage: 'Settings' } + settings: { id: 'navigation_bar.settings', defaultMessage: 'Settings' }, + follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' } }); const mapStateToProps = state => ({ @@ -32,6 +33,7 @@ const GettingStarted = ({ intl, me }) => {
+
@@ -43,4 +45,9 @@ const GettingStarted = ({ intl, me }) => { ); }; +GettingStarted.propTypes = { + intl: React.PropTypes.object.isRequired, + me: React.PropTypes.number +}; + export default connect(mapStateToProps)(injectIntl(GettingStarted)); -- cgit From 5418df467d953316838b8eaee1ad90c33b3c15a6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 26 Dec 2016 21:55:52 +0100 Subject: Only display follow requests link in getting started window if account is locked --- .../components/features/getting_started/index.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'app/assets/javascripts/components/features/getting_started') diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx index 7c2491954..fdd594621 100644 --- a/app/assets/javascripts/components/features/getting_started/index.jsx +++ b/app/assets/javascripts/components/features/getting_started/index.jsx @@ -3,6 +3,7 @@ import ColumnLink from '../ui/components/column_link'; import { Link } from 'react-router'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import ImmutablePropTypes from 'react-immutable-proptypes'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, @@ -12,7 +13,7 @@ const messages = defineMessages({ }); const mapStateToProps = state => ({ - me: state.getIn(['meta', 'me']) + me: state.getIn(['accounts', state.getIn(['meta', 'me'])]) }); const hamburgerStyle = { @@ -27,13 +28,19 @@ const hamburgerStyle = { }; const GettingStarted = ({ intl, me }) => { + let followRequests = ''; + + if (me.get('locked')) { + followRequests = ; + } + return (
- + {followRequests}
@@ -47,7 +54,7 @@ const GettingStarted = ({ intl, me }) => { GettingStarted.propTypes = { intl: React.PropTypes.object.isRequired, - me: React.PropTypes.number + me: ImmutablePropTypes.map.isRequired }; export default connect(mapStateToProps)(injectIntl(GettingStarted)); -- cgit From e2c2fefc36cfa906034152289fe4c916e9a8d46b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 27 Dec 2016 23:30:11 +0100 Subject: Add illustration to getting started column --- .../javascripts/components/features/getting_started/index.jsx | 2 ++ app/assets/stylesheets/components.scss | 11 +++++++++++ db/schema.rb | 1 + 3 files changed, 14 insertions(+) (limited to 'app/assets/javascripts/components/features/getting_started') diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx index fdd594621..157bdf8f2 100644 --- a/app/assets/javascripts/components/features/getting_started/index.jsx +++ b/app/assets/javascripts/components/features/getting_started/index.jsx @@ -48,6 +48,8 @@ const GettingStarted = ({ intl, me }) => {

+ +
); }; diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss index 9f2d1217f..88808b085 100644 --- a/app/assets/stylesheets/components.scss +++ b/app/assets/stylesheets/components.scss @@ -332,6 +332,7 @@ .column { width: 330px; + position: relative; } .drawer { @@ -575,3 +576,13 @@ color: #fff; } } + +.getting-started__illustration { + width: 330px; + height: 235px; + background: image-url('mastodon-getting-started.png') no-repeat 0 0; + position: absolute; + pointer-events: none; + bottom: 0; + left: 0; +} \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 180d3b14d..b9236d42f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -189,6 +189,7 @@ ActiveRecord::Schema.define(version: 20161222204147) do t.boolean "sensitive", default: false t.integer "visibility", default: 0, null: false t.integer "in_reply_to_account_id" + t.string "conversation_uri" t.index ["account_id"], name: "index_statuses_on_account_id", using: :btree t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree t.index ["reblog_of_id"], name: "index_statuses_on_reblog_of_id", using: :btree -- cgit