From 1c98dd283ea0eaed6c0a1822541c5c48b67d483b Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Sat, 8 Feb 2020 01:12:01 -0500 Subject: [PATCH] Progress --- app/javascript/gabsocial/common.js | 1 - .../gabsocial/components/account/account.js | 121 +++---- .../assets/{gab_logo => }/gab_logo.js | 2 - .../components/assets/gab_logo/gab_logo.scss | 9 - .../components/assets/gab_logo/index.js | 1 - .../autosuggest_account.js | 2 - .../autosuggest_emoji/autosuggest_emoji.js | 2 - .../autosuggest_textbox.js | 31 +- .../gabsocial/components/avatar/avatar.js | 42 +-- .../avatar_overlay/avatar_overlay.js | 2 - .../gabsocial/components/badge/badge.js | 25 -- .../gabsocial/components/badge/badge.scss | 23 -- .../gabsocial/components/badge/index.js | 1 - .../bundle_column_error.js | 2 - .../bundle_modal_error/bundle_modal_error.js | 2 - .../gabsocial/components/button/button.js | 2 +- .../gabsocial/components/column/column.js | 2 - .../column_back_button/column_back_button.js | 2 - .../components/column_header/column_header.js | 2 - .../column_header/home_column_header.js | 2 - .../column_header_setting_button.js | 2 - .../column_indicator/column_indicator.js | 2 - .../column_inline_form/column_inline_form.js | 2 - .../components/column_link/column_link.js | 2 - .../column_settings_heading.js | 2 - .../column_subheading/column_subheading.js | 2 - .../gabsocial/components/display_name.js | 36 ++ .../components/display_name/display_name.js | 27 -- .../components/display_name/display_name.scss | 16 - .../components/display_name/index.js | 1 - .../gabsocial/components/domain/domain.js | 2 - .../components/dropdown_menu/dropdown_menu.js | 2 - .../error_boundary/error_boundary.js | 2 - .../extended_video_player.js | 2 - .../floating_action_button.js | 2 - .../components/footer_bar/footer_bar.js | 2 - app/javascript/gabsocial/components/header.js | 332 ++++++++---------- .../gabsocial/components/icon/icon.js | 1 - .../components/icon_button/icon_button.js | 58 +-- .../components/image_loader/image_loader.js | 2 - .../intersection_observer_article.js | 2 - .../intersection_observer_article.scss | 2 +- .../gabsocial/components/link_footer.js | 3 +- .../components/load_more/load_more.js | 2 - .../components/media_gallery/media_gallery.js | 2 - .../focal_point_modal/focal_point_modal.js | 2 - .../modal/hotkeys_modal/hotkeys_modal.js | 2 - .../modal/media_modal/media_modal.js | 2 - .../unauthorized_modal/unauthorized_modal.js | 2 - .../modal/video_modal/video_modal.js | 2 - .../components/modal_base/modal_base.js | 2 - .../components/modal_loading/modal_loading.js | 2 - .../notification_counter.js | 2 - .../gabsocial/components/page_layout.js | 4 +- .../components/panel/groups_panel.js | 154 ++++++++ .../components/panel/panel_layout.js | 18 +- .../components/panel/progress_panel.js | 1 - .../gabsocial/components/panel/promo_panel.js | 85 ----- .../components/panel/trends_panel.js | 22 +- .../components/panel/who_to_follow_panel.js | 21 +- .../gabsocial/components/poll/poll.js | 2 - .../{progress_bar => }/progress_bar.js | 0 .../components/progress_bar/index.js | 1 - .../scrollable_list/scrollable_list.js | 2 - .../gabsocial/components/search/search.js | 26 +- .../components/search_popout/search_popout.js | 2 - .../setting_toggle/setting_toggle.js | 1 - .../gabsocial/components/status/status.js | 115 +++--- .../status_action_bar/status_action_bar.js | 155 +++++--- .../status_check_box/status_check_box.js | 2 - .../status_content/status_content.js | 68 ++-- .../components/status_quote/status_quote.js | 2 - .../timeline_compose_block.js | 8 +- .../timeline_queue_button_header.js | 2 - .../components/toggle_switch/toggle_switch.js | 2 - .../gabsocial/components/trending_item.js | 54 +++ .../components/trending_item/index.js | 1 - .../components/trending_item/trending_item.js | 49 --- .../trending_item/trending_item.scss | 55 --- .../components/upload_area/upload_area.js | 2 - .../gabsocial/components/user_panel.js | 154 ++++++++ .../gabsocial/components/user_panel/index.js | 1 - .../components/user_panel/user_panel.js | 95 ----- .../components/user_panel/user_panel.scss | 125 ------- .../components/verified_icon/index.js | 1 - .../components/verified_icon/verified_icon.js | 13 - .../verified_icon/verified_icon.scss | 28 -- .../zoomable_image/zoomable_image.js | 2 - .../account_gallery/account_gallery.js | 2 - .../components/media_item/media_item.js | 2 - .../components/header/header.js | 2 - .../components/inner_header/index.js | 2 +- .../components/inner_header/inner_header.js | 2 - .../components/moved_note/moved_note.js | 2 - .../profile_info_panel/profile_info_panel.js | 2 - .../character_counter/character_counter.js | 2 - .../components/compose_extra_button.js | 71 ++++ .../components/compose_form/compose_form.js | 81 ++--- .../emoji_picker_dropdown.js | 2 - .../navigation_bar/navigation_bar.js | 2 - .../compose/components/poll_button.js | 62 ++++ .../compose/components/poll_button/index.js | 1 - .../components/poll_button/poll_button.js | 53 --- .../compose/components/poll_form/poll_form.js | 2 - .../privacy_dropdown.js | 186 +++++----- .../components/privacy_dropdown/index.js | 1 - .../privacy_dropdown/privacy_dropdown.scss | 101 ------ .../reply_indicator/reply_indicator.js | 2 - .../components/schedule_post_dropdown.js | 89 +++-- .../compose/components/spoiler_button.js | 50 +++ .../components/text_icon_button/index.js | 1 - .../text_icon_button/text_icon_button.js | 33 -- .../text_icon_button/text_icon_button.scss | 32 -- .../compose/components/upload/upload.js | 2 - .../compose/components/upload_button.js | 87 +++++ .../compose/components/upload_button/index.js | 1 - .../components/upload_button/upload_button.js | 89 ----- .../upload_button/upload_button.scss | 5 - .../components/upload_form/upload_form.js | 2 - .../upload_progress/upload_progress.js | 2 - .../compose/components/warning/warning.js | 2 - .../gabsocial/features/compose/compose.js | 2 - .../containers/poll_button_container.js | 23 -- .../containers/privacy_dropdown_container.js | 23 -- .../schedule_post_dropdown_container.js | 21 -- .../containers/spoiler_button_container.js | 25 -- .../containers/upload_button_container.js | 18 - .../account_authorize/account_authorize.js | 2 - .../features/groups/sidebar_panel/index.js | 47 --- .../features/groups/sidebar_panel/item.js | 43 --- .../gabsocial/features/home_timeline/index.js | 3 - .../features/introduction/introduction.js | 2 - .../list_adder/components/list/list.js | 2 - .../features/list_adder/list_adder.js | 2 - .../features/list_editor/list_editor.js | 2 - .../components/notification/notification.js | 2 - .../features/status/components/card/card.js | 2 - .../detailed_status/detailed_status.js | 2 - .../detailed_status_action_bar.js | 2 - app/javascript/gabsocial/features/ui/ui.js | 3 - app/javascript/gabsocial/pages/group_page.js | 2 - app/javascript/gabsocial/pages/home_page.js | 40 +-- app/javascript/gabsocial/utils/numbers.js | 13 +- app/javascript/styles/global.css | 66 +++- package.json | 6 +- yarn.lock | 12 - 146 files changed, 1462 insertions(+), 1951 deletions(-) rename app/javascript/gabsocial/components/assets/{gab_logo => }/gab_logo.js (97%) delete mode 100644 app/javascript/gabsocial/components/assets/gab_logo/gab_logo.scss delete mode 100644 app/javascript/gabsocial/components/assets/gab_logo/index.js delete mode 100644 app/javascript/gabsocial/components/badge/badge.js delete mode 100644 app/javascript/gabsocial/components/badge/badge.scss delete mode 100644 app/javascript/gabsocial/components/badge/index.js create mode 100644 app/javascript/gabsocial/components/display_name.js delete mode 100644 app/javascript/gabsocial/components/display_name/display_name.js delete mode 100644 app/javascript/gabsocial/components/display_name/display_name.scss delete mode 100644 app/javascript/gabsocial/components/display_name/index.js create mode 100644 app/javascript/gabsocial/components/panel/groups_panel.js delete mode 100644 app/javascript/gabsocial/components/panel/promo_panel.js rename app/javascript/gabsocial/components/{progress_bar => }/progress_bar.js (100%) delete mode 100644 app/javascript/gabsocial/components/progress_bar/index.js create mode 100644 app/javascript/gabsocial/components/trending_item.js delete mode 100644 app/javascript/gabsocial/components/trending_item/index.js delete mode 100644 app/javascript/gabsocial/components/trending_item/trending_item.js delete mode 100644 app/javascript/gabsocial/components/trending_item/trending_item.scss create mode 100644 app/javascript/gabsocial/components/user_panel.js delete mode 100644 app/javascript/gabsocial/components/user_panel/index.js delete mode 100644 app/javascript/gabsocial/components/user_panel/user_panel.js delete mode 100644 app/javascript/gabsocial/components/user_panel/user_panel.scss delete mode 100644 app/javascript/gabsocial/components/verified_icon/index.js delete mode 100644 app/javascript/gabsocial/components/verified_icon/verified_icon.js delete mode 100644 app/javascript/gabsocial/components/verified_icon/verified_icon.scss create mode 100644 app/javascript/gabsocial/features/compose/components/compose_extra_button.js create mode 100644 app/javascript/gabsocial/features/compose/components/poll_button.js delete mode 100644 app/javascript/gabsocial/features/compose/components/poll_button/index.js delete mode 100644 app/javascript/gabsocial/features/compose/components/poll_button/poll_button.js rename app/javascript/gabsocial/features/compose/components/{privacy_dropdown => }/privacy_dropdown.js (64%) delete mode 100644 app/javascript/gabsocial/features/compose/components/privacy_dropdown/index.js delete mode 100644 app/javascript/gabsocial/features/compose/components/privacy_dropdown/privacy_dropdown.scss create mode 100644 app/javascript/gabsocial/features/compose/components/spoiler_button.js delete mode 100644 app/javascript/gabsocial/features/compose/components/text_icon_button/index.js delete mode 100644 app/javascript/gabsocial/features/compose/components/text_icon_button/text_icon_button.js delete mode 100644 app/javascript/gabsocial/features/compose/components/text_icon_button/text_icon_button.scss create mode 100644 app/javascript/gabsocial/features/compose/components/upload_button.js delete mode 100644 app/javascript/gabsocial/features/compose/components/upload_button/index.js delete mode 100644 app/javascript/gabsocial/features/compose/components/upload_button/upload_button.js delete mode 100644 app/javascript/gabsocial/features/compose/components/upload_button/upload_button.scss delete mode 100644 app/javascript/gabsocial/features/compose/containers/poll_button_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/privacy_dropdown_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/schedule_post_dropdown_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/spoiler_button_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/upload_button_container.js delete mode 100644 app/javascript/gabsocial/features/groups/sidebar_panel/index.js delete mode 100644 app/javascript/gabsocial/features/groups/sidebar_panel/item.js diff --git a/app/javascript/gabsocial/common.js b/app/javascript/gabsocial/common.js index 22146c0e..6397c4ae 100644 --- a/app/javascript/gabsocial/common.js +++ b/app/javascript/gabsocial/common.js @@ -3,7 +3,6 @@ import Rails from 'rails-ujs'; export function start() { - require('font-awesome/css/font-awesome.css'); require.context('../images/', true); try { diff --git a/app/javascript/gabsocial/components/account/account.js b/app/javascript/gabsocial/components/account/account.js index d1b92551..a326fecb 100644 --- a/app/javascript/gabsocial/components/account/account.js +++ b/app/javascript/gabsocial/components/account/account.js @@ -1,14 +1,13 @@ -import { Fragment } from 'react'; -import { Link } from 'react-router-dom'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import { defineMessages, injectIntl } from 'react-intl'; -import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me } from '../../initial_state'; -import Avatar from '../avatar/avatar'; -import DisplayName from '../display_name'; -import IconButton from '../icon_button'; - -import './account.scss'; +import { Fragment } from 'react' +import { NavLink } from 'react-router-dom' +import ImmutablePropTypes from 'react-immutable-proptypes' +import { defineMessages, injectIntl } from 'react-intl' +import ImmutablePureComponent from 'react-immutable-pure-component' +import { me } from '../../initial_state' +import Avatar from '../avatar/avatar' +import DisplayName from '../display_name' +import IconButton from '../icon_button' +import Icon from '../icon' const messages = defineMessages({ follow: { id: 'account.follow', defaultMessage: 'Follow' }, @@ -18,7 +17,7 @@ const messages = defineMessages({ unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' }, mute_notifications: { id: 'account.mute_notifications', defaultMessage: 'Mute notifications from @{name}' }, unmute_notifications: { id: 'account.unmute_notifications', defaultMessage: 'Unmute notifications from @{name}' }, -}); +}) export default @injectIntl class Account extends ImmutablePureComponent { @@ -34,37 +33,36 @@ class Account extends ImmutablePureComponent { actionIcon: PropTypes.string, actionTitle: PropTypes.string, onActionClick: PropTypes.func, - displayOnly: PropTypes.bool, - }; + } handleFollow = () => { - this.props.onFollow(this.props.account); + this.props.onFollow(this.props.account) } handleBlock = () => { - this.props.onBlock(this.props.account); + this.props.onBlock(this.props.account) } handleMute = () => { - this.props.onMute(this.props.account); + this.props.onMute(this.props.account) } handleMuteNotifications = () => { - this.props.onMuteNotifications(this.props.account, true); + this.props.onMuteNotifications(this.props.account, true) } handleUnmuteNotifications = () => { - this.props.onMuteNotifications(this.props.account, false); + this.props.onMuteNotifications(this.props.account, false) } handleAction = () => { - this.props.onActionClick(this.props.account); + this.props.onActionClick(this.props.account) } render() { - const { account, intl, hidden, onActionClick, actionIcon, actionTitle, displayOnly } = this.props; + const { account, intl, hidden, onActionClick, actionIcon, actionTitle } = this.props - if (!account) return null; + if (!account) return null if (hidden) { return ( @@ -72,29 +70,29 @@ class Account extends ImmutablePureComponent { {account.get('display_name')} {account.get('username')} - ); + ) } - let buttons; + let buttons if (onActionClick && actionIcon) { - buttons = ; + buttons = } else if (account.get('id') !== me && account.get('relationship', null) !== null) { - const following = account.getIn(['relationship', 'following']); - const requested = account.getIn(['relationship', 'requested']); - const blocking = account.getIn(['relationship', 'blocking']); - const muting = account.getIn(['relationship', 'muting']); + const following = account.getIn(['relationship', 'following']) + const requested = account.getIn(['relationship', 'requested']) + const blocking = account.getIn(['relationship', 'blocking']) + const muting = account.getIn(['relationship', 'muting']) if (requested) { - buttons = ; + buttons = } else if (blocking) { - buttons = ; + buttons = } else if (muting) { - let hidingNotificationsButton; + let hidingNotificationsButton if (account.getIn(['relationship', 'muting_notifications'])) { - hidingNotificationsButton = ; + hidingNotificationsButton = } else { - hidingNotificationsButton = ; + hidingNotificationsButton = } buttons = ( @@ -102,41 +100,44 @@ class Account extends ImmutablePureComponent { {hidingNotificationsButton} - ); + ) } else if (!account.get('moved') || following) { - buttons = ; + buttons = } } - if (displayOnly) { - return ( -
-
-
-
- -
- -
-
-
- ); - } - return ( -
-
- -
- - +
+
-
- {buttons} + + + + +
+ + + +
+ + +
- ); + ) } } diff --git a/app/javascript/gabsocial/components/assets/gab_logo/gab_logo.js b/app/javascript/gabsocial/components/assets/gab_logo.js similarity index 97% rename from app/javascript/gabsocial/components/assets/gab_logo/gab_logo.js rename to app/javascript/gabsocial/components/assets/gab_logo.js index 49274119..f80ab805 100644 --- a/app/javascript/gabsocial/components/assets/gab_logo/gab_logo.js +++ b/app/javascript/gabsocial/components/assets/gab_logo.js @@ -1,5 +1,3 @@ -import './gab_logo.scss' - const GabLogo = ({ width = '50px', height = '30px', diff --git a/app/javascript/gabsocial/components/assets/gab_logo/gab_logo.scss b/app/javascript/gabsocial/components/assets/gab_logo/gab_logo.scss deleted file mode 100644 index 0874d5f1..00000000 --- a/app/javascript/gabsocial/components/assets/gab_logo/gab_logo.scss +++ /dev/null @@ -1,9 +0,0 @@ -.gab-logo { - enable-background: new 0 0 50 30; - - &__path { - fill-rule: evenodd; - clip-rule: evenodd; - fill: $gab-brand-default; - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/assets/gab_logo/index.js b/app/javascript/gabsocial/components/assets/gab_logo/index.js deleted file mode 100644 index e68f094a..00000000 --- a/app/javascript/gabsocial/components/assets/gab_logo/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './gab_logo'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.js b/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.js index 441e02b2..6ff06fcb 100644 --- a/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.js +++ b/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.js @@ -4,8 +4,6 @@ import { makeGetAccount } from '../../selectors'; import Avatar from '../avatar'; import DisplayName from '../display_name'; -import './autosuggest_account.scss'; - const makeMapStateToProps = () => { const getAccount = makeGetAccount(); diff --git a/app/javascript/gabsocial/components/autosuggest_emoji/autosuggest_emoji.js b/app/javascript/gabsocial/components/autosuggest_emoji/autosuggest_emoji.js index 57629f4e..6d08233c 100644 --- a/app/javascript/gabsocial/components/autosuggest_emoji/autosuggest_emoji.js +++ b/app/javascript/gabsocial/components/autosuggest_emoji/autosuggest_emoji.js @@ -1,7 +1,5 @@ import unicodeMapping from '../emoji/emoji_unicode_mapping_light'; -import './autosuggest_emoji.scss'; - const assetHost = process.env.CDN_HOST || ''; export default class AutosuggestEmoji extends PureComponent { diff --git a/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js b/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js index fd8ebcac..c26d57e9 100644 --- a/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js +++ b/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js @@ -1,3 +1,4 @@ +import { Fragment } from 'react' import ImmutablePropTypes from 'react-immutable-proptypes'; import classNames from 'classnames'; import ImmutablePureComponent from 'react-immutable-pure-component'; @@ -7,8 +8,6 @@ import { textAtCursorMatchesToken } from '../../utils/cursor_token_match'; import AutosuggestAccount from '../autosuggest_account'; import AutosuggestEmoji from '../autosuggest_emoji'; -import './autosuggest_textbox.scss'; - export default class AutosuggestTextbox extends ImmutablePureComponent { static propTypes = { @@ -198,15 +197,13 @@ export default class AutosuggestTextbox extends ImmutablePureComponent { } if (textarea) { - return [ -
-
-