Skip to content

Commit

Permalink
Style guide cleanup, whitespace, unlinked vars (#1086)
Browse files Browse the repository at this point in the history
* Style guide cleanup, whitespace, unlinked vars
* change http to https
  • Loading branch information
Mike authored and roadscape committed Feb 1, 2017
1 parent 89ec32a commit a3a041a
Showing 2 changed files with 10 additions and 28 deletions.
34 changes: 8 additions & 26 deletions app/components/cards/PostFull.jsx
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ import {immutableAccessor} from 'app/utils/Accessors';
import extractContent from 'app/utils/ExtractContent';
import TagList from 'app/components/elements/TagList';
import Author from 'app/components/elements/Author';
import {List} from 'immutable'
import {repLog10, parsePayoutAmount} from 'app/utils/ParsersAndFormatters';
import DMCAList from 'app/utils/DMCAList'
import PageViewsCounter from 'app/components/elements/PageViewsCounter';
@@ -23,7 +22,7 @@ import {serverApiRecordEvent} from 'app/utils/ServerApiClient';
import Userpic from 'app/components/elements/Userpic';
import { APP_DOMAIN } from 'config/client_config';

function loadFbSdk(d, s, id){
function loadFbSdk(d, s, id) {
return new Promise(resolve => {
window.fbAsyncInit = function () {
window.FB.init({
@@ -131,7 +130,7 @@ class PostFull extends React.Component {
}

shouldComponentUpdate(nextProps, nextState) {
const names = 'cont, post, username'.split(', ')
const names = 'cont, post, username'.split(', ');
return names.findIndex(name => this.props[name] !== nextProps[name]) !== -1 ||
this.state !== nextState
}
@@ -174,18 +173,6 @@ class PostFull extends React.Component {
window.open('https://www.linkedin.com/shareArticle?' + q, 'Share', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);
}

Steemd(e) {
serverApiRecordEvent('Steemd view', this.to);
e.preventDefault();
window.open(this.to,'_blank');
}

Steemdb(e) {
serverApiRecordEvent('Steemdb view', this.to);
e.preventDefault();
window.open(this.to,'_blank');
}

showPromotePost = () => {
const post_content = this.props.cont.get(this.props.post);
if (!post_content) return
@@ -235,19 +222,14 @@ class PostFull extends React.Component {
{link: '#', onClick: this.twitterShare, value: 'Twitter', title: 'Share on Twitter', icon: 'twitter'},
{link: '#', onClick: this.linkedInShare, value: 'LinkedIn', title: 'Share on Linkedin', icon: 'linkedin'},
];
const explore_menu = [
{link: 'http://steemd.com' + link, onClick: this.Steemd, value: 'Steemd', href: link, icon: 'steemd'},
{link: 'http://steemdb.com' + link, onClick: this.Steemdb, value: 'Steemdb', href: link, icon: 'steemdb'}
];

let explore_list = <FoundationDropdownMenu menu={explore_menu} label="View on" dropdownPosition="bottom" dropdownAlignment="right" />;
const Editor = this.state.showReply ? PostFullReplyEditor : PostFullEditEditor
const Editor = this.state.showReply ? PostFullReplyEditor : PostFullEditEditor;
let renderedEditor = null;
if (showReply || showEdit) {
renderedEditor = <div key="editor">
<Editor {...replyParams} type={this.state.showReply ? 'submit_comment' : 'edit'}
successCallback={() => {
this.setState({showReply: false, showEdit: false})
this.setState({showReply: false, showEdit: false});
saveOnShow(formId, null)
}}
onCancel={() => {
@@ -266,10 +248,10 @@ class PostFull extends React.Component {
let post_header = <h1 className="entry-title">
{content.title}
{full_power && <span title="Powered Up 100%"><Icon name="steem" /></span>}
</h1>
</h1>;
if(content.depth > 0) {
let parent_link = `/${content.category}/@${content.parent_author}/${content.parent_permlink}`;
let direct_parent_link
let direct_parent_link;
if(content.depth > 1) {
direct_parent_link = <li>
<Link to={parent_link}>
@@ -331,7 +313,7 @@ class PostFull extends React.Component {
{!readonly &&
<span className="PostFull__reply">
{showReplyOption && <a onClick={onShowReply}>Reply</a>}
{' '}{showEditOption && !showEdit && <a onClick={onShowEdit}>Edit</a>}
{' '}{showEditOption && !showEdit && <a onClick={onShowEdit}>Edit</a>}
{' '}{showDeleteOption && !showReply && <a onClick={onDeletePost}>Delete</a>}
</span>}
<span className="PostFull__responses">
@@ -397,4 +379,4 @@ const saveOnShow = (formId, type) => {
localStorage.removeItem('replyEditorData-' + formId + '-edit')
}
}
}
};
4 changes: 2 additions & 2 deletions app/components/modules/ExplorePost.jsx
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@ class ExplorePost extends Component {

render() {
const link = this.props.permlink;
const steemd = 'http://steemd.com' + link;
const steemdb = 'http://steemdb.com' + link;
const steemd = 'https://steemd.com' + link;
const steemdb = 'https://steemdb.com' + link;
const steemit = 'https://steemit.com' + link;
let text = this.state.copied == true ? 'Copied!' : 'COPY';
return (

0 comments on commit a3a041a

Please sign in to comment.