Skip to content

Commit

Permalink
remove remnants of old notifications system
Browse files Browse the repository at this point in the history
closes steemit#2103

also remove some other unused imports
  • Loading branch information
bnchdrff committed Jul 11, 2018
1 parent 7deb68c commit b14f481
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 207 deletions.
1 change: 0 additions & 1 deletion src/app/assets/stylesheets/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@import "./forms";

@import "./markdown";
@import "./notifications";
@import "src/app/components/all";

/* Small only */
Expand Down
5 changes: 0 additions & 5 deletions src/app/assets/stylesheets/notifications.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/app/components/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@import "./elements/Voting";
@import "./elements/FormattedAsset";
@import "./elements/ReplyEditor";
@import "./elements/NotifiCounter";
@import "./elements/DropdownMenu";
@import "./elements/VerticalMenu";
@import "./elements/HorizontalMenu";
Expand Down
24 changes: 0 additions & 24 deletions src/app/components/elements/NotifiCounter.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/components/elements/NotifiCounter.scss

This file was deleted.

37 changes: 0 additions & 37 deletions src/app/components/elements/NotifiCounter.story.jsx

This file was deleted.

6 changes: 2 additions & 4 deletions src/app/components/elements/WalletSubMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import NotifiCounter from 'app/components/elements/NotifiCounter';
import tt from 'counterpart';

export default ({ account_name }) => {
Expand All @@ -11,16 +10,15 @@ export default ({ account_name }) => {
to={`/@${account_name}/transfers`}
activeClassName="active"
>
{tt('g.balances')} <NotifiCounter fields="send,receive" />
{tt('g.balances')}
</Link>
</li>
<li>
<Link
to={`/@${account_name}/permissions`}
activeClassName="active"
>
{tt('g.permissions')}{' '}
<NotifiCounter fields="account_update" />
{tt('g.permissions')}
</Link>
</li>
<li>
Expand Down
11 changes: 0 additions & 11 deletions src/app/components/modules/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import DropdownMenu from 'app/components/elements/DropdownMenu';
import * as userActions from 'app/redux/UserReducer';
import * as appActions from 'app/redux/AppReducer';
import Userpic from 'app/components/elements/Userpic';
import VerticalMenu from 'app/components/elements/VerticalMenu';
import LoadingIndicator from 'app/components/elements/LoadingIndicator';
import NotifiCounter from 'app/components/elements/NotifiCounter';
import { SIGNUP_URL } from 'shared/constants';
import SteemLogo from 'app/components/elements/SteemLogo';
import normalizeProfile from 'app/utils/NormalizeProfile';
Expand Down Expand Up @@ -226,23 +223,18 @@ class Header extends React.Component {
link: feed_link,
icon: 'home',
value: tt('g.feed'),
addon: <NotifiCounter fields="feed" />,
},
{ link: account_link, icon: 'profile', value: tt('g.blog') },
{ link: comments_link, icon: 'replies', value: tt('g.comments') },
{
link: replies_link,
icon: 'reply',
value: tt('g.replies'),
addon: <NotifiCounter fields="comment_reply" />,
},
{
link: wallet_link,
icon: 'wallet',
value: tt('g.wallet'),
addon: (
<NotifiCounter fields="follow,send,receive,account_update" />
),
},
{
link: '#',
Expand Down Expand Up @@ -330,9 +322,6 @@ class Header extends React.Component {
<span title={username}>
<Userpic account={username} />
</span>
<div className="TopRightMenu__notificounter">
<NotifiCounter fields="total" />
</div>
</li>
</DropdownMenu>
)}
Expand Down
10 changes: 0 additions & 10 deletions src/app/components/modules/TopRightMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import Icon from 'app/components/elements/Icon';
import * as userActions from 'app/redux/UserReducer';
import * as appActions from 'app/redux/AppReducer';
import Userpic from 'app/components/elements/Userpic';
import VerticalMenu from 'app/components/elements/VerticalMenu';
import LoadingIndicator from 'app/components/elements/LoadingIndicator';
import NotifiCounter from 'app/components/elements/NotifiCounter';
import { SIGNUP_URL } from 'shared/constants';

const defaultNavigate = e => {
Expand Down Expand Up @@ -72,23 +70,18 @@ function TopRightMenu({
link: feed_link,
icon: 'home',
value: tt('g.feed'),
addon: <NotifiCounter fields="feed" />,
},
{ link: account_link, icon: 'profile', value: tt('g.blog') },
{ link: comments_link, icon: 'replies', value: tt('g.comments') },
{
link: replies_link,
icon: 'reply',
value: tt('g.replies'),
addon: <NotifiCounter fields="comment_reply" />,
},
{
link: wallet_link,
icon: 'wallet',
value: tt('g.wallet'),
addon: (
<NotifiCounter fields="follow,send,receive,account_update" />
),
},
{
link: '#',
Expand Down Expand Up @@ -128,9 +121,6 @@ function TopRightMenu({
<span title={username}>
<Userpic account={username} />
</span>
<div className="TopRightMenu__notificounter">
<NotifiCounter fields="total" />
</div>
</li>
</DropdownMenu>
)}
Expand Down
27 changes: 9 additions & 18 deletions src/app/components/modules/TopRightMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,28 @@ li.Header__userpic {
}
}

.TopRightMenu__notificounter {
position: absolute;
top: 4px;
right: 4px;
> .NotifiCounter {
display: block;
}
}

div.Header__top
{
li.Header__search {
padding: 0;
&:hover path, &:focus path {
@include themify($themes) {
fill: themed('textColorAccent');
}
fill: themed('textColorAccent');
}
}
&:visited path, &:active path {
@include themify($themes) {
fill: themed('textColorPrimary');
}
}
fill: themed('textColorPrimary');
}
}
> a {
padding: 14px;
}
> a path {
transition: 0.2s all ease-in-out;
@include themify($themes) {
fill: themed('textColorPrimary');
}
fill: themed('textColorPrimary');
}
}
}
li.Header__hamburger.toggle-menu {
Expand All @@ -66,8 +57,8 @@ li.submit-story {
padding: 0;
> a {
@include themify($themes) {
background: themed('textColorAccent');
}
background: themed('textColorAccent');
}
padding: 8px 24px;
margin: 0 6px;
color: white;
Expand Down
15 changes: 2 additions & 13 deletions src/app/components/pages/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import PostsList from 'app/components/cards/PostsList';
import { isFetchingOrRecentlyUpdated } from 'app/utils/StateFunctions';
import { repLog10 } from 'app/utils/ParsersAndFormatters.js';
import Tooltip from 'app/components/elements/Tooltip';
import VerticalMenu from 'app/components/elements/VerticalMenu';
import NotifiCounter from 'app/components/elements/NotifiCounter';
import DateJoinWrapper from 'app/components/elements/DateJoinWrapper';
import tt from 'counterpart';
import WalletSubMenu from 'app/components/elements/WalletSubMenu';
Expand Down Expand Up @@ -546,10 +544,7 @@ export default class UserProfile extends React.Component {
to={`/@${accountname}/recent-replies`}
activeClassName="active"
>
{tt('g.replies')}{' '}
{isMyAccount && (
<NotifiCounter fields="comment_reply" />
)}
{tt('g.replies')}
</Link>
</li>
{/*<li><Link to={`/@${accountname}/feed`} activeClassName="active">Feed</Link></li>*/}
Expand All @@ -574,10 +569,7 @@ export default class UserProfile extends React.Component {
return false;
}}
>
{tt('g.wallet')}{' '}
{isMyAccount && (
<NotifiCounter fields="send,receive,account_update" />
)}
{tt('g.wallet')}
</a>
</li>
{isMyAccount && (
Expand Down Expand Up @@ -652,9 +644,6 @@ export default class UserProfile extends React.Component {
count: followerCount,
})}
</Link>
{isMyAccount && (
<NotifiCounter fields="follow" />
)}
</span>
<span>
<Link to={`/@${accountname}`}>
Expand Down
15 changes: 5 additions & 10 deletions src/app/components/pages/UserProfile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

.UserProfile__top-nav {
background-color: $color-blue-dark;
background-color: $color-blue-dark;
padding: 0;
.menu {
background-color: transparent;
Expand All @@ -30,9 +30,9 @@
}
&.active {
@include themify($themes) {
background-color: themed('backgroundColor');
color: themed('textColorPrimary');
}
background-color: themed('backgroundColor');
color: themed('textColorPrimary');
}
z-index: 2;
font-weight: bold;
}
Expand Down Expand Up @@ -134,11 +134,6 @@
border-left: 1px solid #CCC;
&:first-child {border-left: none;}
}

.NotifiCounter {
position: relative;
top: -5px;
}
}
}

Expand Down Expand Up @@ -210,7 +205,7 @@
.articles {
padding: 1.5em 1.5em;
max-width: 1056px;
@include MQ(XL) {
@include MQ(XL) {
min-width: 1050px;
}
}
Expand Down
Loading

0 comments on commit b14f481

Please sign in to comment.