diff --git a/app/ResolveRoute.js b/app/ResolveRoute.js index b79ad0ecc..6d3c740d7 100644 --- a/app/ResolveRoute.js +++ b/app/ResolveRoute.js @@ -1,9 +1,9 @@ export const routeRegex = { PostsIndex: /^\/(@[\w\.\d-]+)\/feed\/?$/, UserProfile1: /^\/(@[\w\.\d-]+)\/?$/, - UserProfile2: /^\/(@[\w\.\d-]+)\/(blog|posts|comments|reputation|mentions|created|recent-replies|feed|followed|followers|settings)\/??(?:&?[^=&]*=[^=&]*)*$/, + UserProfile2: /^\/(@[\w\.\d-]+)\/(blog|posts|comments|reputation|mentions|created|recent-replies|discussions|feed|followed|followers|settings)\/??(?:&?[^=&]*=[^=&]*)*$/, UserProfile3: /^\/(@[\w\.\d-]+)\/[\w\.\d-]+/, - UserEndPoints: /^(blog|posts|comments|reputation|mentions|created|recent-replies|feed|followed|followers|settings)$/, + UserEndPoints: /^(blog|posts|comments|reputation|mentions|created|recent-replies|discussions|feed|followed|followers|settings)$/, CategoryFilters: /^\/(hot|responses|donates|forums|trending|promoted|allposts|allcomments|created|active)\/?$/ig, PostNoCategory: /^\/(@[\w\.\d-]+)\/([\w\d-]+)/, Post: /^\/([\w\d\-\/]+)\/(\@[\w\d\.-]+)\/([\w\d-]+)\/?($|\?)/, diff --git a/app/appUpdater.js b/app/appUpdater.js index 7a994b357..a054e8e73 100644 --- a/app/appUpdater.js +++ b/app/appUpdater.js @@ -1,14 +1,14 @@ import semver from 'semver' import tt from 'counterpart' -import fetchWithTimeout from 'shared/fetchWithTimeout' +import { fetchEx } from 'golos-lib-js/lib/utils' export async function checkUpdates() { const url = new URL( '/blogs-' + ($STM_Config.platform === 'linux' ? 'linux' : 'win'), $STM_Config.app_updater.host ).toString() - let res = await fetchWithTimeout(url, 3000) + let res = await fetchEx(url, { timeout: 3000 }) res = await res.text() const doc = document.createElement('html') doc.innerHTML = res diff --git a/app/assets/icons/dropdown-center.svg b/app/assets/icons/dropdown-center.svg new file mode 100644 index 000000000..499dd0da7 --- /dev/null +++ b/app/assets/icons/dropdown-center.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/icons/editor/coin.svg b/app/assets/icons/editor/coin.svg index 1b667bdfe..89032951d 100644 --- a/app/assets/icons/editor/coin.svg +++ b/app/assets/icons/editor/coin.svg @@ -1,3 +1,3 @@ - + diff --git a/app/assets/icons/hf/hf8.svg b/app/assets/icons/hf/hf8.svg index f45a182e2..b1c320ad5 100644 --- a/app/assets/icons/hf/hf8.svg +++ b/app/assets/icons/hf/hf8.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/client_config.js b/app/client_config.js index 5513850ad..a6e85bcd9 100644 --- a/app/client_config.js +++ b/app/client_config.js @@ -90,7 +90,6 @@ export const CATEGORIES = [ 'трейдинг', 'философия', 'фотография', - 'хобби', 'экономика', 'юмор', 'прочее', diff --git a/app/components/App.jsx b/app/components/App.jsx index ca78109b6..3dd0c0c2f 100644 --- a/app/components/App.jsx +++ b/app/components/App.jsx @@ -73,7 +73,7 @@ class App extends React.Component { const n = nextProps; return ( p.location !== n.location || - p.visitor !== n.visitor || + p.new_visitor !== n.new_visitor || p.flash !== n.flash || this.state !== nextState || p.nightmodeEnabled !== n.nightmodeEnabled @@ -427,7 +427,9 @@ export default connect( }; }, dispatch => ({ - loginUser: () => dispatch(user.actions.usernamePasswordLogin()), + loginUser: () => { + dispatch(user.actions.usernamePasswordLogin()) + }, logoutUser: () => dispatch(user.actions.logout()), depositSteem: () => { dispatch( diff --git a/app/components/all.scss b/app/components/all.scss index 015247c32..9a498ce24 100644 --- a/app/components/all.scss +++ b/app/components/all.scss @@ -37,7 +37,6 @@ @import "./elements/VerticalMenu"; @import "./elements/VotesAndComments"; @import "./elements/Voting"; -@import "./elements/WitnessSettings"; @import "./elements/common/YoutubePlayer/YoutubePlayer"; @import "./elements/common/TelegramPlayer/TelegramPlayer"; @import "./elements/common/Button/index"; @@ -48,6 +47,7 @@ @import "./elements/common/DialogManager/index"; @import "./elements/common/TooltipManager/index"; @import "./elements/market/CMCWidget"; +@import "./elements/donate/Donate"; @import "./elements/postEditor/MarkdownEditor/MarkdownEditor"; @import "./elements/postEditor/MarkdownEditorToolbar/index"; @import "./elements/postEditor/EditorSwitcher/EditorSwitcher"; diff --git a/app/components/cards/Comment.jsx b/app/components/cards/Comment.jsx index b9f7f146e..117f7b5ed 100644 --- a/app/components/cards/Comment.jsx +++ b/app/components/cards/Comment.jsx @@ -7,6 +7,7 @@ import cn from 'classnames'; import tt from 'counterpart'; import { FormattedPlural } from 'react-intl'; +import { isBlocked } from 'app/utils/blacklist' import { sortComments } from 'app/utils/comments'; import user from 'app/redux/User'; import transaction from 'app/redux/Transaction'; @@ -78,6 +79,11 @@ class CommentImpl extends PureComponent { if (content) { this._checkHide(content) + const sub_event = content.get('sub_event') + if (sub_event && !this.state.highlight && !this.wasHighlighted) { + this.setState({ highlight: true }) + this.wasHighlighted = true + } } } @@ -153,7 +159,7 @@ class CommentImpl extends PureComponent { let body = null; let controls = null; - if ($STM_Config.blocked_users.includes(comment.author)) { + if (isBlocked(comment.author, $STM_Config.blocked_users)) { return null; } else if (!this.state.collapsed && !hideBody) { body = ( @@ -168,8 +174,10 @@ class CommentImpl extends PureComponent { controls = this._renderControls(post, comment); } + const isHighlight = process.env.BROWSER && window.location.search.includes('&highlight=1') + if (!this.state.collapsed && comment.children > 0) { - if ((depth > 0 && depth % 8 === 0) && this.state.depthCollapsed) { + if ((depth > 0 && depth % 8 === 0) && this.state.depthCollapsed && !isHighlight) { const comment_permlink = `/${comment.category}/@${ comment.author }/${comment.permlink}`; @@ -220,6 +228,8 @@ class CommentImpl extends PureComponent { ); } + const { sub_event } = comment + return (
+
{controls}
@@ -356,6 +366,12 @@ class CommentImpl extends PureComponent { } } + onClick = () => { + this.setState({ + highlight: false + }) + } + onShowReply = () => { this.setState({ showReply: !this.state.showReply, showEdit: false }); }; diff --git a/app/components/cards/Comment.scss b/app/components/cards/Comment.scss index a4c3727d9..9a4bde1ca 100644 --- a/app/components/cards/Comment.scss +++ b/app/components/cards/Comment.scss @@ -127,7 +127,7 @@ .Comment__negative_group { color: $medium-gray; border-top: 1px solid $light-gray; - padding-top: 1rem; + padding-top: 3rem; clear: none; button { opacity: 0.35; diff --git a/app/components/cards/PostFull.jsx b/app/components/cards/PostFull.jsx index 201858ccb..7999dfd0e 100644 --- a/app/components/cards/PostFull.jsx +++ b/app/components/cards/PostFull.jsx @@ -21,6 +21,7 @@ import Author from 'app/components/elements/Author'; import Userpic from 'app/components/elements/Userpic'; import PostFormLoader from 'app/components/modules/PostForm/loader'; import CommentFormLoader from 'app/components/modules/CommentForm/loader'; +import { isBlocked } from 'app/utils/blacklist' import { getEditDraftPermLink } from 'app/utils/postForm'; import { proxifyImageUrl } from 'app/utils/ProxifyUrl'; import PostSummaryThumb from 'app/components/elements/PostSummaryThumb'; @@ -47,6 +48,9 @@ function TimeAuthorCategory({ content, authorRepLog10, showTags }) { function TimeAuthorCategoryLarge({ content, authorRepLog10 }) { return ( + + {content.views} +
@@ -346,7 +350,7 @@ class PostFull extends React.Component { const url = `/${category}/@${author}/${permlink}`; let contentBody; - if ($STM_Config.blocked_posts.includes(url) && !username) { + if (isBlocked(url, $STM_Config.blocked_posts) && !username) { contentBody = tt( 'postfull_jsx.this_post_is_not_available_due_to_breach_of_legislation' ); @@ -494,6 +498,17 @@ class PostFull extends React.Component { ) : null} + + + + {content.views} + + .eye { + margin-left: .4rem; + padding-left: .4rem; + border-left: 1px solid $medium-gray; + } > .Userpic { margin-top: -4px; float: left; diff --git a/app/components/cards/PostSummary.jsx b/app/components/cards/PostSummary.jsx index 711e1fad1..8f8c43cf1 100644 --- a/app/components/cards/PostSummary.jsx +++ b/app/components/cards/PostSummary.jsx @@ -1,29 +1,35 @@ -import React from 'react'; +import React from 'react' import PropTypes from 'prop-types' -import { Link } from 'react-router'; -import TimeAgoWrapper from 'app/components/elements/TimeAgoWrapper'; -import Icon from 'app/components/elements/Icon'; -import { connect } from 'react-redux'; -import transaction from 'app/redux/Transaction'; -import user from 'app/redux/User'; -import Reblog from 'app/components/elements/Reblog'; -import MuteAuthorInNew from 'app/components/elements/MuteAuthorInNew'; -import PinPost from 'app/components/elements/PinPost'; -import Voting from 'app/components/elements/Voting'; -import {immutableAccessor} from 'app/utils/Accessors'; -import extractContent from 'app/utils/ExtractContent'; -import { browserHistory } from 'react-router'; -import VotesAndComments from 'app/components/elements/VotesAndComments'; -import TagList from 'app/components/elements/TagList'; -import {authorNameAndRep} from 'app/utils/ComponentFormatters'; -import {Map} from 'immutable'; -import Author from 'app/components/elements/Author'; -import UserNames from 'app/components/elements/UserNames'; -import tt from 'counterpart'; -import { CHANGE_IMAGE_PROXY_TO_STEEMIT_TIME } from 'app/client_config'; -import { detransliterate } from 'app/utils/ParsersAndFormatters'; -import { proxifyImageUrl } from 'app/utils/ProxifyUrl'; +import { FormattedPlural } from 'react-intl' +import { connect } from 'react-redux' +import { Link, browserHistory } from 'react-router' +import {Map} from 'immutable' +import tt from 'counterpart' + +import { CHANGE_IMAGE_PROXY_TO_STEEMIT_TIME } from 'app/client_config' +import Author from 'app/components/elements/Author' +import Icon from 'app/components/elements/Icon' +import DialogManager from 'app/components/elements/common/DialogManager' +import MuteAuthorInNew from 'app/components/elements/MuteAuthorInNew' +import PinPost from 'app/components/elements/PinPost' import PostSummaryThumb from 'app/components/elements/PostSummaryThumb' +import Reblog from 'app/components/elements/Reblog' +import TagList from 'app/components/elements/TagList' +import TimeAgoWrapper from 'app/components/elements/TimeAgoWrapper' +import UserNames from 'app/components/elements/UserNames' +import VotesAndComments from 'app/components/elements/VotesAndComments' +import Voting from 'app/components/elements/Voting' +import g from 'app/redux/GlobalReducer' +import transaction from 'app/redux/Transaction' +import user from 'app/redux/User' +import {immutableAccessor} from 'app/utils/Accessors' +import { authRegisterUrl, } from 'app/utils/AuthApiClient' +import { isBlocked } from 'app/utils/blacklist' +import extractContent from 'app/utils/ExtractContent' +import {authorNameAndRep} from 'app/utils/ComponentFormatters' +import { addHighlight, unsubscribePost } from 'app/utils/NotifyApiClient' +import { detransliterate } from 'app/utils/ParsersAndFormatters' +import { proxifyImageUrl } from 'app/utils/ProxifyUrl' import { walletUrl } from 'app/utils/walletUtils' function isLeftClickEvent(event) { @@ -34,11 +40,15 @@ function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) } -function navigate(e, onClick, post, url, isForum, isSearch) { +function navigate(e, onClick, post, url, isForum, isSearch, warn) { if (isForum || isSearch) return; + if (warn) { + e.preventDefault() + return + } if (isModifiedEvent(e) || !isLeftClickEvent(e)) return; - e.preventDefault(); + e.preventDefault() if (onClick) onClick(post, url); else browserHistory.push(url); } @@ -48,6 +58,7 @@ class PostSummary extends React.Component { post: PropTypes.string.isRequired, pending_payout: PropTypes.string.isRequired, total_payout: PropTypes.string.isRequired, + event_count: PropTypes.number, content: PropTypes.object.isRequired, currentCategory: PropTypes.string, thumbSize: PropTypes.string, @@ -60,13 +71,13 @@ class PostSummary extends React.Component { constructor() { super(); this.state = {revealNsfw: false} - this.onRevealNsfw = this.onRevealNsfw.bind(this) } shouldComponentUpdate(props, state) { return props.thumbSize !== this.props.thumbSize || props.pending_payout !== this.props.pending_payout || props.total_payout !== this.props.total_payout || + props.event_count !== this.props.event_count || props.username !== this.props.username || props.nsfwPref !== this.props.nsfwPref || state.revealNsfw !== this.state.revealNsfw || @@ -75,9 +86,26 @@ class PostSummary extends React.Component { props.hide !== this.props.hide } - onRevealNsfw(e) { - e.preventDefault(); - this.setState({revealNsfw: true}) + componentDidUpdate(prevProps) { + if (this.state.revealNsfw && !this.props.username && prevProps.username) { + this.setState({ revealNsfw: false }) + } + } + + onClick = (e) => { + if (this.isNsfwWarn()) { + e.preventDefault() + const { username, showLogin } = this.props + if (!username) { + DialogManager.info( + {tt('poststub.login')} +  {tt('g.or')}  + {tt('poststub.sign_up')}. + ) + return + } + this.setState({revealNsfw: true}) + } } onDeleteReblog = (account, post) => { @@ -88,6 +116,33 @@ class PostSummary extends React.Component { }) } + unsubscribe = async (e) => { + e.preventDefault() + + const { username, content } = this.props + + if (!username) return + + const author = content.get('author') + const permlink = content.get('permlink') + + try { + await unsubscribePost(username, author, permlink) + } catch (err) { + alert(err.message || err) + return + } + + this.props.unsubscribe(username, author, permlink) + } + + isNsfwWarn = () => { + const { content, nsfwPref, username } = this.props + const { isNsfw, } = content.get('stats', Map()).toJS() + const myPost = username === content.get('author') + return (isNsfw && nsfwPref === 'warn' && !myPost && !this.state.revealNsfw) + } + render() { const {currentCategory, thumbSize, ignore, onClick} = this.props; const {post, content, pending_payout, total_payout, cashout_time, blockEye} = this.props; @@ -97,7 +152,7 @@ class PostSummary extends React.Component { const myPost = username === content.get('author') - if ($STM_Config.blocked_users.includes(content.get('author'))) { + if (isBlocked(content.get('author'), $STM_Config.blocked_users)) { return null; } @@ -136,6 +191,12 @@ class PostSummary extends React.Component { return null } + const isPublic = currentCategory !== 'blog' && currentCategory !== 'feed' + if (isBlocked(content.get('url'), $STM_Config.blocked_posts) + && (!username || isPublic)) { + return null + } + const p = extractContent(immutableAccessor, content); const nsfwTags = ['nsfw', 'ru--mat', '18+'] let nsfwTitle = nsfwTags[0] @@ -193,11 +254,27 @@ class PostSummary extends React.Component { const link_target = (is_forum || from_search) ? '_blank' : undefined; - let content_body =
- navigate(e, onClick, post, title_link_url, is_forum, from_search)}>{desc} + let highlight + if (currentCategory === 'discussions') { + highlight = { author: content.get('author'), permlink: content.get('permlink') } + title_link_url = addHighlight(title_link_url) + comments_link = addHighlight(comments_link) + } + + const warn = this.isNsfwWarn() + const filterClasses = [] + if (warn) filterClasses.push('nsfw-text') + + const stubText = warn && !username + + const nsfwStub = 'Not safe for work 18+' + + let content_body = ; - const warn = (isNsfw && nsfwPref === 'warn' && !myPost); const promosumm = tt('g.promoted_post') + content.get('promoted'); let worker_post = content.get('has_worker_request') @@ -207,20 +284,22 @@ class PostSummary extends React.Component { let total_search = content.get('total_search') - let content_title =

- navigate(e, onClick, post, title_link_url, is_forum, from_search)}> - {title_text} + const visitedClassName = this.props.visited ? 'PostSummary__post-visited ' : '' + + let content_title = + navigate(e, onClick, post, title_link_url, is_forum, from_search, warn)}> + {stubText ? nsfwStub : title_text} {isOnlyblog && {tt('g.for_followers')}} {isOnlyapp && {tt('g.only_app')}} {warn && {detransliterate(nsfwTitle)}} {worker_post && {tt('workers.worker_post')}} {promoted_post && {tt('g.promoted_title')}} -

; + ; // author and category let author_category = - navigate(e, onClick, post, title_link_url, is_forum, from_search)}> + navigate(e, onClick, post, title_link_url, is_forum, from_search, warn)}> {' '} {blockEye && } @@ -241,14 +320,13 @@ class PostSummary extends React.Component {
- if(isNsfw) { - if(nsfwPref === 'hide' && !myPost) { + if(isNsfw && !myPost) { + if(nsfwPref === 'hide') { // user wishes to hide these posts entirely return null; } } - const visitedClassName = this.props.visited ? 'PostSummary__post-visited ' : ''; let thumb = null; if(pictures && p.image_link) { const size = (thumbSize == 'mobile') ? '800x600' : '256x512' @@ -267,7 +345,7 @@ class PostSummary extends React.Component { src={url} href={title_link_url} target={link_target} - onClick={e => navigate(e, onClick, post, title_link_url, is_forum, from_search)} /> + onClick={e => navigate(e, onClick, post, title_link_url, is_forum, from_search, warn)} /> } const commentClasses = [] if(gray || ignore) commentClasses.push('downvoted') // rephide @@ -281,11 +359,39 @@ class PostSummary extends React.Component { return total_search } + let newReplies = null + let unsubscribe = null + if (currentCategory === 'discussions') { + const eventCount = content.get('event_count') + if (eventCount) { + const commFew = tt('comment_jsx.N_comments_2', { N: eventCount }) + const commMany = tt('comment_jsx.N_comments', { N: eventCount }) + newReplies = navigate(e, onClick, post, title_link_url, is_forum, from_search, warn)}> + {'+'} + + + } + unsubscribe = + + + + + } + + content_title =

+ {content_title}{newReplies}{unsubscribe} +

+ return ( -
+
{total_search} {reblogged_by} -
+
{content_title}
@@ -295,7 +401,7 @@ class PostSummary extends React.Component { {thumb}
-
+
{content_title}
{content_body} @@ -312,16 +418,18 @@ export default connect( const content = state.global.get('content').get(post); let pending_payout = 0; let total_payout = 0; + let event_count = 0 let gray, ignore if (content) { pending_payout = content.get('pending_payout_value'); total_payout = content.get('total_payout_value'); + event_count = content.get('event_count') const stats = content.get('stats', Map()).toJS() gray = stats.gray ignore = stats.ignore } return { - post, content, gray, ignore, pending_payout, total_payout, + post, content, gray, ignore, pending_payout, total_payout, event_count, username: state.user.getIn(['current', 'username']) || state.offchain.get('account') }; }, @@ -329,6 +437,9 @@ export default connect( (dispatch) => ({ dispatchSubmit: data => { dispatch(user.actions.usernamePasswordLogin({...data})) }, clearError: () => { dispatch(user.actions.loginError({error: null})) }, + unsubscribe: (account, author, permlink) => { + dispatch(g.actions.unsubscribePost({ account, author, permlink })) + }, deleteReblog: (account, author, permlink, successCallback, errorCallback) => { const json = ['delete_reblog', {account, author, permlink}] dispatch(transaction.actions.broadcastOperation({ @@ -343,5 +454,14 @@ export default connect( successCallback, errorCallback, })) }, + showLogin: e => { + if (e) e.preventDefault() + try { + document.getElementsByClassName('DialogManager__shade')[0].click() + } catch (err) { + console.error(err) + } + dispatch(user.actions.showLogin()) + }, }) )(PostSummary) diff --git a/app/components/cards/PostSummary.scss b/app/components/cards/PostSummary.scss index 8ae51e31e..362c909b5 100644 --- a/app/components/cards/PostSummary.scss +++ b/app/components/cards/PostSummary.scss @@ -11,11 +11,8 @@ ul.PostsList__summaries { clear: left; @include clearfix; - .PostSummary__nsfw-warning { - border: 1px solid $medium-gray; - border-radius: 0.5rem; - padding: 0.75rem 2rem; - min-height: 80px; + .nsfw-text { + filter: blur(3px); .PostSummary__footer { margin-top: 0.2rem; .Reblog__button {display: none;} @@ -26,6 +23,10 @@ ul.PostsList__summaries { } } + .nsfw-img { + filter: blur(5px); + } + .nsfw_post { color: #C00; border: 1px solid #C00; @@ -60,6 +61,14 @@ ul.PostsList__summaries { } } +.PostSummary__replies { + font-weight: bold; + color: red; + padding-left: 10px; + font-size: 80%; + text-decoration: none; +} + .PostSummary__image { float: left; width: 130px; @@ -171,6 +180,25 @@ ul.PostsList__summaries { } } } + .unsubscribe { + > a { + color: $medium-gray; + } + > a:visited { + color: $medium-gray; + } + padding-left: 0.5rem; + font-size: 90%; + span { + margin-left: 0.5rem; + margin-bottom: 0.5rem; + } + &:hover { + path { + fill: red; + } + } + } } .PostSummary__collapse { visibility: hidden; diff --git a/app/components/elements/ClaimInvite.jsx b/app/components/elements/ClaimInvite.jsx deleted file mode 100644 index 5177dd3a3..000000000 --- a/app/components/elements/ClaimInvite.jsx +++ /dev/null @@ -1,173 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import shouldComponentUpdate from 'app/utils/shouldComponentUpdate' -import {countDecimals, formatAmount} from 'app/utils/ParsersAndFormatters'; -import {validate_account_name} from 'app/utils/ChainValidation' -import g from 'app/redux/GlobalReducer' -import {connect} from 'react-redux'; -import transaction from 'app/redux/Transaction' -import user from 'app/redux/User'; -import tt from 'counterpart'; -import reactForm from 'app/utils/ReactForm'; -import {PrivateKey} from 'golos-lib-js/lib/auth/ecc'; -import LoadingIndicator from 'app/components/elements/LoadingIndicator'; - -class ClaimInvite extends Component { - static propTypes = { - // HTML - account: PropTypes.object.isRequired, - // Redux - isMyAccount: PropTypes.bool.isRequired, - accountName: PropTypes.string.isRequired, - } - - constructor(props) { - super() - this.shouldComponentUpdate = shouldComponentUpdate(this, 'ClaimInvite') - this.state = { - errorMessage: '', - successMessage: '', - } - this.initForm(props) - } - - initForm(props) { - const fields = ['invite_secret']; - const validateSecret = (secret) => { - try { - PrivateKey.fromWif(secret); - return null; - } catch (e) { - return tt('invites_jsx.claim_wrong_secret'); - } - }; - reactForm({ - name: 'invite', - instance: this, fields, - initialValues: {}, - validation: values => ({ - invite_secret: - ! values.invite_secret ? tt('g.required') : validateSecret(values.invite_secret) - }) - }) - this.handleSubmitForm = - this.state.invite.handleSubmit(args => this.handleSubmit(args)) - } - - onChangeInviteSecret = (e) => { - const {value} = e.target - this.state.invite_secret.props.onChange(value.trim()) - } - - handleSubmit = ({updateInitialValues}) => { - const {claimInvite, accountName} = this.props - const {invite_secret} = this.state - this.setState({loading: true}); - claimInvite({invite_secret, accountName, - errorCallback: (e) => { - if (e === 'Canceled') { - this.setState({ - loading: false, - errorMessage: '' - }) - } else { - console.log('claimInvite ERROR', e) - this.setState({ - loading: false, - errorMessage: e.includes('Missing') ? tt('invites_jsx.claim_wrong_secret_fatal') : tt('g.server_returned_error') - }) - } - }, - successCallback: () => { - this.setState({ - loading: false, - errorMessage: '', - successMessage: tt('invites_jsx.success_claim'), - }) - // remove successMessage after a while - setTimeout(() => this.setState({successMessage: ''}), 4000) - }}) - } - - render() { - const {props: {account, isMyAccount}} = this - const {invite_secret, loading, successMessage, errorMessage} = this.state - const {submitting, valid} = this.state.invite - - return (
-
-
-
-

{tt('invites_jsx.claim_invite')}

-
-
- -
-
- {tt('invites_jsx.private_key')} -
- this.onChangeInviteSecret(e)} - /> -
- {invite_secret.touched && invite_secret.blur && invite_secret.error && -
{invite_secret.error} 
- } -
-
- -
-
- {loading &&
} - {!loading && } - {' '}{ - errorMessage - ? {errorMessage} - : successMessage - ? {successMessage} - : null - } -
-
-
-
-
) - } -} - -export default connect( - (state, ownProps) => { - const {account} = ownProps - const accountName = account.get('name') - const current = state.user.get('current') - const username = current && current.get('username') - const isMyAccount = username === accountName - return {...ownProps, isMyAccount, accountName} - }, - dispatch => ({ - claimInvite: ({ - invite_secret, accountName, successCallback, errorCallback - }) => { - const operation = { - initiator: accountName, - receiver: accountName, - invite_secret: invite_secret.value - } - - const success = () => { - dispatch(user.actions.getAccount()) - successCallback() - } - - dispatch(transaction.actions.broadcastOperation({ - type: 'invite_claim', - accountName, - operation, - successCallback: success, - errorCallback - })) - } - }) -)(ClaimInvite) diff --git a/app/components/elements/ConvertToSteem.jsx b/app/components/elements/ConvertToSteem.jsx deleted file mode 100644 index f00f04050..000000000 --- a/app/components/elements/ConvertToSteem.jsx +++ /dev/null @@ -1,251 +0,0 @@ -/* eslint react/prop-types: 0 */ -import React from 'react' -import ReactDOM from 'react-dom'; -import { connect, } from 'react-redux'; -import { Formik, Field, ErrorMessage, } from 'formik'; -import transaction from 'app/redux/Transaction' -import shouldComponentUpdate from 'app/utils/shouldComponentUpdate' -import Icon from 'app/components/elements/Icon' -import TransactionError from 'app/components/elements/TransactionError' -import LoadingIndicator from 'app/components/elements/LoadingIndicator' -import tt from 'counterpart'; -import { DEBT_TICKER, LIQUID_TOKEN, LIQUID_TICKER } from 'app/client_config'; -import { Asset } from 'golos-lib-js/lib/utils'; - -function floatToAsset(value, from) { - value = parseFloat(value); - if (isNaN(value)) { - return Asset(0, 3, from); - } - value = value.toFixed(3); - return Asset(value + ' ' + from); -} - -function calcFee(value, cprops) { - const percent = cprops ? cprops.toJS().convert_fee_percent : 0; - const fee = value.mul(parseInt(percent)).div(10000); - return fee; -} - -class ConvertToSteem extends React.Component { - constructor(props) { - super() - const { from, to } = props; - this.state = { - fee: Asset(0, 3, from), - toAmount: Asset(0, 3, to), - }; - this.amtRef = React.createRef(); - } - - componentDidMount() { - this.amtRef.current.focus(); - } - - shouldComponentUpdate = shouldComponentUpdate(this, 'ConvertToSteem') - - validate = (values) => { - const { maxBalance, from, cprops, } = this.props; - const errors = {}; - if (values.amount) { - if (isNaN(values.amount) - || parseFloat(values.amount) <= 0) { - errors.amount = tt('g.required'); - } else if (parseFloat(values.amount) > maxBalance) { - errors.amount = tt('g.insufficient_balance'); - } else if (from === 'GOLOS' && !calcFee(floatToAsset(values.amount), cprops).amount) { - errors.amount = tt('converttosteem_jsx.too_low_amount'); - } - } else { - errors.amount = tt('g.required'); - } - return errors; - }; - - _onSubmit = (values, { setSubmitting, }) => { - const { convert, owner, from, to, onClose } = this.props; - const { amount } = values; - const success = () => { - if (onClose) onClose(); - setSubmitting(false); - }; - const error = () => { - setSubmitting(false); - }; - convert(owner, amount, from, to, success, error); - }; - - onAmountChange = (e, values, handle) => { - let value = e.target.value.trim().toLowerCase(); - if (isNaN(value) || parseFloat(value) < 0) { - e.target.value = values.amount || ''; - return; - } - e.target.value = value; - - const { from, to, feed, cprops } = this.props; - let fee = Asset(0, 3, from); - let toAmount = Asset(0, 3, to); - let { base, quote } = feed; - base = Asset(base); - quote = Asset(quote); - value = floatToAsset(parseFloat(value), from); - if (from === 'GOLOS' && cprops) { - fee = calcFee(value, cprops); - value.amount = value.amount - fee.amount; - } - if (value.symbol === base.symbol) { - toAmount = value.mul(quote).div(base); - } else { - toAmount = value.mul(base).div(quote); - } - toAmount.symbol = to; - this.setState({ toAmount, fee, }); - - return handle(e); - }; - - render() { - const DEBT_TOKEN = tt('token_names.DEBT_TOKEN') - - const { from, to, cprops, onClose, } = this.props - const { fee, toAmount, } = this.state - - let feePercent = 0; - if (cprops && from === 'GOLOS') { - feePercent = parseFloat(cprops.get('convert_fee_percent')) / 100; - } - - return ( - - {({ - handleSubmit, isSubmitting, errors, values, handleChange, - }) => ( -
-
-
-

{tt('converttosteem_jsx.title_FROM_TO', {FROM: from, TO: to})}

-

{tt('converttosteem_jsx.this_will_take_days')} - -

-

{tt('converttosteem_jsx.tokens_will_be_unavailable')}

-
-
-
-
{tt('g.amount')}
-
-
- this.amtRef.current = input} - autoComplete='off' - disabled={isSubmitting} - onChange={e => this.onAmountChange(e, values, handleChange)} - /> - - - -
- -
-
-
-
- {feePercent ? - {tt('converttosteem_jsx.fee')} - - {fee.toString()} - {' '} - ({feePercent}%). - : {tt('converttosteem_jsx.no_fee')} - } -
-
-
-
- {tt('converttosteem_jsx.you_will_receive')} - - {tt('g.approximately')} - {' '} - {toAmount.toString()} - . - -
-
-
-
- - {isSubmitting && } -
- - -
-
-
-
- )}
- ) - } -} -export default connect( - // mapStateToProps - (state, ownProps) => { - const { from, to } = ownProps; - const current = state.user.get('current'); - const username = current.get('username'); - const account = state.global.getIn(['accounts', username]); - const balance = account.get('balance'); - const sbd_balance = account.get('sbd_balance'); - const cprops = state.global.get('cprops'); - const max = parseFloat(Asset(from === DEBT_TICKER ? sbd_balance : balance).amountFloat); - return { - ...ownProps, - owner: username, - feed: state.global.get('feed_price').toJS(), - cprops, - maxBalance: max, - }; - }, - // mapDispatchToProps - dispatch => ({ - convert: (owner, amt, from, to, success, error) => { - const amount = [parseFloat(amt).toFixed(3), from].join(' ') - const requestid = Math.floor(Date.now() / 1000) - const conf = tt('postfull_jsx.in_week_convert_DEBT_TOKEN_to_LIQUID_TOKEN', - { amount: amount.split(' ')[0], DEBT_TOKEN: from, LIQUID_TOKEN: to, }) - dispatch(transaction.actions.broadcastOperation({ - type: 'convert', - operation: { - owner, - requestid, - amount, - __config: {title: tt('converttosteem_jsx.confirm_title')} - }, - confirm: conf + '?', - - successCallback: () => { - success() - dispatch({type: 'ADD_NOTIFICATION', payload: - {key: 'convert_sd_to_steem_' + Date.now(), - message: tt('g.order_placed') + ': ' + conf, - dismissAfter: 5000} - }) - }, - errorCallback: () => {error()} - })) - }, - }) -)(ConvertToSteem) diff --git a/app/components/elements/CreateInvite.jsx b/app/components/elements/CreateInvite.jsx deleted file mode 100644 index 02bb13202..000000000 --- a/app/components/elements/CreateInvite.jsx +++ /dev/null @@ -1,370 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import shouldComponentUpdate from 'app/utils/shouldComponentUpdate' -import {countDecimals, formatAsset, formatAmount} from 'app/utils/ParsersAndFormatters'; -import g from 'app/redux/GlobalReducer' -import {connect} from 'react-redux'; -import transaction from 'app/redux/Transaction' -import user from 'app/redux/User'; -import tt from 'counterpart'; -import reactForm from 'app/utils/ReactForm'; -import {PrivateKey} from 'golos-lib-js/lib/auth/ecc'; -import LoadingIndicator from 'app/components/elements/LoadingIndicator'; -import CopyToClipboard from 'react-copy-to-clipboard'; -import Icon from 'app/components/elements/Icon'; -import { authRegisterUrl, } from 'app/utils/AuthApiClient'; - -class CreateInvite extends Component { - static propTypes = { - // HTML - account: PropTypes.object.isRequired, - // Redux - isMyAccount: PropTypes.bool.isRequired, - accountName: PropTypes.string.isRequired, - } - - constructor(props) { - super() - this.shouldComponentUpdate = shouldComponentUpdate(this, 'CreateInvite') - this.state = { - errorMessage: '', - successMessage: '', - } - this.initForm(props) - } - - componentDidMount() { - this.generateKeys() - this.setDefaultAmount(); - } - - componentDidUpdate(prevProps) { - if (this.props.min_invite_balance !== prevProps.min_invite_balance) { - this.setDefaultAmount(); - } - } - - setDefaultAmount = () => { - const { min_invite_balance } = this.props; - const { amount } = this.state; - if (min_invite_balance && !amount.value) { - const val = (parseInt(min_invite_balance) + 1).toString() - amount.props.onChange(val) - } - } - - updatePrivateKey = (pk) => { - this.state.private_key.props.onChange(pk); - - const register_link = authRegisterUrl() + `?invite=${pk}`; - this.state.register_link.props.onChange(register_link); - } - - generateKeys = () => { - const pk = PrivateKey.fromSeed(Math.random().toString()); - this.updatePrivateKey(pk.toString()) - this.setState({ - createdInvite: '', - }); - } - - initForm(props) { - const insufficientFunds = (amount) => { - const balanceValue = props.account.get('balance') - if(!balanceValue) return false - return parseFloat(amount) > parseFloat(balanceValue.split(' ')[0]) - } - - const meetsMinimum = (amount) => { - const minValue = this.props.min_invite_balance - if (!minValue) return false - return parseFloat(amount) < parseFloat(minValue.split(' ')[0]) - } - - const validateSecret = (secret) => { - try { - PrivateKey.fromWif(secret); - return null; - } catch (e) { - return tt('invites_jsx.claim_wrong_secret_format'); - } - }; - - const fields = ['private_key', 'register_link', 'amount', 'is_referral:checked'] - reactForm({ - name: 'invite', - instance: this, fields, - initialValues: {}, - validation: values => ({ - private_key: - ! values.private_key ? tt('g.required') : validateSecret(values.private_key), - register_link: - ! values.register_link ? tt('g.required') : null, - amount: - ! parseFloat(values.amount) || /^0$/.test(values.amount) ? tt('g.required') : - insufficientFunds(values.amount) ? tt('transfer_jsx.insufficient_funds') : - meetsMinimum(values.amount) ? tt('invites_jsx.meet_minimum') : - countDecimals(values.amount) > 3 ? tt('transfer_jsx.use_only_3_digits_of_precison') : - null, - is_referral: null, - }) - }) - this.handleSubmitForm = - this.state.invite.handleSubmit(args => this.handleSubmit(args)) - } - - showQrPriv = e => { - this.props.showQRKey({type: 'Invite', text: this.state.private_key.value, isPrivate: true}); - } - - showQrRegLink = e => { - this.props.showQRKey({type: 'Invite', text: this.state.register_link.value, title: tt('invites_jsx.register_link')}); - } - - balanceValue() { - const {account} = this.props - return formatAsset(account.get('balance'), true, false, '') - } - - assetBalanceClick = e => { - e.preventDefault() - // Convert '9 GOLOS' to 9 - this.state.amount.props.onChange(this.balanceValue().split(' ')[0]) - } - - onChangePrivateKey = (e) => { - const {value} = e.target - let pk = value.trim() - this.updatePrivateKey(pk) - } - - onChangeAmount = (e) => { - const {value} = e.target - this.state.amount.props.onChange(formatAmount(value)) - } - - onChangeIsReferral = (e) => { - this.state.is_referral.props.onChange(e.target.checked) - } - - handleSubmit = ({updateInitialValues}) => { - const {createInvite, accountName} = this.props - const {private_key, amount, is_referral} = this.state - this.setState({loading: true}); - const public_key = PrivateKey.fromWif(private_key.value).toPublicKey().toString(); - createInvite({public_key, amount, is_referral, accountName, - errorCallback: (e) => { - if (e === 'Canceled') { - this.setState({ - loading: false, - errorMessage: '' - }) - } else { - console.log('createInvite ERROR', e) - this.setState({ - loading: false, - errorMessage: tt('g.server_returned_error') - }) - } - }, - successCallback: () => { - this.setState({ - loading: false, - errorMessage: '', - successMessage: tt('invites_jsx.success'), - createdInvite: public_key, - }) - // remove successMessage after a while - setTimeout(() => this.setState({successMessage: ''}), 8000) - }}) - } - - render() { - const {props: {account, isMyAccount, cprops, min_invite_balance}} = this - const {private_key, register_link, amount, is_referral, loading, successMessage, errorMessage, createdInvite} = this.state - const {submitting, valid} = this.state.invite - - let publicKeyLink = null; - if (createdInvite) { - publicKeyLink = `https://gapi.golos.today/api/database_api/get_invite?invite_key=${createdInvite}`; - publicKeyLink=({tt('invites_jsx.public_key_can_be_checked') + ' '} - {tt('g.here')} - - ); - } - - return (
-
-
-
- {tt('invites_jsx.create_invite_info')} {tt('g.more_hint')} -
-
-
- -
-
-

{tt('invites_jsx.create_invite')}

-
-
- -
-
- - {tt('invites_jsx.private_key')} -
-
- -
- this.onChangePrivateKey(e)} - /> - - - -
- {private_key.touched && private_key.blur && private_key.error && -
{private_key.error} 
- } -
-
- -
-
- {tt('invites_jsx.register_link')} -
-
- -
- - - - -
-
-
- -
-
- {tt('g.amount')} ({min_invite_balance ? formatAsset(min_invite_balance, true, false, '') : '0 GOLOS'}{' ' + tt('g.or_more')}) -
- this.onChangeAmount(e)}/> -
-
- -
- {(amount.touched && amount.error) ? -
- {amount.touched && amount.error && amount.error}  -
: null} -
-
- -
-
-
- -
- {is_referral.touched && is_referral.blur && is_referral.error && -
{is_referral.error} 
- } -
-
- - {publicKeyLink ? (
-
- {publicKeyLink} -
-
) : null} - -
-
- {loading &&
} - {!loading && } - {' '}{ - errorMessage - ? {errorMessage} - : successMessage - ? {successMessage} - : null - } -
-
-
-
-
-
-
-
-
) - } -} -const AssetBalance = ({onClick, balanceValue}) => - {tt('transfer_jsx.balance') + ": " + balanceValue} - -export default connect( - (state, ownProps) => { - const {account} = ownProps - const accountName = account.get('name') - const current = state.user.get('current') - const username = current && current.get('username') - const isMyAccount = username === accountName - const cprops = state.global.get('cprops'); - const min_invite_balance = cprops && cprops.get('min_invite_balance') - return {...ownProps, isMyAccount, accountName, min_invite_balance} - }, - dispatch => ({ - createInvite: ({ - public_key, amount, is_referral, accountName, successCallback, errorCallback - }) => { - let operation = { - creator: accountName, - balance: parseFloat(amount.value, 10).toFixed(3) + ' GOLOS', - invite_key: public_key - } - if (is_referral.value) { - operation.extensions = [[0, { - is_referral: true, - }]]; - } - - const success = () => { - dispatch(user.actions.getAccount()) - successCallback() - } - - dispatch(transaction.actions.broadcastOperation({ - type: 'invite', - accountName, - operation, - successCallback: success, - errorCallback - })) - }, - - showQRKey: ({type, isPrivate, text, title}) => { - dispatch(g.actions.showDialog({name: "qr_key", params: {type, isPrivate, text, title}})); - } - }) -)(CreateInvite) diff --git a/app/components/elements/Icon.jsx b/app/components/elements/Icon.jsx index 4822ef9a5..8691024b1 100644 --- a/app/components/elements/Icon.jsx +++ b/app/components/elements/Icon.jsx @@ -26,6 +26,7 @@ const icons = new Map([ ['extlink', require('app/assets/icons/extlink.svg')], ['golos', require('app/assets/icons/golos.svg')], ['dropdown-arrow', require('app/assets/icons/dropdown-arrow.svg')], + ['dropdown-center', require('app/assets/icons/dropdown-center.svg')], ['printer', require('app/assets/icons/printer.svg')], ['search', require('app/assets/icons/search.svg')], ['menu', require('app/assets/icons/menu.svg')], diff --git a/app/components/elements/Invites.jsx b/app/components/elements/Invites.jsx deleted file mode 100644 index 7b93a2370..000000000 --- a/app/components/elements/Invites.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import shouldComponentUpdate from 'app/utils/shouldComponentUpdate' -import g from 'app/redux/GlobalReducer' -import {connect} from 'react-redux'; -import CreateInvite from 'app/components/elements/CreateInvite' -import ClaimInvite from 'app/components/elements/ClaimInvite' - -class Invites extends Component { - static propTypes = { - // HTML - account: PropTypes.object.isRequired, - } - - constructor() { - super() - this.shouldComponentUpdate = shouldComponentUpdate(this, 'Invites') - } - - render() { - const {account} = this.props - - return (
- - -
) - } -} - -export default connect( - (state, ownProps) => { - return {...ownProps} - }, - dispatch => ({ - }) -)(Invites) diff --git a/app/components/elements/PostSummaryThumb.jsx b/app/components/elements/PostSummaryThumb.jsx index 87bd6ad2d..0cb35c651 100644 --- a/app/components/elements/PostSummaryThumb.jsx +++ b/app/components/elements/PostSummaryThumb.jsx @@ -1,10 +1,4 @@ import React from 'react'; -// keep this in memory, no requests -import nsfwBanner from 'app/assets/images/nsfw/light.png' -// import * as pixelate from './utils/effects/close-pixelate' - - -//todo render fallback image by react, not by canvas depending on state? export default class PostSummaryThumb extends React.Component { constructor(props) { @@ -12,62 +6,25 @@ export default class PostSummaryThumb extends React.Component { this.state = {} } - handleImageLoaded() { - if (this.props.isNsfw) { - this.cp = new window.ClosePixelation(this.img, this.canvas) - try { - this.cp.render([ - { - // todo fix author's algorithm - // either loses color channels or disappears completely ) - // only these options render well - resolution: 10, - alpha: 1, - size: 10, - } - ]) - } - catch (e) { - // clear canvas before the fallback image drawing! - this.cp.ctx.clearRect(0, 0, this.cp.width, this.cp.height); - this.cp.ctx.drawImage(this.defaultImage, - this.cp.width / 2 - this.defaultImage.width / 2, - this.cp.height / 2 - this.defaultImage.height / 2, - ) - } - } - } - - handleImageErrored() { - this.setState({imageStatus: 'failed to load'}); - } - render() { - let {visitedClassName, title, body} = this.props; - title = title ? title : ''; - body = body ? body : ''; + let { visitedClassName, title, body, isNsfw } = this.props + title = title || '' + body = body || '' + let className = this.props.mobile ? ('PostSummary__image-mobile ' + visitedClassName) : 'PostSummary__image ' + if (isNsfw) { + className += ' nsfw-img' + } return ( { this.img = img; }}> - { - this.defaultImage = img; - }} - style={!this.props.isNsfw ? {display: "none"} : {}} - // src={`/images/18_plus.png`} - src={nsfwBanner} - className={'PostSummary__image '} //+ visitedClassName}*!/*/} - > -
{title}
diff --git a/app/components/elements/Voting.jsx b/app/components/elements/Voting.jsx index aae775c59..fa984def9 100644 --- a/app/components/elements/Voting.jsx +++ b/app/components/elements/Voting.jsx @@ -173,7 +173,7 @@ class Voting extends React.Component { } - const total_votes = post_obj.get('from_search') ? + const total_votes = (post_obj.get('from_search') || post_obj.get('from_preview')) ? post_obj.get('net_votes') : post_obj.getIn(['stats', 'total_votes']) diff --git a/app/components/elements/WitnessSettings.jsx b/app/components/elements/WitnessSettings.jsx deleted file mode 100644 index 6237dafea..000000000 --- a/app/components/elements/WitnessSettings.jsx +++ /dev/null @@ -1,191 +0,0 @@ -import React from 'react'; -import {connect} from 'react-redux'; -import transaction from 'app/redux/Transaction' -import reactForm from 'app/utils/ReactForm'; -import LoadingIndicator from 'app/components/elements/LoadingIndicator'; -import tt from 'counterpart'; -import { getMetadataReliably } from 'app/utils/NormalizeProfile'; -import g from 'app/redux/GlobalReducer'; - -class WitnessSettings extends React.Component { - - constructor(props) { - super(); - this.initForm(props); - //this.shouldComponentUpdate = shouldComponentUpdate(this, 'WitnessSettings'); - } - - initForm(props) { - reactForm({ - instance: this, - name: 'witnessSettings', - fields: ['url', 'signing_key'], - initialValues: { - url: props.witness_obj.get('url'), - signing_key: props.witness_obj.get('signing_key'), - ...props.witness}, - validation: values => ({ - url: values.url && !/^https?:\/\//.test(values.url) ? tt('settings_jsx.invalid_url') : null, - }) - }); - this.handleSubmitForm = - this.state.witnessSettings.handleSubmit(args => this.handleSubmit(args)); - } - - handleSubmit = ({updateInitialValues}) => { - const {url, signing_key} = this.state - - const {account, updateWitness} = this.props - this.setState({loading: true}) - updateWitness({ - owner: account.name, - url: url.value, - fee: '1.000 GOLOS', - block_signing_key: signing_key.value, - props: { - account_creation_fee: this.props.witness_obj.get('props').get('account_creation_fee'), - maximum_block_size: this.props.witness_obj.get('props').get('maximum_block_size'), - sbd_interest_rate: this.props.witness_obj.get('props').get('sbd_interest_rate') - }, - errorCallback: (e) => { - if (e === 'Canceled') { - this.setState({ - loading: false, - errorMessage: '' - }) - } else { - console.log('updateWitness ERROR', e) - this.setState({ - loading: false, - changed: false, - errorMessage: tt('g.server_returned_error') - }) - } - }, - successCallback: () => { - this.setState({ - loading: false, - changed: false, - errorMessage: '', - successMessage: tt('g.saved') + '!', - }) - // remove successMessage after a while - setTimeout(() => this.setState({successMessage: ''}), 4000) - updateInitialValues() - } - }); - } - - clearSigningKey = (e) => { - e.preventDefault(); - this.state.signing_key.props.onChange('GLS1111111111111111111111111111111114T1Anm'); - } - - render() { - const { - props: {account}, - } = this; - - const {state} = this - - const {submitting, valid, touched} = this.state.witnessSettings - const disabled = state.loading || submitting || !valid || !touched - - const {url, signing_key} = this.state - - const showFeedsNodes = (e) => { - e.preventDefault() - const name = account.name - this.props.feedsNodes(name) - } - - return (
-
-
-

Делегат {this.props.account.name}

-    - - Фиды & Ноды   - {state.loading &&
} - {!state.loading && } - {' '}{ - state.errorMessage - ? {state.errorMessage} - : state.successMessage - ? {state.successMessage} - : null - } -
- - - - - - - - - - - -
- -   -
- - X -
-
{signing_key.touched && signing_key.error}
-
-
); - } - componentDidMount() { - } -} - -export default connect( - // mapStateToProps - (state, props) => { - const { account } = props; - let metaData = account ? getMetadataReliably(account.json_metadata) : {} - const witness = metaData && metaData.witness ? metaData.witness : {} - - return { - metaData, - witness, - witness_obj: state.global.getIn(['witnesses', account.name]) - }; - }, - // mapDispatchToProps - dispatch => ({ - updateAccount: ({successCallback, errorCallback, ...operation}) => { - const success = () => { - //dispatch(user.actions.getAccount()) - successCallback() - } - - const options = {type: 'account_metadata', operation, successCallback: success, errorCallback} - dispatch(transaction.actions.broadcastOperation(options)) - }, - publishFeed: ({successCallback, errorCallback, ...operation}) => { - const success = () => { - //dispatch(user.actions.getAccount()) - successCallback() - } - - const options = {type: 'feed_publish', operation, successCallback: success, errorCallback} - dispatch(transaction.actions.broadcastOperation(options)) - }, - updateWitness: ({successCallback, errorCallback, ...operation}) => { - const success = () => { - //dispatch(user.actions.getAccount()) - successCallback() - } - - const options = {type: 'witness_update', operation, successCallback: success, errorCallback} - dispatch(transaction.actions.broadcastOperation(options)) - }, - feedsNodes: (username) => { - dispatch(g.actions.showDialog({name: 'feeds_nodes', params: {username}})) - } - }) -)(WitnessSettings) diff --git a/app/components/elements/WitnessSettings.scss b/app/components/elements/WitnessSettings.scss deleted file mode 100644 index 86aa50171..000000000 --- a/app/components/elements/WitnessSettings.scss +++ /dev/null @@ -1,36 +0,0 @@ -.inline { -display: inline-block; -} - -input[name=url2] { -width: 400px; -display: inline-block; -} - -input[name=url2]:not(:hover):not(:focus) { -border: none; -transition: none; --webkit-transition: none; -box-shadow: none; --webkit-box-shadow: none; -} - -.clear-table td { - padding: 0; -} - -.clear-table tr { - background-color: inherit !important; -} - -.clear-table tbody { - border: none; -} - -.no-margin-bottom { - margin-bottom: 0rem !important; -} - -.margin-bottom { - margin-bottom: 1rem !important; -} \ No newline at end of file diff --git a/app/components/elements/donate/Donate.scss b/app/components/elements/donate/Donate.scss new file mode 100644 index 000000000..70899b537 --- /dev/null +++ b/app/components/elements/donate/Donate.scss @@ -0,0 +1,68 @@ +.TipBalance { + display: inline-block; + margin-left: 5px; + vertical-align: middle; + padding-left: 1em; + padding-right: 1em; + padding-bottom: 0.75rem; + text-align: center; + width: 155px; + font-size: 95%; + + .VerticalMenu { + width: 155px; + min-width: 155px; + } + + &.mini { + font-size: 80%; + } + + &.micro { + font-size: 70%; + } +} + +.PresetSelector { + border-radius: 0px; + margin-left: -1px !important; + margin-right: 0px !important; + + border: 1px solid #0078C4 !important; + color: #0078C4 !important; + font-size: 1em; + min-width: 55px; +} + +.PresetSelector:nth-child(n+3):nth-last-child(n+3) { +} + +.PresetSelector:first-child { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; + margin-right: 0px !important; + margin-left: 0px !important; +} + +.PresetSelector:last-child { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} + +.PresetSelector:hover { + border: 1px solid #002080 !important; + color: #002080 !important; + position: relative; + z-index: 10; +} + +.PresetSelector__active { + border: 1px solid #002080 !important; + color: #002080 !important; + position: relative; + z-index: 10; +} + +.PresetSelector__container { + display: inline-block; +} diff --git a/app/components/modules/Dialogs.jsx b/app/components/modules/Dialogs.jsx index 60adf5fdf..a36a3db25 100644 --- a/app/components/modules/Dialogs.jsx +++ b/app/components/modules/Dialogs.jsx @@ -7,14 +7,12 @@ import g from 'app/redux/GlobalReducer'; import {Map, List} from 'immutable'; import shouldComponentUpdate from 'app/utils/shouldComponentUpdate'; import QrReader from 'app/components/elements/QrReader'; -import ConvertToSteem from 'app/components/elements/ConvertToSteem'; import SuggestPassword from 'app/components/elements/SuggestPassword'; import ChangePassword from 'app/components/elements/ChangePassword'; import CheckLoginOwner from 'app/components/elements/CheckLoginOwner'; import QrKeyView from 'app/components/elements/QrKeyView'; import PromotePost from 'app/components/modules/PromotePost'; import ExplorePost from 'app/components/modules/ExplorePost'; -import FeedsNodes from 'app/components/modules/FeedsNodes'; class Dialogs extends React.Component { static propTypes = { @@ -48,12 +46,6 @@ class Dialogs extends React.Component { : - k === 'convertToSteem' ? - - - - - : k === 'suggestPassword' ? @@ -83,12 +75,6 @@ class Dialogs extends React.Component { - : - k === 'feeds_nodes' ? - - - - : null return cmp ? r.push(cmp) : r diff --git a/app/components/modules/Header.jsx b/app/components/modules/Header.jsx index 1eb944f6f..62e0887d7 100644 --- a/app/components/modules/Header.jsx +++ b/app/components/modules/Header.jsx @@ -144,8 +144,6 @@ class Header extends React.Component { if(route.params[1] === "posts" || route.params[1] === "comments"){ page_title = tt('header_jsx.comments_by') + " " + user_title; } - } else if (route.page === 'ConvertAssetsLoader') { - page_title = tt('g.convert_assets') } else { page_name = ''; //page_title = route.page.replace( /([a-z])([A-Z])/g, '$1 $2' ).toLowerCase(); } diff --git a/app/components/modules/PromotePost.jsx b/app/components/modules/PromotePost.jsx index 1c6ff39e3..f466ad81b 100644 --- a/app/components/modules/PromotePost.jsx +++ b/app/components/modules/PromotePost.jsx @@ -160,6 +160,7 @@ export default connect( dispatch(transaction.actions.broadcastOperation({ type: 'transfer', operation, + username, successCallback, errorCallback })) diff --git a/app/components/modules/Settings.jsx b/app/components/modules/Settings.jsx index 951637be3..0c7fd44f3 100644 --- a/app/components/modules/Settings.jsx +++ b/app/components/modules/Settings.jsx @@ -267,17 +267,6 @@ class Settings extends React.Component { }) } - unmuteAsset = (e) => { - const sym = e.currentTarget.dataset.sym; - let mutedUIA = []; - mutedUIA = localStorage.getItem('mutedUIA'); - if (mutedUIA) try { mutedUIA = JSON.parse(mutedUIA) } catch (ex) {} - if (!mutedUIA) mutedUIA = []; - mutedUIA = mutedUIA.filter(o => o !== sym) - localStorage.setItem('mutedUIA', JSON.stringify(mutedUIA)); - window.location.reload() - } - onNotifyPresetChange = e => { let notifyPresets = {...this.state.notifyPresets}; notifyPresets[e.target.dataset.type] = e.target.checked; @@ -308,16 +297,6 @@ class Settings extends React.Component { const following = follow && follow.getIn(['getFollowingAsync', account.name]); const ignores = isOwnAccount && block && block.getIn(['blocking', account.name, 'result']) const mutedInNew = isOwnAccount && props.mutedInNew; - let mutedUIA = []; - if (process.env.BROWSER) { - mutedUIA = localStorage.getItem('mutedUIA'); - if (mutedUIA) try { mutedUIA = JSON.parse(mutedUIA) } catch (ex) {} - if (!mutedUIA) mutedUIA = []; - } - let mutedUIAlist = []; - for (let sym of mutedUIA) { - mutedUIAlist.push(

{sym} X

) - } const {pImageUploading, cImageUploading} = this.state; const languageSelectBox = - } else if (f[1] === 'raw') { - input = - } else if (f[1] === 'dropped') { - return null; - } else { - input = - } - - return ( - -
{field.touched && field.error}
- ); - }); - return ({fields}); - }); - - return (
- -
-
-

Параметры сети

   - - {state.loading &&
} - {!state.loading && } - {' '}{ - state.errorMessage - ? {state.errorMessage} - : state.successMessage - ? {state.successMessage} - : null - } -
- - {groups} -
- -
-
); - } - componentDidMount() { - } -} - -export default connect( - // mapStateToProps - (state, props) => { - const { account } = props; - - return { - witness_obj: state.global.getIn(['witnesses', account.name]) - }; - }, - // mapDispatchToProps - dispatch => ({ - updateChainProperties: ({successCallback, errorCallback, ...operation}) => { - const success = () => { - //dispatch(user.actions.getAccount()) - successCallback() - } - - const options = {type: 'chain_properties_update', operation, successCallback: success, errorCallback} - dispatch(transaction.actions.broadcastOperation(options)) - } - }) -)(WitnessProps) diff --git a/app/components/modules/WitnessProps.scss b/app/components/modules/WitnessProps.scss deleted file mode 100644 index 7ac46ef15..000000000 --- a/app/components/modules/WitnessProps.scss +++ /dev/null @@ -1,15 +0,0 @@ -.WitnessPropsTable label { - text-transform: none; -} - -.WitnessPropsTable input { - height: 1.5rem; -} - -.WitnessPropsTable input[type="checkbox"] { - display: block; -} - -.WitnessPropsTable td { - padding: 0 5px; -} diff --git a/app/components/pages/Post.jsx b/app/components/pages/Post.jsx index 658c8cfbc..2e437500f 100644 --- a/app/components/pages/Post.jsx +++ b/app/components/pages/Post.jsx @@ -1,19 +1,25 @@ import React from 'react'; import PropTypes from 'prop-types' -import Comment from 'app/components/cards/Comment'; -import PostFull from 'app/components/cards/PostFull'; -import {connect} from 'react-redux'; -import {sortComments} from 'app/utils/comments'; +import {connect} from 'react-redux' +import {Set} from 'immutable' +import tt from 'counterpart' + +import Comment from 'app/components/cards/Comment' +import PostFull from 'app/components/cards/PostFull' import Follow from 'app/components/elements/Follow' +import FoundationDropdownMenu from 'app/components/elements/FoundationDropdownMenu' +import Icon from 'app/components/elements/Icon' +import IllegalContentMessage from 'app/components/elements/IllegalContentMessage' import LoadingIndicator from 'app/components/elements/LoadingIndicator'; -import FoundationDropdownMenu from 'app/components/elements/FoundationDropdownMenu'; -import IllegalContentMessage from 'app/components/elements/IllegalContentMessage'; -import {Set} from 'immutable' -import tt from 'counterpart'; -import shouldComponentUpdate from 'app/utils/shouldComponentUpdate'; -import { authRegisterUrl, } from 'app/utils/AuthApiClient' +import g from 'app/redux/GlobalReducer' import user from 'app/redux/User' +import { authRegisterUrl, } from 'app/utils/AuthApiClient' +import { isBlocked } from 'app/utils/blacklist' +import { sortComments } from 'app/utils/comments' +import { subscribePost, unsubscribePost, getSubs } from 'app/utils/NotifyApiClient' +import shouldComponentUpdate from 'app/utils/shouldComponentUpdate' import session from 'app/utils/session' +import { isHighlight, markCommentsRead, notifyPageView } from 'app/utils/NotifyApiClient' class Post extends React.Component { static propTypes = { @@ -31,12 +37,97 @@ class Post extends React.Component { showNegativeComments: false }; this.shouldComponentUpdate = shouldComponentUpdate(this, 'Post') + this.commentsRef = React.createRef() } - componentDidMount() { - if (window.location.hash.indexOf('comments') !== -1) { - const comments_el = document.getElementById('comments'); - if (comments_el) comments_el.scrollIntoView(); + async componentDidMount() { + if (process.env.BROWSER) { + const dis = this.getDiscussion() + if (!dis) { + return + } + + const author = dis.get('author') + const permlink = dis.get('permlink') + + const account = session.load().currentName + if (account) { + let found = false + const res = await getSubs(account) + if (res.result) { + for (const sub of res.result.subs) { + const [ subAuthor, subPermlink ] = sub.entityId.split('|') + if (subAuthor === author && subPermlink === permlink) { + found = true + break + } + } + } + this.setState({ subscribed: found }) + + this.processHighlight() + } + + try { + notifyPageView(author, permlink) + } catch (err) {} + } + } + + async componentDidUpdate() { + this.processHighlight() + } + + processHighlight() { + const curUser = session.load().currentName + if (!curUser) { + return + } + const dis = this.getDiscussion() + if (!dis) { + return null + } + const replies = dis.get('replies').toJS() + const loaded = replies.length || !dis.get('children') + if (loaded) { + const author = dis.get('author') + const permlink = dis.get('permlink') + + const highlight = isHighlight() + if (!this.state.highlight) + this.setState({ highlight }) + + if (highlight) { + if (!dis.get('highlighted')) { + return null + } + markCommentsRead(curUser, author, permlink) + this.props.markSubRead(author, permlink) + this.readen = true + let counter = 0 + const scroller = setInterval(() => { + let notYet = false + for (const img of document.getElementsByTagName('img')) { + if (!img.complete) { + notYet = true + break + } + } + ++counter + if ((notYet && counter < 2000) || !this.commentsRef.current) return + + const proceed = () => { + clearInterval(scroller) + this.commentsRef.current.scrollIntoView() + document.scrollingElement.scrollTop -= 200 + } + if (counter > 100) { + setTimeout(proceed, 500) + } else { + proceed() + } + }, 1) + } } } @@ -104,19 +195,52 @@ class Post extends React.Component { return this._renderStub(children) } + subscribe = async (e, dis) => { + e.preventDefault() + try { + const { current_user, } = this.props + const account = current_user && current_user.get('username') + if (!account) return + if (this.state.subscribed) { + await unsubscribePost(account, dis.get('author'), dis.get('permlink')) + this.setState({subscribed: false}) + return + } + await subscribePost(account, dis.get('author'), dis.get('permlink')) + this.setState({subscribed: true}) + } catch (err) { + alert(err.message || err) + } + } + + getDiscussion = (postGetter = () => {}) => { + let { content, post, routeParams } = this.props + if (!post) { + post = routeParams.username + '/' + routeParams.slug + } + postGetter(post) + const dis = content.get(post) + return dis + } + render() { const {following, content, current_user} = this.props const {showNegativeComments, commentHidden, showAnyway} = this.state let { post } = this.props; const { aiPosts } = this.props; - if (!post) { - const route_params = this.props.routeParams; - post = route_params.username + '/' + route_params.slug; - } - const dis = content.get(post); + const dis = this.getDiscussion(p => post = p) if (!dis) return null; + if (process.env.BROWSER) { + const author = dis.get('author') + const permlink = dis.get('permlink') + const highlight = isHighlight() + if (highlight && !dis.get('highlighted') && !this.readen) { + return this._renderLoadingStub() + } + } + const stats = dis.get('stats').toJS() if(!showAnyway) { @@ -134,7 +258,7 @@ class Post extends React.Component { let replies = dis.get('replies').toJS(); - let sort_order = 'trending'; + let sort_order = this.state.highlight ? 'new' : 'trending'; if( this.props.location && this.props.location.query.sort ) sort_order = this.props.location.query.sort; @@ -194,7 +318,7 @@ class Post extends React.Component { return this._renderOnlyApp() } if (stats.isOnlyblog) { - if (!following && (typeof(localStorage) === 'undefined' || !session.load().currentName)) { + if (!following && (typeof(localStorage) === 'undefined' || session.load().currentName)) { return this._renderLoadingStub() } else if (!following || (!following.includes(dis.get('author')) && @@ -221,9 +345,11 @@ class Post extends React.Component {
- if($STM_Config.blocked_users.includes(post.split("/")[0])) { + if (isBlocked(post.split('/')[0], $STM_Config.blocked_users)) { return () } + + const { subscribed } = this.state return (
@@ -242,19 +368,31 @@ class Post extends React.Component {
-
+
{(!replies.length && dis.get('children')) ? (
) : null} - {positiveComments.length ? - (
+
this.subscribe(e, dis)}> + + + {subscribed ? tt('post_jsx.unsubscribe') : tt('post_jsx.subscribe_comments')} + +
+
{tt('post_jsx.sort_order')}:   -
) : null} +
{positiveComments} {negativeGroup} + {(dis.get('children') > 5) && !subscribed && current_user ? + (
this.subscribe(e, dis)}> + + + {subscribed ? tt('post_jsx.unsubscribe_long') : tt('post_jsx.subscribe_comments_long')} + +
) : null}
@@ -300,5 +438,8 @@ export default connect((state, props) => { if (e) e.preventDefault(); dispatch(user.actions.showLogin()) }, + markSubRead: (author, permlink) => { + dispatch(g.actions.markSubRead({ author, permlink })) + } }) )(Post); diff --git a/app/components/pages/Post.scss b/app/components/pages/Post.scss index ac13ce177..af6f3ec3b 100644 --- a/app/components/pages/Post.scss +++ b/app/components/pages/Post.scss @@ -1,3 +1,21 @@ +.Post__comments_subscribe { + margin-top: 0.5rem; + color: $dark-gray; + font-size: 94%; + cursor: pointer; + > span { + margin-left: 5px; + } + > .fill-red { + color: #fc544e; + fill: #fc544e; + } + > .fill-green { + color: green; + fill: green; + } +} + .Post__comments_sort_order { margin: 0.5rem 0; color: $dark-gray; diff --git a/app/components/pages/Services.jsx b/app/components/pages/Services.jsx index 9f45c300a..8155e8a57 100644 --- a/app/components/pages/Services.jsx +++ b/app/components/pages/Services.jsx @@ -18,7 +18,7 @@ class Services extends React.Component {
Golos Blogs
-

Основные веб-клиенты блогов golos.id и golos.in, альтернативные клиенты, а также Desktop (для Windows и Linux)

+

Основные веб-клиенты блогов golos.id и golos.in, альтернативные клиенты, а также Desktop (для Windows и Linux)

diff --git a/app/components/pages/UserProfile.jsx b/app/components/pages/UserProfile.jsx index bf3e20709..5f732bb0f 100644 --- a/app/components/pages/UserProfile.jsx +++ b/app/components/pages/UserProfile.jsx @@ -346,6 +346,29 @@ export default class UserProfile extends React.Component { tab_content = (
); } } + else if( (section === 'discussions')) { + if (account.discussions) { + let posts = accountImm.get('discussions'); + if (posts && !posts.size) { + tab_content = {tt('user_profile.user_hasnt_followed_anything', {name: accountname}) + '.'} + } else { + tab_content = ( +
+ + {isMyAccount &&
} +
+ ) + } + } else { + tab_content = (
); + } + } else if( (section === 'reputation')) { tab_content = (
@@ -395,44 +418,43 @@ export default class UserProfile extends React.Component { const top_menu =
- {tt('g.blog')} - {tt('g.comments')} + + {tt('g.blog')} + + + {tt('g.comments')} + {tt('g.replies')} {isMyAccount && } - {msgsHost() ? - {tt('g.messages')} {isMyAccount && } - : null} - - } - > - - {tt('g.rewards')} - {isMyAccount && } - - - + {isMyAccount ? + {tt('g.discussions')} + : null} + + {tt('g.mentions')} {isMyAccount && } +
- {tt('g.wallet')} {isMyAccount && } + {tt('g.wallet')} {isMyAccount && } - {isMyAccount ? - {tt('navigation.market2')} - : null - } - {isMyAccount ? - {tt('g.settings')} - : null - } + } + > + + {tt('g.rewards')} {isMyAccount && } + + + + {isMyAccount && msgsHost() ? + + : null} + {isMyAccount ? + + : null}
diff --git a/app/components/pages/UserProfile.scss b/app/components/pages/UserProfile.scss index 34ca19397..f993b25b0 100644 --- a/app/components/pages/UserProfile.scss +++ b/app/components/pages/UserProfile.scss @@ -65,6 +65,7 @@ color: $white; background-color: transparent; line-height: 1.5rem; + fill: $white; &:hover { background-color: #555; @@ -74,6 +75,7 @@ z-index: 2; color: $black; font-weight: bold; + fill: $black; } } @@ -85,9 +87,9 @@ flex-flow: row wrap; width: 100%; // Override default svg vertical alignment - .Icon > svg, .Icon span.icon { - vertical-align: middle!important; - } + // .Icon > svg, .Icon span.icon { + // vertical-align: middle !important; + // } } } @@ -262,81 +264,6 @@ } } -.CreateInvite__copy-button { - cursor: pointer; - - .Icon { - width: 2.12rem; - height: 2.12rem; - - & > svg { - width: 2.12rem; - height: 2.12rem; - vertical-align: top; - } - } -} - -.Assets__header { - display: inline-block; -} - -.Assets__disabled { - color: rgb(150, 150, 150); - cursor: default; -} - -.Assets__info { - font-size: 90%; -} - -.Assets__center { - text-align: center; -} - -.Assets__cost { - font-weight: bold !important; -} - -.Assets__marginTop { - margin-top: 13px; -} - -.Assets__marginTop2 { - margin-top: 5px; -} - -.Assets__marginRight { - margin-right: 6px; -} - -.Assets__marginBottom { - margin-bottom: 3px; -} - -.Assets__noMarginBottom { - margin-bottom: 0px; -} - -.Assets__inlineBtn { - margin-bottom: 0px; - margin-left: 0.5rem; - margin-right: 0px !important; -} - -.FilledOrders__market-link { - svg { - fill: #0078C4; - } -} - -.FilledOrders__convert-link { - svg { - fill: #0078C4; - transform: rotate(90deg); - } -} - @media screen and (max-width: 39.9375em) { .UserProfile__menu-item { diff --git a/app/locales/en.json b/app/locales/en.json index 8a32a0685..ab428316b 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -57,15 +57,6 @@ "mention_comment": "comment ", "you": "you" }, - "filled_orders_jsx": { - "title": "Filled market orders", - "orders_info": "Golos blockchain has its own internal DEX (decentralized exchange), which means it is possible to exchange GOLOS and UIA tokens (user-issued assets to other cryptocurrencies) right here.", - "empty_NAME": "%(NAME)s have no filled orders yet. You can buy or sell tokens in the ", - "empty2": "market", - "exchanged": "Exchange %(AMOUNT)s for %(AMOUNT2)s", - "quick_convert": "Quick Convert", - "open_market": "Go To Market (DEX)" - }, "g": { "golos_fest": "Golos.id News", "APP_NAME": "Golos", @@ -115,6 +106,7 @@ "date": "Date", "decrypt": "Decrypt", "delete": "Delete", + "discussions": "Discussions", "dismiss": "Dismiss", "documentation": "Documentation", "edit": "Edit", @@ -256,15 +248,6 @@ "passwords_do_not_match": "Passwords do not match", "no_topics_by_order_found": "There are no posts in the category %(order)s for the last 7 days...", "you_need_private_password_or_key_not_a_public_key": "You need a private password or key (not a public key)", - "the_rules_of_APP_NAME": { - "one": "The first rule of %(APP_NAME)s is: Do not lose your password.", - "second": "The second rule of %(APP_NAME)s is: Do not lose your password.", - "third": "The third rule of %(APP_NAME)s is: We cannot recover your password.", - "fourth": "The fourth rule: If you can remember the password, it's not secure.", - "fifth": "The fifth rule: Use only randomly-generated passwords.", - "sixth": "The sixth rule: Do not tell anyone your password.", - "seventh": "The seventh rule: Always back up your password." - }, "current_password": "Current Password", "generated_password": "Generated Password", "recover_password": "Restore Access", @@ -351,17 +334,6 @@ "social_network": "Social network", "about_project": "Golos Blogs - social platform and blogger community, developed on the GOLOS blockchain" }, - "exchanges_jsx": { - "title": "Buying and selling tokens", - "temporarily_disabled": "Token deposit/withdraw is temporarily disabled", - "guide_user": "Instructions for the exchange", - "pause": "Tokens input/output is temporarily suspended...", - "total_supply": "Information about the total supply of tokens", - "other_options": "for RUB / UAH / USD and many other options", - "questions": "Any questions", - "community_chat": "You can get answers in the community chat", - "delegate_chat": "and in the delegates chat" - }, "navigation": { "about": "About", "explore": "Explore", @@ -490,48 +462,13 @@ "account_name_is_not_available": "Account name is not available", "prev_posts": "See also" }, - "market_jsx": { - "action": "Action", - "date_created": "Date Created", - "date_trade": "Date Trade", - "last_price": "Last price", - "24h_volume": "24h volume", - "spread": "Spread", - "total": "Total", - "available": "Available", - "lowest_ask": "Lowest ask", - "highest_bid": "Highest bid", - "buy_orders": "Buy Orders", - "sell_orders": "Sell Orders", - "trade_history": "Trade History", - "open_orders": "Open Orders", - "sell_amount_for_atleast": "Sell %(amount_to_sell)s for at least %(min_to_receive)s (%(effectivePrice)s)", - "buy_atleast_amount_for": "Buy at least %(min_to_receive)s for %(amount_to_sell)s (%(effectivePrice)s)", - "price_warning_above": "This price is well above the current market price of %(marketPrice)s, are you sure?", - "price_warning_below": "This price is well below the current market price of %(marketPrice)s, are you sure?", - "order_cancel_confirm": "Cancel order %(order_id)s from %(user)s?", - "order_cancel_confirm_few": "Cancel %(order_cnt)s order(-s) from %(user)s?", - "order_cancel_all_confirm": "Cancel all orders between %(symbol1)s and %(symbol2)s from %(user)s?", - "order_cancelled": "Order %(order_id)s cancelled.", - "higher": "Higher", - "lower": "Lower", - "total_DEBT_TOKEN_SHORT_CURRENCY_SIGN": "Total %(DEBT_TOKEN_SHORT)s)", - "not_exists": " not exists", - "forbids": " is not tradable with ", - "asset_problem_go_home": "Choose another market pair", - "asset_is_overridable": " can revoke tokes from users balances!", - "asset_": "Token issuer ", - "market_fee_percent_": "Trade fee ", - "market_depth_": "market depth", - "market_pair": "Market Pair", - "orders_canceled": "Selected orders successfully cancelled." - }, "user_profile": { "unknown_account": "Unknown Account", "user_hasnt_made_any_posts_yet": "Looks like %(name)s hasn't made any posts yet!", "user_hasnt_started_bloggin_yet": "Looks like %(name)s hasn't started blogging yet!", "user_hasnt_followed_anything_yet": "Looks like %(name)s might not be following anyone yet! If %(name)s recently added new users to follow, their personalized feed will populate once new content is available.", "user_hasnt_had_any_replies_yet": "%(name)s hasn't had any replies yet", + "user_hasnt_followed_anything": "Subscribe to new comments of a post, and you will immediately receive them on that page.", "if_you_recently_added_new_users_to_follow": "If you recently added new users to follow, your personalized feed will populate once new content is available.", "explore_APP_NAME": "Explore %(APP_NAME)s", "full_faq": "The full F.A.Q on %(APP_NAME)s", @@ -563,10 +500,6 @@ "other": "%(count)s posts" } }, - "authorrewards_jsx": { - "estimated_author_rewards_last_week": "Estimated author rewards last week", - "author_rewards_history": "Author Rewards History" - }, "plurals": { "reply_count": { "zero": "no replies", @@ -586,19 +519,12 @@ "transfers_are_temporary_disabled": "Transfers are temporary disabled", "history": "History" }, - "curationrewards_jsx": { - "curation_rewards_last_24_hours": "Curation rewards last 24 hours", - "daily_average_curation_rewards": "Daily average curation rewards", - "estimated_curation_rewards_last_week": "Estimated curation rewards last week", - "curation_rewards_last_week": "Curation rewards last week", - "curation_rewards_history": "Curation Rewards History", - "replenish_golos_power": "Replenish your Golos Power", - "replenish_golos_power_AMOUNT": " with %(AMOUNT)s to receive your curaton rewards." - }, "post_jsx": { "now_showing_comments_with_low_ratings": "Now showing comments with low ratings", "sort_order": "Sort Order", - "comments_were_hidden_due_to_low_ratings": "Comments were hidden due to low ratings" + "comments_were_hidden_due_to_low_ratings": "Comments were hidden due to low ratings", + "subscribe_comments": "Subscribe New", + "subscribe_comments_long": "Subscribe New Comments" }, "do_not_bother": { "title": "Do not bother", @@ -614,15 +540,6 @@ "blocking_fatal_error": "User blocked you, now sending of transfers and donates is forbidden.", "bother_fatal_error": "User wants to not be bothered by accounts with low-reputation, now sending of transfers and donates is forbidden." }, - "key_file": { - "file_title": "Keys Of @", - "file_desc": "There are private keys, which are authorizing your account. Store this file in secure place.", - "password_desc": "Password (use it to log in on Golos): ", - "posting_desc": "Posting Key (also can be used as Golos password): ", - "active_desc": "Active Key: ", - "owner_desc": "Owner Key: ", - "memo_desc": "Memo Key: " - }, "voting_jsx": { "stop_seeing_content_from_this_user": "Stop seeing content from this user", "flagging_post_can_remove_rewards_the_flag_should_be_used_for_the_following": "Flagging a post can remove rewards and make this material less visible. Some common reasons to flag", @@ -652,43 +569,6 @@ "raw_html": "Raw HTML", "please_remove_following_html_elements": "Please remove the following HTML elements from your post: " }, - "witnesses_jsx": { - "witness_info": "Witnesses - are users who are elected by the community vote and are engaged in supporting the nodes that ensure the operation of the blockchain and many other issues related to the development of the project.", - "witness_thread": "witness thread", - "top_witnesses": "Witness Voting", - "what_is_api": "API-nodes have higher demands on server resources, it is through them come the queries to the blockchain for sending/receiving information, they are important for the development of a variety of clients and services...", - "what_is_seed": "SEED-nodes are the basis for data exchange for the functioning of the blockchain, accepting and distributing blocks they unload the network bandwidth, reducing the response for geographically close connections...", - "you_can_vote_for_maximum_of_witnesses": "You can vote for a maximum of 30 witnesses", - "chat_delegates": "Delegates Chat", - "chain_properties": "Сhain properties", - "witness": "Witness", - "witness_0": "You haven't supported any delegates yet", - "witness_1": "witness with a force of", - "witness_2": "witnesses with a force of", - "witness_supported": "You supported", - "witness_addon": "for each of them", - "information": "Information", - "load_more": "Load more", - "approval": "Votes", - "missed_1": "Missed", - "missed_2": "blocks", - "last_block": "Last block", - "price_feed": "Price feed", - "props": "Props", - "reg_fee": "Registration fee", - "apr": "APR", - "block_size": "Block size", - "witness_deactive": "Withness suspended the signature of the blocks", - "no_price_feed": "Withness did not publish the price feed", - "version": "Version", - "if_you_want_to_vote_outside_of_top_enter_account_name": "If you would like to vote for a witness outside of the top 100, enter the account name below to cast a vote", - "set_witness_proxy": "You can also choose a proxy that will vote for witnesses for you. This will reset your current witness selection.", - "witness_set": "You have set a voting proxy. If you would like to reenable manual voting, please clear your proxy.", - "witness_proxy_current": "Your current proxy is", - "witness_proxy_set": "Set proxy", - "witness_proxy_clear": "Clear proxy", - "proxy_update_error": "Your proxy was not updated" - }, "votesandcomments_jsx": { "no_responses_yet_click_to_respond": "No responses yet. Click to respond.", "response_count": { @@ -696,6 +576,11 @@ "one": "1 responses", "other": "%(count)s responses" }, + "view_count": { + "zero": "0 views", + "one": "1 view", + "other": "%(count)s views" + }, "click_to_respond": "Click to respond", "vote_count": { "zero": "no votes", @@ -704,99 +589,6 @@ }, "account_frozen": "Deactivated due inactivity." }, - "assets_jsx": { - "assets_info": "User Issued Assets (tokens) that can be exchanged, traded on an internal exchange, and used in various blockchain services.", - "create_asset": "Creating asset", - "symbol": "Ticker", - "symbol_too_short": "At least 3 characters", - "subsymbol_too_short": "Too short sub-ticker", - "symbol_exists": "Asset already exists", - "top_symbol_not_your": "Top level asset is not your", - "top_symbol_not_exists": "Top level asset not exists", - "max_supply": "Max supply", - "precision": "Decimals", - "allow_fee": "Allow to set trading fee", - "allow_override_transfer": "Allow revoke assets by creator (TIP-balance will not work)", - "allow_danger_note": "Cannot enable which forbidden on asset created!", - "create_btn": "Create asset", - "description": "Asset description URL", - "image_with_text": "Ticker image URL (48x48)", - "my_assets": "My assets", - "all_assets": "All assets", - "load_more": "Show all", - "anti_load_more": "Collapse", - "creator": "Issuer", - "supply_count": "Tokens issued", - "issue_btn": "Issue", - "update_btn": "Edit", - "balance": "main balance", - "tip_balance": "TIP-balance", - "overridable_no_tip": "Revokable tokens not support TIP balance", - "update_asset": "Editing asset", - "fee_percent": "Trade fee (%%)", - "fee_not_allowed": "Fee not allowed when asset created", - "symbols_whitelist": "Tokens to which can trade (one token per line, if empty - all allowed)", - "transfer_asset_btn": "Transfer to another one", - "transfer_asset_btn2": "Transfer", - "transfer_asset": "Transferring asset", - "transfer_new_owner": "To who", - "cannot_transfer_to_oneself": "Cannot transfer to yourself.", - "trade_asset": "Go to trading on the internal exchange", - "mute_asset": "Do not show asset", - "mute_asset_confirm_TICKER": "Confirm muting of %(TICKER)s? You will be able to unmute this asset in Settings of your profile.", - "deposit": "Deposit", - "withdrawal": "Withdrawal" - }, - "asset_edit_deposit_jsx": { - "title": "Deposit Rules", - "to_type_fixed": "Fixed gate address", - "to_type_transfer": "Requesting gate address", - "to_type_api": "Gate address from API", - "to_fixed": "Where to send tokens:", - "to_transfer": "Where to send 0.001 GOLOS in order to request address:", - "to_api": "Template of request URL, to insert current user account:", - "to_api_example": "Example: https://site.ru/get_address/", - "to_api_confirm": "We hope your API supports requests like that: ", - "to_api_description": "Response should be a JSON object.\nIt should have format like in following example:", - "to_api_error_url": "URL should start with http:// or https://", - "to_api_error": "Template should include - a place for name.", - "memo_fixed": "Memo:", - "memo_transfer": "Memo (for 0.001 GOLOS transfer):", - "transfer_title_SYM": "Deposit Of %(SYM)s", - "transfer_desc": "To receive a deposit address, please send 0.001 GOLOS to ", - "transfer_desc_2": " with memo: ", - "waiting": "Transfer of 0.001 GOLOS was sent. Responding transfer with address will acquire in ~5 minutes...", - "timeouted": "Transfer with address is not acquired. Try again or contact the issuer of ", - "api_error": "Cannot get address. Try again later. If problem still occurs, contact the issuer of ", - "api_error_details": "and send the error details:" - }, - "asset_edit_withdrawal_jsx": { - "title": "Withdrawal Rules", - "to": "Where to send tokens: ", - "min_amount": "Min amount: ", - "details": "Additional info: ", - "unavailable": "Service maintenance", - "way_name": "Service name: ", - "way_name_placeholder": "USDT (TRC-20)", - "way_memo": "Memo for transfer: ", - "way_memo_placeholder": "USDT-wallet-address", - "way_prefix": "Memo prefix: ", - "way_prefix_placeholder": "tron:", - "way_add": "Add another method", - "way_name_error": "Specify the name of the network/system, example: USDT (TRC-20), DOGE...", - "way_prefix_error": "Do not prepend memo itself with the prefix.", - "wrong_prefix_end": "Prefix should end with one of these characters: : - _", - "wrong_prefix_start": "Prefix should not start with space.", - "wrong_memo_start": "Memo should not start with space.", - "wrong_memo_end": "Memo should not end with space.", - "transfer_title_SYM": "Withdrawal of %(SYM)s", - "transfer_desc": "Withdrawal of tokens.", - "transfer_by": "by", - "transfer_way": "Where", - "transfer_no_memo": "To withdraw funds please fill the memo", - "no_way_error": "If you set at leas one of these fields, you should also set at least 1 withdrawal method or Details field.", - "no_to_error": "If you set withdraw via transfer with memo, please also set, to which account to transfer." - }, "invites_jsx": { "create_invite": "Create new invite check", "create_invite_info": "Cheques (invite codes) are a universal tool for transferring of GOLOS tokens to other people outside the blockchain. There are two ways to redeem the code: transfer its balance to your account or register a new account using it.", @@ -838,75 +630,10 @@ "APP_NAME_password_backup_required": "%(APP_NAME)s Password Backup (required)", "after_printing_write_down_your_user_name": "After printing, write down your user name" }, - "convert_assets_jsx": { - "description": [ - "Here you can sell or buy tokens.", - "Instantly and just in two clicks." - ], - "sell": "sell", - "buy": "buy", - "sell_amount": "Sell amount:", - "buy_amount": "Buy amount:", - "amount_with_fee": "Amount with fee:", - "price": "Price per ", - "no_tradables": "Cannot exchange this asset", - "please_authorize": "Please authorize.", - "too_low_amount": "Amount is too low, so order will be added into market queue.", - "too_much_amount1": "Instantly we can exchange ", - "too_much_amount2": " only (you will receive ", - "too_much_amount2a": " only (you will pay ", - "too_much_amount3": "). The rest of the funds ", - "too_much_amount4": " will be added into market queue.", - "no_orders_DIRECTION": "No tokens in %(DIRECTION)s at current moment. Order will be placed into market queue.", - "too_big_price": "No orders for that price, so exchange can take up to few days.", - "order_can_be_canceled": "If exchange will not occur even in the future, you can cancel the order, and funds will be refunded instantly.", - "coinmarketcap_value": "Value: ", - "finished": "Exchange is successful!", - "finished_desc": "Funds are on ", - "finished_balance": "your balance", - "partly": "Exchange proceed partly...", - "partly_desc": "There is remain to receive ", - "partly_desc2": ". Maybe older will proceed in few days. You can ", - "partly_link": "cancel the order.", - "partly_desc3": "Received amount is on ", - "not": "Exchange not yet proceed...", - "not_desc": "Exchange takes more time than usually. Maybe older will proceed in few days. If no, or if you cannot wait, you can ", - "price_warning": "This price is above than recommended one. Continue?" - }, - "converttosteem_jsx": { - "title_FROM_TO": "Convert %(FROM)s to %(TO)s", - "confirm_title": "Confirm Convert", - "this_will_take_days": "This action will take place 3.5 days from now and can not be canceled. These tokens will immediately become unavailable", - "tokens_will_be_unavailable": "This action will take place 3.5 days from now and can not be canceled. These tokens will immediately become unavailable", - "this_will_take_days_hint": "This is a price feed conversion. The 3.5 day delay is necessary to prevent abuse from gaming the price feed average", - "fee": "Fee will be ", - "no_fee": "No fee.", - "too_low_amount": "Too low amount.", - "you_will_receive": "You will receive " - }, "time_versions_jsx": { "rev": "rev.", "version_NUM": "(rev. %(NUM)s)" }, - "tips_js": { - "tip_balance_hint": "Balance that you use to reward users and that you use to earn rewards for yourself. Tokens from it can also be sent to increase the Golos Power.", - "tradeable_tokens_that_may_be_transferred_anywhere_at_anytime": "Tradable digital tokens that can be transferred anywhere at any time.", - "LIQUID_TOKEN_can_be_converted_to_VESTING_TOKEN_in_a_process_called_powering_up": "For example, converted to Golos Power or sent to the TIP balance for rewards.", - "tokens_worth_about_AMOUNT_of_LIQUID_TOKEN": "Tokens worth about %(TOKEN_WORTH)s in %(LIQUID_TICKER)s.", - "influence_tokens_which_give_you_more_control_over": "The more Golos Power you have, the higher the percentage goes to the TIP balance and the higher the impact on the project development by selecting delegates and supporting applications for funding from the workers foundation.", - "the_more_you_hold_the_more_you_influence_post_rewards": "The more you hold the more you influence post rewards and earn for accurate voting.", - "vesting_emission_per_day": "~ %(EMISSION_STAKE)s daily", - "vesting_emission_per_day_title": "Amount that, depending on the Golos Power, is transferred daily to the TIP balance\n(your share of the blockchain token issue per day)", - "the_estimated_value_is_based_on_an_average_value_of_steem_in_US_dollars": "The estimated cost is calculated on an 7-day average cost of %(LIQUID_TOKEN)s.", - "VESTING_TOKEN_is_non_transferrable_and_requires_convert_back_to_LIQUID_TOKEN": "%(VESTING_TOKEN2)s is non-transferrable and requires 1 month (4 payments) to convert back to %(LIQUID_TOKEN)s.", - "converted_VESTING_TOKEN_can_be_sent_to_yourself_but_can_not_transfer_again": "Converted %(VESTING_TOKEN)s can be sent to yourself or someone else but can not transfer again without converting back to %(LIQUID_TOKEN)s.", - "profile": "Profile", - "send_to_account": "Send to account", - "confirm_email": "Confirm Email", - "confirm_phone": "Please verify your phone number", - "authenticate_for_this_transaction": "Authenticate for this transaction", - "login_to_your_APP_NAME_account": "Login to your %(APP_NAME)s Account" - }, "promote_post_jsx": { "promote_post": "Promote Post", "buy_gbg": "you can buy GBG on the", @@ -933,7 +660,10 @@ "reveal_comment": "Reveal comment", "show_1_more_reply": "Show 1 more reply", "show_N_more_replies": "Show %(N)s more replies", - "show_N_more_replies_2": "Show %(N)s more replies" + "show_N_more_replies_2": "Show %(N)s more replies", + "1_comment": "1 reply", + "N_comments": "%(N)s replies", + "N_comments_2": "%(N)s replies" }, "poststub": { "onlyblog": "This post is only for author's followers.", @@ -1066,18 +796,6 @@ "add_account": "Add Account", "logout_all": "Log out all accounts" }, - "mobilevalidation_js": { - "not_be_empty": "not be empty", - "be_longer": "be longer", - "have_only_digits": "have only digits", - "you_can_change_your_number": "You can select another one phone number.", - "select_another_number": "Select another phone", - "waiting_from_you": "Waiting SMS message with confirmation code %(code)s from your number to our verification number %(phone)s.", - "waiting_from_you_line_1": "Please, send SMS with text %(code)s on %(phone)s", - "waiting_from_you_line_2": "Golos.id interested in registration real people, not robots. We ask you to send SMS.", - "attempts_10": "Confirmation was attempted a moment ago. You can try again only in 10 seconds", - "attempts_300": "Confirmation was attempted a moment ago. You can try again only in 5 minutes" - }, "chainvalidation_js": { "account_name_should": "Account name should ", "not_be_empty": "not be empty.", @@ -1171,34 +889,6 @@ "verified_exchange_no_memo": "You must include a memo for your exchange transfer, according to exchanger's rules.", "verified_exchange_liquid_only": "You may exchange tokens from GOLOS balance only." }, - "userwallet_jsx": { - "conversion_complete_tip": "Will complete on", - "in_conversion": "%(amount)s in conversion", - "transfer_to_savings": "Transfer to Savings", - "power_up": "Power Up", - "transfer_to_tip": "Transfer to TIP balance", - "donate": "Donate", - "power_down": "Power Down", - "market": "Market", - "convert_to_DEBT_TOKEN": "Convert to %(DEBT_TOKEN)s", - "convert_to_LIQUID_TOKEN": "Convert to %(LIQUID_TOKEN)s", - "withdraw_LIQUID_TOKEN": "Withdraw GOLOS", - "withdraw_DEBT_TOKENS": "Withdraw GBG", - "tokens_worth_about_1_of_LIQUID_TICKER": "Tradable digital tokens that, the price of which tends to the value of ~1 mg of gold in GOLOS tokens.", - "balances": "BALANCES", - "buy_LIQUID_TOKEN_or_VESTING_TOKEN": "Buy %(LIQUID_TOKEN)s or %(VESTING_TOKEN)s", - "savings": "SAVINGS", - "estimated_account_value": "Estimated Account Value", - "next_power_down_to_happen": "Power down in the size of", - "next_power_down_is_scheduled": "scheduled", - "transfers_are_temporary_disabled": "Transfers are temporary disabled.", - "cancel_power_down": "Cancel Power Down", - "top_dpos": "User rating on", - "account_idleness": "Your account has not had any actions using the active key for a long time", - "worker_foundation": "Workers foundation", - "history_viewing": "Operation history", - "history": "HISTORY" - }, "user_saga_js": { "image_upload": { "uploading": "Uploading", @@ -1226,22 +916,6 @@ "missing_active_authority": "Missing Active Authority", "voting_weight_is_too_small": "Voting weight is too small, please accumulate more voting power or steem power" }, - "delegatevestingshares_jsx":{ - "form_title": "Delegate %(VESTING_TOKEN2)s", - "delegate": "Delegate", - "edit": "Edit", - "emission_interest": "With right to receive %% emission for these tokens", - "revoke": "Revoke", - "interest": "%% Of Curate Rewards", - "interest_hint": "To account will be able to receive more curation rewards. This is a %% of your interest.", - "interest_short": "%% Of Interest", - "interest_short_hint_delegator": "That part of delegatee's curation rewards (on delegated GP) will be returned to you", - "interest_short_hint_delegatee": "That part of yours curation rewards (on delegated GP) will be returned to delegator", - "interest_short_hint_neutral": "That part of delegatee's curation rewards (on delegated GP) will be returned to delegator", - "too_large_percent": "Too large percent", - "vdo_exists": "You already have delegated some GP to this account. You could edit its amount, or revoke it at all.", - "no_interest_emission": "none (emission)" - }, "post_editor": { "new_editor": "Markdown", "html_editor": "HTML editor", @@ -1306,21 +980,6 @@ "confirm": "Confirmation", "prompt": "Enter the data" }, - "powerdown_jsx": { - "power_down": "Power Down", - "amount": "Amount", - "already_power_down": "You are already powering down %(AMOUNT)s %(LIQUID_TICKER)s (%(WITHDRAWN)s %(LIQUID_TICKER)s paid out so far). Note that if you change the power down amount the payout schedule will reset.", - "delegating": "You are delegating %(AMOUNT)s %(LIQUID_TICKER)s. That amount is locked up and not available to power down until the delegation is removed and a full reward period has passed.", - "per_week": "That's ~%(AMOUNT)s %(LIQUID_TICKER)s per week.", - "warning": "Leaving less than %(AMOUNT)s %(VESTING_TOKEN)s in your account is not recommended and can leave your account in a unusable state.", - "error": "Unable to power down (ERROR: %(MESSAGE)s)" - }, - "delegate_vesting_shares_info_jsx": { - "confirm_title": "Cancel %(VESTING_TOKENS)s delegation", - "confirm_cancel_delegation": "Are you sure you want to cancel %(VESTING_TOKEN2)s delegation (you will receive tokens back during 7 days)?", - "from": "From", - "to": "To" - }, "faq_jsq": { "page_title": "Frequently Asked Questions", "page_description": "This page contains popular user questions and official Golos Blockchain communication channels.", diff --git a/app/locales/ru-RU.json b/app/locales/ru-RU.json index 0076cbda6..5d9e5192a 100644 --- a/app/locales/ru-RU.json +++ b/app/locales/ru-RU.json @@ -11,10 +11,6 @@ "TOKEN_WORTH": "~1 мг золота", "TIP_TOKEN": "TIP-баланс" }, - "authorrewards_jsx": { - "estimated_author_rewards_last_week": "Оценочные авторские вознаграждения за неделю", - "author_rewards_history": "История авторских наград" - }, "category_selector_jsx": { "tag_your_story": "Добавьте тэги, первый станет категорией.", "select_a_tag": "Выбрать тэг", @@ -35,18 +31,6 @@ "add_account": "Добавить аккаунт", "logout_all": "Выйти из всех аккаунтов" }, - "mobilevalidation_js": { - "not_be_empty": "не может быть пустым", - "be_longer": "должен быть длиннее", - "have_only_digits": "должен состоять только из цифр", - "you_can_change_your_number": "Если вы ошиблись во время ввода адреса почты, вы можете ввести его заново.", - "select_another_number": "Указать другую почту", - "waiting_from_you": "Отправьте код %(code)s на номер %(phone)s для подтверждения вашего номера телефона.", - "waiting_from_you_line_1": "отправьте SMS с кодом %(code)s на номер %(phone)s", - "waiting_from_you_line_2": "Мы заинтересованы в регистрации реальных людей, а не ботов. Именно поэтому мы просим подтвердить вашу почту.", - "attempts_10": "На указанный ранее номер был выслан код. Изменить номер можно через 10 секунд", - "attempts_300": "На один номер мы можем зарегистрировать только одну учетную запись. Ввести новый номер можно через пять минут." - }, "chainvalidation_js": { "account_name_should": "Имя аккаунта должно ", "not_be_empty": "не может быть пустым.", @@ -64,17 +48,6 @@ "ok": "Да", "confirm": "Подтвердить" }, - "converttosteem_jsx": { - "title_FROM_TO": "Конвертация %(FROM)s в %(TO)s", - "confirm_title": "Подтвердите конвертацию", - "this_will_take_days": "Конвертация будет выполняться в течение 3.5 дней.", - "tokens_will_be_unavailable": "Её нельзя отменить и после запуска конвертируемые токены станут недоступны на балансе.", - "this_will_take_days_hint": "Отсрочка в 3.5 дня необходима для снижения злоупотреблений спекуляцией, конвертация пройдёт по средней ценовой котировке.", - "fee": "Комиссия составит ", - "no_fee": "Комиссии нет.", - "too_low_amount": "Слишком маленькая сумма.", - "you_will_receive": "Вы получите " - }, "do_not_bother": { "title": "Не беспокоить", "desc": "Пользователи с репутацией ниже 65 не смогут писать вам сообщения, отправлять переводы и донаты, только комментарии за отдельную плату", @@ -89,24 +62,6 @@ "window_confirm": "На сегодня вы достигли лимита данных операций. Хотите отправить операцию за %(AMOUNT)s с TIP-баланса?", "window_error": "На сегодня вы достигли лимита данных операций. Отправка операции возможна за %(AMOUNT)s на TIP-балансе. Недостаточно средств!" }, - "key_file": { - "file_title": "Keys Of @", - "file_desc": "There are private keys, which are authorizing your account. Store this file in secure place.", - "password_desc": "Password (use it to log in on Golos): ", - "posting_desc": "Posting Key (also can be used as Golos password): ", - "active_desc": "Active Key: ", - "owner_desc": "Owner Key: ", - "memo_desc": "Memo Key: " - }, - "curationrewards_jsx": { - "curation_rewards_last_24_hours": "Кураторские награды за последние 24 часа", - "daily_average_curation_rewards": "Среднесуточные кураторские награды", - "estimated_curation_rewards_last_week": "Оценочные кураторские награды за неделю", - "curation_rewards_last_week": "Кураторские награды за неделю", - "curation_rewards_history": "История кураторских наград", - "replenish_golos_power": "Пополните Силу Голоса", - "replenish_golos_power_AMOUNT": " на %(AMOUNT)s, чтобы начать получать свой процент за кураторство." - }, "explorepost_jsx": { "copied": "Скопировано!", "copy": "Скопировать", @@ -158,15 +113,6 @@ "mention_comment": "комментарии ", "you": "вас" }, - "filled_orders_jsx": { - "title": "История сделок на бирже", - "orders_info": "На блокчейне Голос есть свой DEX (decentralized exchange - децентрализованная биржа), а значит обменивать токены GOLOS и UIA (эмитированные пользователями активы к другим криптовалютам) возможно прямо здесь.", - "empty_NAME": "У %(NAME)s еще не было ни одной сделки. Купить и продать токены можно на ", - "empty2": "бирже", - "exchanged": "Обмен %(AMOUNT)s %(OWNER)s на %(AMOUNT2)s %(OWNER2)s", - "quick_convert": "Быстрый обмен", - "open_market": "Перейти к бирже" - }, "g": { "golos_fest": "Новости", "APP_NAME": "Голос", @@ -219,6 +165,7 @@ "date": "Дата", "decrypt": "Расшифровать", "delete": "Удалить", + "discussions": "Обсуждения", "dismiss": "Скрыть", "documentation": "Документация", "edit": "Редактировать", @@ -251,7 +198,7 @@ "change_acc": "Сменить аккаунт", "mentions": "Упоминания", "memo": "Ключ заметок", - "messages": "Сообщения", + "messages": "Мессенджер", "modified": " (изменено)", "more": "больше", "more_hint": "Подробнее", @@ -261,7 +208,7 @@ "next": "Следующий", "no": "Нет", "nothing_yet": "Пока ничего нет", - "ok": "Да", + "ok": "OK", "older": "Старее", "or": "или", "order_placed": "Заказ размещен", @@ -366,15 +313,6 @@ "passwords_do_not_match": "Пароли не совпадают", "no_topics_by_order_found": "В категории %(order)s за последние 7 дней постов нет...", "you_need_private_password_or_key_not_a_public_key": "Вам нужен приватный (не публичный) ключ ...", - "the_rules_of_APP_NAME": { - "one": "1. Не теряйте свой пароль.", - "second": "2. Это серьёзно, запишите сгенерированный пароль.", - "third": "3. Мы не сможем восстановить его.", - "fourth": "4. Если вы легко можете запомнить пароль, значит не так он и безопасен.", - "fifth": "5. Лучше используйте сгенерированные случайным образом пароли.", - "sixth": "6. Никому не говорите свой пароль.", - "seventh": "7. Всегда надёжно храните свой пароль." - }, "current_password": "Текущий пароль", "generated_password": "Сгенерированный пароль", "recover_password": "Восстановить доступ", @@ -535,17 +473,6 @@ "replies_to": "Ответы на", "comments_by": "Комментарии" }, - "exchanges_jsx": { - "title": "Покупка и продажа токенов", - "temporarily_disabled": "Ввод/вывод токенов временно отключён", - "guide_user": "Инструкция по интерфейсу биржи", - "pause": "Ввод/вывод токенов временно приостановлен...", - "total_supply": "Информация об общем количестве токенов", - "other_options": "за RUB / UAH / USD, банковские карты и многие другие варианты", - "questions": "Есть вопросы", - "community_chat": "Получить ответы можно как в чате сообщества", - "delegate_chat": "так и в чате делегатов" - }, "loginform_jsx": { "you_need_a_private_password_or_key": "Вам нужен приватный (не публичный) ключ ...", "cryptography_test_failed": "Криптографический тест провален", @@ -601,43 +528,10 @@ "reveal_comment": "Показать комментарий", "show_1_more_reply": "Еще 1 комментарий", "show_N_more_replies": "Еще %(N)s комментариев", - "show_N_more_replies_2": "Еще %(N)s комментария" - }, - "market_jsx": { - "action": "Действие", - "date_created": "Дата создания", - "date_trade": "Дата сделки", - "last_price": "Цена", - "24h_volume": "Объём за 24 часа", - "spread": "Разница (спред)", - "total": "Итого", - "available": "Доступно", - "lowest_ask": "Лучшая цена", - "highest_bid": "Лучшая цена", - "buy_orders": "Заказы на покупку", - "sell_orders": "Заказы на продажу", - "trade_history": "История сделок", - "open_orders": "Открытые сделки", - "sell_amount_for_atleast": "Продать %(amount_to_sell)s за %(min_to_receive)s по цене (%(effectivePrice)s)", - "buy_atleast_amount_for": "Купить по крайней мере %(min_to_receive)s за %(amount_to_sell)s (%(effectivePrice)s)", - "price_warning_above": "Эта цена выше текущей по рынку %(marketPrice)s, вы уверены?", - "price_warning_below": "Эта цена ниже текущей по рынку %(marketPrice)s, вы уверены?", - "order_cancel_confirm": "Отменить заказ %(order_id)s от %(user)s?", - "order_cancel_confirm_few": "Отменить %(order_cnt)s заказ(-а) от %(user)s?", - "order_cancel_all_confirm": "Отменить все заказы между %(symbol1)s и %(symbol2)s от %(user)s?", - "order_cancelled": "Заказ %(order_id)s отменен.", - "higher": "Дороже", - "lower": "Дешевле", - "total_DEBT_TOKEN_SHORT_CURRENCY_SIGN": "Сумма %(DEBT_TOKEN_SHORT)s", - "not_exists": " не существует", - "forbids": " запрещает торговлю с ", - "asset_problem_go_home": "Выбрать другую пару", - "asset_is_overridable": " может отзывать токены с баланса!", - "asset_": "Эмитент актива ", - "market_fee_percent_": "Комиссия ", - "market_depth_": "глубина рынка", - "market_pair": "Торговая пара", - "orders_canceled": "Ордеры успешно отменены." + "show_N_more_replies_2": "Еще %(N)s комментария", + "1_comment": "1 комментарий", + "N_comments": "%(N)s комментариев", + "N_comments_2": "%(N)s комментария" }, "navigation": { "about": "О проекте", @@ -663,7 +557,7 @@ "sign_up": "СОЗДАТЬ АККАУНТ", "welcome": "Добро пожаловать", "feedback": "Обратная связь", - "search": "Поиск по контенту", + "search": "Поиск по блогам", "services": "Сервисы, игры, боты", "wiki": "База знаний (Wiki)", "faq": "Вопросы и ответы", @@ -693,7 +587,11 @@ "post_jsx": { "now_showing_comments_with_low_ratings": "Отображаем скрытые комментарии", "sort_order": "Порядок сортировки", - "comments_were_hidden_due_to_low_ratings": "Часть комментариев скрыта из-за низкого рейтинга или автором блога" + "comments_were_hidden_due_to_low_ratings": "Часть комментариев скрыта из-за низкого рейтинга или автором блога", + "subscribe_comments": "Подписаться на новые", + "subscribe_comments_long": "Подписаться на новые комментарии", + "unsubscribe": "Отписаться от новых", + "unsubscribe_long": "Отписаться от новых комментариев" }, "postfull_jsx": { "this_post_is_not_available_due_to_breach_of_legislation": "Этот пост недоступен из-за жалобы о нарушении законодательства.", @@ -858,68 +756,10 @@ "APP_NAME_password_backup_required": "%(APP_NAME)s резервное копирование пароля (обязательно!)", "after_printing_write_down_your_user_name": "После печати запишите ваше имя пользователя" }, - "convert_assets_jsx": { - "description": [ - "Здесь можно купить или продать токены.", - "В пару кликов и мгновенно." - ], - "sell": "продать", - "buy": "купить", - "sell_amount": "Сумма продажи:", - "buy_amount": "Сумма покупки:", - "amount_with_fee": "Сумма с комиссией:", - "price": "Цена за ", - "no_tradables": "Этот актив не меняется", - "please_authorize": "Пожалуйста, авторизуйтесь.", - "too_low_amount": "Сумма слишком маленькая, сделка будет поставлена в очередь на бирже.", - "too_much_amount1": "Обмен ", - "too_much_amount2": " (вы получите ", - "too_much_amount2a": " (вы заплатите ", - "too_much_amount3": "). Остальные ", - "too_much_amount4": " будут поставлены в очередь на бирже.", - "no_orders_DIRECTION": "Сейчас нет токенов по направлению %(DIRECTION)s. Сделка будет поставлена в очередь на бирже.", - "too_big_price": "Пока что нет ордеров по такой цене, так что обмен займет до нескольких дней.", - "order_can_be_canceled": "Если обмена не произойдет и в дальнейшем, вы сможете отменить сделку в кошельке и средства будут мгновенно возвращены.", - "coinmarketcap_value": "Ценность: ", - "finished": "Обмен прошел успешно!", - "finished_desc": "Токены уже лежат на ", - "finished_balance": "вашем балансе", - "partly": "Обмен прошел частично...", - "partly_desc": "Осталось получить ", - "partly_desc2": ". Возможно, сделка пройдет в течение нескольких дней. Вы можете ", - "partly_link": "отменить сделку", - "partly_desc3": "Полученная часть суммы лежит на ", - "not": "Обмен пока не прошел...", - "not_desc": "Обмен идет дольше обычного. Возможно, он пройдет за несколько дней. Если этого не произойдет или если вы не можете ждать, то можно ", - "price_warning": "Эта цена выше текущей (менее выгодна для вас), чем рыночная. Продолжить обмен?" - }, "time_versions_jsx": { "rev": "ред.", "version_NUM": "(версия %(NUM)s)" }, - "time_versions_jsx": { - "rev": "ред.", - "version_NUM": "(версия %(NUM)s)" - }, - "tips_js": { - "tip_balance_hint": "Для вознаграждений пользователей, и на который получаете вознаграждения сами. Токены с него можно также отправить на увеличение Силы Голоса.", - "tradeable_tokens_that_may_be_transferred_anywhere_at_anytime": "Торгуемые цифровые токены, которые могут переданы куда угодно в любой момент.", - "LIQUID_TOKEN_can_be_converted_to_VESTING_TOKEN_in_a_process_called_powering_up": "Например, сконвертированы в %(VESTING_TOKEN2)s, отправлены на TIP-баланс для вознаграждений или биржу.", - "tokens_worth_about_AMOUNT_of_LIQUID_TOKEN": "Перемещаемые цифровые токены, цена которых всегда равна %(amount)s в %(LIQUID_TOKEN)s.", - "influence_tokens_which_give_you_more_control_over": "Чем больше СГ, тем значимее доля от эмиссии на TIP-баланс и выше влияние на развитие проекта путём выбора делегатов, поддержки заявок воркеров на финансирование из фонда.", - "the_more_you_hold_the_more_you_influence_post_rewards": "Чем больше у вас %(VESTING_TOKENS)s, тем сильней вы влияете на вознаграждения, выбор делегатов и поддержку заявок воркеров.'", - "vesting_emission_per_day": "~ %(EMISSION_STAKE)s ежедневно", - "vesting_emission_per_day_title": "Сумма, которая в зависимости от Силы Голоса ежедневно поступает на TIP-баланс\n(ваша доля от эмиссии токенов блокчейна в сутки)", - "the_estimated_value_is_based_on_an_average_value_of_steem_in_US_dollars": "Рассчитывается из 7-ми дневной средней стоимости токенов Голос.", - "VESTING_TOKEN_is_non_transferrable_and_requires_convert_back_to_LIQUID_TOKEN": "Вам потребуются 4 недели (вывод раз в неделю равными долями), чтобы перевести её обратно в ликвидные токены Голос.", - "converted_VESTING_TOKEN_can_be_sent_to_yourself_but_can_not_transfer_again": "Конвертированная %(VESTING_TOKEN)s может быть отправлена себе или кому-то еще, но не может быть передана вновь без конвертирования назад в %(LIQUID_TOKEN)s.", - "profile": "Профиль", - "send_to_account": "Отправить аккаунту", - "confirm_email": "Подтвердить email", - "confirm_phone": "Пожалуйста подтвердите ваш телефон", - "authenticate_for_this_transaction": "Авторизуйтесь для этой транзакции", - "login_to_your_APP_NAME_account": "Зайдите в ваш %(APP_NAME)s аккаунт" - }, "transfer_jsx": { "amount_is_in_form": "Сумма должна быть в формате 99999.999", "insufficient_funds": "Недостаточно средств", @@ -997,6 +837,7 @@ "user_hasnt_started_bloggin_yet": "Похоже, что %(name)s еще не завёл блог!", "user_hasnt_followed_anything_yet": "Похоже, что %(name)s еще ни на кого не подписан! Если, %(name)s недавно подписался на новых пользователей, их персонализированный канал будет заполняться сразу после появления нового контента.", "user_hasnt_had_any_replies_yet": "%(name)s еще не получил ответов", + "user_hasnt_followed_anything": "Подпишитесь на комментарии к любому посту, и вы будете получать уведомления обо всех новых комментариях.", "if_you_recently_added_new_users_to_follow": "Если вы недавно добавили новых пользователей, ваш персонализированный фид будет заполняться сразу после появления нового контента.", "explore_APP_NAME": "Исследовать %(APP_NAME)s", "full_faq": "Детальное FAQ %(APP_NAME)s", @@ -1029,99 +870,6 @@ }, "account_frozen": "Аккаунт временно деактивирован." }, - "assets_jsx": { - "assets_info": "User Issued Assets - эмитированные пользователями активы (токены), которыми можно вознаграждать других, торговать на внутренней бирже, обмениваться, использовать в различных сервисах на блокчейне.", - "create_asset": "Создание актива", - "symbol": "Тикер", - "symbol_too_short": "Не менее 3 символов", - "subsymbol_too_short": "Слишком короткий тикер второго уровня", - "symbol_exists": "Такой тикер уже существует", - "top_symbol_not_your": "Тикер верхнего уровня не принадлежит вам", - "top_symbol_not_exists": "Тикер верхнего уровня не существует", - "max_supply": "Максимальное количество", - "precision": "Кол-во знаков после запятой", - "allow_fee": "Разрешить устанавливать торговую комиссию", - "allow_override_transfer": "Разрешить отзывать токены эмитентом актива (TIP-баланс будет недоступен)", - "allow_danger_note": "Вы не сможете изменить разрешения после создания актива!", - "create_btn": "Создать актив", - "description": "Ссылка на описание токена", - "image_with_text": "Ссылка на изображение тикера (48x48)", - "my_assets": "Мои активы", - "all_assets": "Все активы", - "load_more": "Показать все", - "anti_load_more": "Свернуть", - "creator": "Эмитент", - "supply_count": "Выпущено токенов", - "issue_btn": "Выпустить", - "update_btn": "Изменить", - "balance": "основной баланс", - "tip_balance": "TIP-баланс", - "overridable_no_tip": "Отзывные токены не поддерживают TIP-баланс", - "update_asset": "Изменение актива", - "fee_percent": "Торговая комиссия (%%)", - "fee_not_allowed": "У этого актива торговая комиссия запрещена при создании", - "symbols_whitelist": "Активы, к которым разрешено торговать (каждый в новой строке, если пусто - ко всем)", - "transfer_asset_btn": "Передать права на актив", - "transfer_asset_btn2": "Передать", - "transfer_asset": "Передача актива", - "transfer_new_owner": "Кому", - "cannot_transfer_to_oneself": "Нельзя передать актив самому себе.", - "trade_asset": "Перейти к торгам на внутренней бирже", - "mute_asset": "Не показывать этот актив", - "mute_asset_confirm_TICKER": "Подтвердить скрытие %(TICKER)s? Вернуть актив можно будет в разделе Настройки вашего профиля.", - "deposit": "Депозит", - "withdrawal": "Вывод" - }, - "asset_edit_deposit_jsx": { - "title": "Правила депозита", - "to_type_fixed": "Фиксированный адрес", - "to_type_transfer": "Запрос адреса шлюза", - "to_type_api": "Запрос адреса с API", - "to_fixed": "Куда завести средства (адрес/аккаунт):", - "to_transfer": "Куда отправить 0.001 GOLOS, чтобы получить адрес:", - "to_api": "Шаблон URL для запроса, в шаблон будет вставляться имя текущего пользователя:", - "to_api_example": "Пример: https://site.ru/get_address/", - "to_api_confirm": "Ваше API же сможет обработать, например, такой запрос: ", - "to_api_description": "URL должен возвращать ответ в формате JSON-объекта.\nПример ответа:", - "to_api_error_url": "URL должен начинаться с http:// или https://", - "to_api_error": "Шаблон должен содержать - место для имени.", - "memo_fixed": "Заметка/memo:", - "memo_transfer": "Заметка (к переводу 0.001 GOLOS):", - "transfer_title_SYM": "Депозит %(SYM)s", - "transfer_desc": "Для получения адреса пополнения отправьте 0.001 GOLOS на аккаунт ", - "transfer_desc_2": " с заметкой ", - "waiting": "Перевод 0.001 GOLOS отправлен. Ответный трансфер с адресом поступит в течение ~5-10 минут...", - "timeouted": "Трансфер с адресом не получен. Проверьте кошелек позднее или обратитесь к эмитенту ", - "api_error": "Не удается получить адрес. Попробуйте позднее. Если проблема сохраняется, свяжитесь с эмитентом ", - "api_error_details": "и сообщите подробности ошибки:" - }, - "asset_edit_withdrawal_jsx": { - "title": "Правила вывода", - "to": "Отправить токены на адрес/аккаунт: ", - "min_amount": "Минимальная сумма: ", - "details": "Дополнительно: ", - "unavailable": "Шлюз на техобслуживании", - "way_name": "Название сети: ", - "way_name_placeholder": "USDT (TRC-20)", - "way_memo": "Заметка к переводу: ", - "way_memo_placeholder": "адрес-USDT-кошелька", - "way_prefix": "Префикс заметки (если нужен): ", - "way_prefix_placeholder": "tron:", - "way_add": "Добавить способ вывода", - "way_name_error": "Укажите название сети/системы, например: USDT (TRC-20), AdvCash, QIWI (на телефон).", - "way_prefix_error": "Префикс не нужно указывать в самой заметке.", - "wrong_prefix_end": "Префикс должен заканчиваться на один из символов: : - _", - "wrong_prefix_start": "Префикс не должен начинаться с пробела.", - "wrong_memo_start": "Заметка не должна начинаться с пробела.", - "wrong_memo_end": "Заметка не должна заканчиваться пробелом.", - "transfer_title_SYM": "Вывод %(SYM)s", - "transfer_desc": "Вывод средств с баланса.", - "transfer_by": "через", - "transfer_way": "куда", - "transfer_no_memo": "Для вывода средств укажите заметку", - "no_way_error": "Если вы заполнили одно из полей, то вы должны указать хотя бы один способ вывода или заполнить Дополнительно.", - "no_to_error": "Если вы указали вывод через перевод с заметкой, то укажите, куда переводить." - }, "invites_jsx": { "create_invite": "Создание чека", "create_invite_info": "Чеки (инвайт-коды) — инструмент для передачи токенов другим людям вне блокчейна. Использовать чек можно двумя способами: перевести его баланс на аккаунт (форма для этого ниже) или зарегистрировать с его помощью новый аккаунт.", @@ -1157,35 +905,6 @@ "the_private_key_or_password_should_be_kept_offline": "Приватный ключ владельца (если вы его получали) и главный пароль лучше хранить в оффлайне.", "the_memo_key_is_used_to_create_and_read_memos": "Memo-ключ для зашифрованных заметок и обмена сообщениями через мессенджер." }, - "userwallet_jsx": { - "conversion_complete_tip": "Завершается", - "in_conversion": "%(amount)s на конвертации", - "transfer_to_savings": "Перевести в сейф", - "power_up": "Увеличить Силу Голоса", - "transfer_to_tip": "Пополнить TIP-баланс", - "donate": "Отблагодарить", - "transfer_to_liquid": "Пополнить основной баланс", - "power_down": "Уменьшить Силу Голоса", - "market": "Внутренняя биржа", - "convert_to_DEBT_TOKEN": "Конвертация в GBG", - "convert_to_LIQUID_TOKEN": "Конвертация в GOLOS", - "withdraw_LIQUID_TOKEN": "Вывести GOLOS на основной баланс", - "withdraw_DEBT_TOKENS": "Вывести GBG на основной баланс", - "tokens_worth_about_1_of_LIQUID_TICKER": "Торгуемые на внутренней бирже токены, цена которых равна стоимости %(TOKEN_WORTH)s в токенах ГОЛОС.", - "balances": "БАЛАНСЫ", - "buy_LIQUID_TOKEN_or_VESTING_TOKEN": "Купить %(LIQUID_TOKEN)s или %(VESTING_TOKEN2)s", - "savings": "СЕЙФ", - "estimated_account_value": "Оценочная стоимость аккаунта", - "next_power_down_to_happen": "Понижение Силы Голоса в размере", - "next_power_down_is_scheduled": "запланировано", - "transfers_are_temporary_disabled": "Переводы временно отключены.", - "cancel_power_down": "Отменить понижение Силы Голоса", - "top_dpos": "Рейтинг пользователей на", - "account_idleness": "На аккаунте давно не было действий с использованием активного ключа", - "worker_foundation": "Фонд сообщества", - "history_viewing": "История операций", - "history": "ИСТОРИЯ" - }, "votesandcomments_jsx": { "no_responses_yet_click_to_respond": "Комментариев пока нет. Нажмите, чтобы перейти к обсуждению.", "response_count": { @@ -1193,6 +912,11 @@ "one": "1 комментарий", "other": "%(count)s комментариев" }, + "view_count": { + "zero": "0 просмотров", + "one": "1 просмотр", + "other": "%(count)s просмотров" + }, "click_to_respond": "Нажмите, чтобы перейти к обсуждению", "vote_count": { "zero": "0 голосов", @@ -1230,43 +954,6 @@ "please_remove_following_html_elements": "Пожалуйста, удалите эти HTML элементы из вашего поста: ", "payouts_declined": "Выплаты из пула отключены" }, - "witnesses_jsx": { - "witness_info": "Делегаты - это избираемые голосованием сообщества пользователи, которые поддерживают работу своих нод блокчейна и принимают решения об обновлении кода, также занимаются и другими вопросами, связанными с развитием проекта.", - "witness_thread": "пост делегата", - "top_witnesses": "Топ делегатов", - "what_is_api": "API-ноды имеют повышенные требования к ресурсам сервера, именно через них происходят запросы к блокчейну на получение/отправку информации, они важны для развития различных клиентов и сервисов...", - "what_is_seed": "SEED-ноды являются основой обмена данными для функционирования блокчейна, принимая и раздавая блоки они разгружают пропускную способность сети, снижая отклик для территориально близких подключений...", - "approval": "СГ в поддержку", - "missed_1": "Пропущено", - "missed_2": "блоков", - "last_block": "Последний блок", - "price_feed": "Прайс фид", - "props": "Параметры", - "reg_fee": "Комиссия за регистрацию", - "apr": "APR по GBG", - "block_size": "Размер блока", - "witness_deactive": "Делегат приостановил подпись блоков", - "no_price_feed": "Делегат не опубликовал прайс фид", - "version": "Версия", - "you_can_vote_for_maximum_of_witnesses": "Вы можете голосовать максимум за 30 делегатов", - "chat_delegates": "Чат делегатов", - "chain_properties": "Параметры сети", - "witness": "Делегаты", - "witness_0": "Вы пока не поддержали ни одного делегата", - "witness_1": "делегата с силой", - "witness_2": "делегатов с силой", - "witness_supported": "Вы поддержали", - "witness_addon": "за каждого из них", - "information": "Информация", - "load_more": "Показать еще", - "if_you_want_to_vote_outside_of_top_enter_account_name": "Если вы хотите проголосовать за делегата вне TOP 100, введите имя аккаунта ниже", - "set_witness_proxy": "Вы также можете выбрать прокси, который будет вместо вас голосовать за делегатов. Это сбросит ваш текущий выбор делегатов.", - "witness_set": "Вы установили прокси для голосования за делегатов. Хотите голосовать сами - отмените его.", - "witness_proxy_current": "Ваш текущий прокси", - "witness_proxy_set": "Установить прокси", - "witness_proxy_clear": "Отменить прокси", - "proxy_update_error": "Ваш прокси не был обновлен" - }, "user_saga_js": { "image_upload": { "uploading": "Загрузка", @@ -1296,22 +983,6 @@ "user_blocked_user": "Пользователь заблокировал вас. Теперь это действие только за плату - с TIP-баланса.", "user_blocked_user_no_tip": "Пользователь заблокировал вас." }, - "delegatevestingshares_jsx":{ - "form_title": "Делегировать %(VESTING_TOKEN2)s", - "delegate": "Делегировать", - "edit": "Изменить", - "emission_interest": "С правом получения %% эмиссии на эти токены", - "revoke": "Отозвать", - "interest": "%% возврата с кураторских выплат", - "interest_hint": "Пользователь сможет получать больше кураторских выплат. Выберите %%, сколько от этой надбавки возвращать вам.", - "interest_short": "%% возврата", - "interest_short_hint_delegator": "Вы будете получать часть кураторских выплат получателя, начисляемых на делегированную СГ", - "interest_short_hint_delegatee": "Делегатору будет возвращаться часть кураторских выплат, начисляемых вам на делегированную СГ", - "interest_short_hint_neutral": "Делегатору будет возвращаться часть кураторских выплат получателя, начисляемых ему на делегированную СГ", - "too_large_percent": "Слишком большой процент", - "vdo_exists": "Вы уже делегировали этому аккаунту. Вы можете изменить количество СГ или отозвать делегирование.", - "no_interest_emission": "с правом на эмиссию" - }, "post_editor": { "new_editor": "Markdown", "html_editor": "HTML редактор", @@ -1377,21 +1048,6 @@ "confirm": "Подтверждение", "prompt": "Введите данные" }, - "powerdown_jsx": { - "power_down": "Уменьшить Силу Голоса", - "amount": "Количество", - "already_power_down": "Вы уже запустили понижение СГ на %(AMOUNT)s %(LIQUID_TICKER)s (из них %(WITHDRAWN)s выплачено). Если вы измените количество, отсчёт недель понижения начнётся заново.", - "delegating": "Вы делегировали %(AMOUNT)s %(LIQUID_TICKER)s. Эти токены заблокированы, в случае отмены делегирования они вернутся на баланс через 7 дней.", - "per_week": "Это ~%(AMOUNT)s %(LIQUID_TICKER)s в неделю (в течение 4 недель).", - "warning": "Оставлять меньше чем %(AMOUNT)s %(LIQUID_TICKER)s не рекомендуется, т.к. это может остановить все транзакции с использованием это аккаунта.", - "error": "Не удалось уменьшить Силу Голоса (ERROR: %(MESSAGE)s)" - }, - "delegate_vesting_shares_info_jsx": { - "confirm_title": "Отмена делегирования %(VESTING_TOKENS)s", - "confirm_cancel_delegation": "Вы действительно хотите отозвать делегированную %(VESTING_TOKEN2)s у пользователя %(delegatee)s (токены вернутся на ваш баланс через 7 дней)?", - "from": "От кого", - "to": "Кому" - }, "faq_jsq": { "page_title": "Часто задаваемые вопросы", "page_description": "На этой странице собраны популярные вопросы пользователей и официальные каналы коммуникаций Golos Blockchain", diff --git a/app/redux/AuthSaga.js b/app/redux/AuthSaga.js index acd820968..3353a6c33 100644 --- a/app/redux/AuthSaga.js +++ b/app/redux/AuthSaga.js @@ -3,10 +3,7 @@ import {Set, Map, fromJS, List} from 'immutable' import user from 'app/redux/User' import {getAccount} from 'app/redux/SagaShared' import {PrivateKey} from 'golos-lib-js/lib/auth/ecc'; -import {api} from 'golos-lib-js'; - -// operations that require only posting authority -const postingOps = Set(`vote, comment, delete_comment, custom_json, account_metadata, donate, worker_request_vote, account_setup`.trim().split(/,\s*/)) +import { broadcast, api } from 'golos-lib-js'; export function* authWatches() { yield fork(watchForAuth) @@ -98,10 +95,10 @@ function pubkeyThreshold({pubkeys, authority}) { export function* findSigningKey({opType, username, password}) { let authTypes - if (postingOps.has(opType)) { + const opInfo = broadcast._operations[opType] + if (opInfo && opInfo.roles[0] === 'posting') { authTypes = 'posting, active' - } - else { + } else { authTypes = 'active, owner' } authTypes = authTypes.split(', ') diff --git a/app/redux/FetchDataSaga.js b/app/redux/FetchDataSaga.js index 758a8eaca..f3d4ca1ae 100644 --- a/app/redux/FetchDataSaga.js +++ b/app/redux/FetchDataSaga.js @@ -6,12 +6,15 @@ import { getPinnedPosts, getMutedInNew } from 'app/utils/NormalizeProfile'; import {loadFollows, fetchFollowCount} from 'app/redux/FollowSaga'; import { getBlockings, listBlockings } from 'app/redux/BlockingSaga' import { contentPrefs as prefs } from 'app/utils/Allowance' -import {getContent} from 'app/redux/SagaShared'; +import { applyEventHighlight, getContent } from 'app/redux/SagaShared' import GlobalReducer from './GlobalReducer'; import constants from './constants'; +import session from 'app/utils/session' import { reveseTag, getFilterTags } from 'app/utils/tags'; import { PUBLIC_API, CATEGORIES, SELECT_TAGS_KEY, DEBT_TOKEN_SHORT, LIQUID_TICKER } from 'app/client_config'; +import { getSubs, notifyGetViews, } from 'app/utils/NotifyApiClient' import { SearchRequest, searchData, stateSetVersion } from 'app/utils/SearchClient' +import { hashPermlink, } from 'app/utils/StateFunctions' export function* fetchDataWatches () { yield fork(watchLocationChange); @@ -105,7 +108,8 @@ export function* fetchState(location_change_action) { const uname = parts[0].substr(1) const [ account ] = yield call([api, api.getAccountsAsync], [uname]) state.accounts[uname] = account - + delete state.accounts[uname].discussions + if (account) { state.accounts[uname].tags_usage = yield call([api, api.getTagsUsedByAuthorAsync], uname) state.accounts[uname].guest_bloggers = yield call([api, api.getBlogAuthorsAsync], uname) @@ -125,6 +129,41 @@ export function* fetchState(location_change_action) { }) break + case 'discussions': + state.accounts[uname].discussions = [] + const accName = session.load().currentName + if (accName && uname === accName) { + let res, subs + try { + res = yield getSubs(accName) + } catch (err) { + } + const ids = [] + if (res && res.result) { + subs = res.result.subs + for (let sub of subs) { + const [ author, permlink ] = sub.entityId.split('|') + ids.push({ + author, + hashlink: sub.hashlink + }) + } + } + if (ids.length) { + const previews = yield call([api, api.getContentPreviewsAsync], ids, 500) + for (const i in previews) { + const { author, permlink } = previews[i] + checkAuthor(author) + const link = `${author}/${permlink}` + state.accounts[uname].discussions.push(link) + state.content[link] = previews[i] + state.content[link].from_preview = true + state.content[link].event_count = subs[i] ? subs[i].eventCount : 0 + } + } + } + break + case 'posts': case 'comments': const filter_tags = curUser ? ['test'] : getFilterTags() @@ -138,25 +177,35 @@ export function* fetchState(location_change_action) { }) break - case 'feed': + case 'feed': { const feedEntries = yield call([api, api.getFeedEntriesAsync], uname, 0, 20, ['fm-']) state.accounts[uname].feed = [] - for (let key in feedEntries) { - const { author, permlink } = feedEntries[key] + const ids = [] + + for (const i in feedEntries) { + const { author, hashlink } = feedEntries[i] + + ids.push({ author, hashlink }) + } + + const previews = yield call([api, api.getContentPreviewsAsync], ids, 10000) + for (const i in previews) { + const { author, permlink } = previews[i] const link = `${author}/${permlink}` state.accounts[uname].feed.push(link) - state.content[link] = yield call([api, api.getContentAsync], author, permlink, constants.DEFAULT_VOTE_LIMIT) + state.content[link] = previews[i] + state.content[link].from_preview = true checkAuthor(author) - if (feedEntries[key].reblog_by.length > 0) { - state.content[link].first_reblogged_by = feedEntries[key].reblog_by[0] - state.content[link].reblogged_by = feedEntries[key].reblog_by - state.content[link].first_reblogged_on = feedEntries[key].reblog_on + if (feedEntries[i].reblog_by.length > 0) { + state.content[link].first_reblogged_by = feedEntries[i].reblog_by[0] + state.content[link].reblogged_by = feedEntries[i].reblog_by + state.content[link].first_reblogged_on = feedEntries[i].reblog_on } } - break + } break case 'reputation': const rhistory = yield call([api, api.getAccountHistoryAsync], uname, -1, 1000, {select_ops: ['account_reputation']}); @@ -190,17 +239,33 @@ export function* fetchState(location_change_action) { state.accounts[uname].blog = [] let pinnedPosts = getPinnedPosts(account) - blogEntries.unshift(...pinnedPosts) + for (const pp of pinnedPosts){ + const hashlink = hashPermlink(pp.permlink) + blogEntries.unshift({ + author: pp.author, hashlink, reblog_on: pp.reblog_on + }) + } + + const ids = [] + + for (const i in blogEntries) { + const { author, hashlink } = blogEntries[i] + + ids.push({ author, hashlink }) + } + + const previews = yield call([api, api.getContentPreviewsAsync], ids, 10000) + for (const i in previews) { + const { author, permlink } = previews[i] - for (let key in blogEntries) { - const { author, permlink } = blogEntries[key] const link = `${author}/${permlink}` - state.content[link] = yield call([api, api.getContentAsync], author, permlink, constants.DEFAULT_VOTE_LIMIT) + state.content[link] = previews[i] + state.content[link].from_preview = true state.accounts[uname].blog.push(link) - - if (blogEntries[key].reblog_on !== '1970-01-01T00:00:00') { - state.content[link].first_reblogged_on = blogEntries[key].reblog_on + + if (blogEntries[i].reblog_on !== '1970-01-01T00:00:00') { + state.content[link].first_reblogged_on = blogEntries[i].reblog_on } } break @@ -219,6 +284,14 @@ export function* fetchState(location_change_action) { accounts.add(account) checkAuthor(account) + try { + const views = yield notifyGetViews([state.content[curl].id]) + state.content[curl].views = views.result[0].views || 0 + } catch (err) { + console.error(err) + state.content[curl].views = 0 + } + state.content[curl].donate_list = []; if (state.content[curl].donates != '0.000 GOLOS') { const donates = yield call([api, api.getDonatesAsync], false, {author: account, permlink: permlink}, '', '', 20, 0, true) @@ -260,8 +333,11 @@ export function* fetchState(location_change_action) { state.content[link].donate_uia_list = yield call([api, api.getDonatesAsync], true, {author: reply.author, permlink: reply.permlink}, '', '', 20, 0, true) } state.content[link].confetti_active = false + state.content[link].sub_event = false } + yield applyEventHighlight(state.content, account, permlink, curUser) + let args = { truncate_body: 128, select_categories: [category], filter_tag_masks: ['fm-'], filter_tags: getFilterTags(), prefs: prefs(curUser) }; diff --git a/app/redux/GlobalReducer.js b/app/redux/GlobalReducer.js index 1cc2ea0ae..59c7b9b1c 100644 --- a/app/redux/GlobalReducer.js +++ b/app/redux/GlobalReducer.js @@ -152,6 +152,17 @@ export default createModule({ }); }, }, + { + action: 'MARK_SUB_READ', + reducer: (state, { payload: { author, permlink } }) => { + const key = author + '/' + permlink + return state.updateIn(['content', key], Map(), c => { + c = c.set('highlighted', false) + c = c.set('event_count', 0) + return c + }) + } + }, { action: 'RECEIVE_WORKER_REQUEST', reducer: (state, { payload: { wr } }) => { @@ -439,6 +450,17 @@ export default createModule({ return newState; }, }, + { + action: 'UNSUBSCRIBE_POST', + reducer: (state, { payload: { account, author, permlink } }) => { + const link = `${author}/${permlink}` + const newState = state.updateIn(['accounts', account, 'discussions'], data => { + data = data.filter(v => v !== link) + return data + }) + return newState + } + }, { action: 'REQUEST_META', reducer: (state, { payload: { id, link } }) => diff --git a/app/redux/SagaShared.js b/app/redux/SagaShared.js index a16891f73..18d9be38b 100644 --- a/app/redux/SagaShared.js +++ b/app/redux/SagaShared.js @@ -1,8 +1,10 @@ import { fromJS } from 'immutable' -import { fork, call, put, select, takeEvery } from 'redux-saga/effects'; +import { fork, call, put, select, takeEvery } from 'redux-saga/effects' +import { api } from 'golos-lib-js' + +import constants from './constants' import g from 'app/redux/GlobalReducer' -import constants from './constants'; -import { api } from 'golos-lib-js'; +import { isHighlight, getEvents } from 'app/utils/NotifyApiClient' export function* sharedWatches() { yield fork(watchTransactionErrors) @@ -64,3 +66,23 @@ export function* getWorkerRequest({author, permlink, voter}) { yield put(g.actions.receiveWorkerRequest({wr})) } } + +export function* applyEventHighlight(contentMap, author, permlink, curUser) { + if (isHighlight() && curUser) { + let events = [] + try { + events = yield getEvents(curUser, author, permlink) + } catch (err) {} + const now = Date.now() + for (const event of events) { + try { + const ed = JSON.parse(event.data) + const link = `${ed.author}/${ed.permlink}` + contentMap[link].sub_event = event + } catch (err) { + console.error('Cannot apply Sub API event', event.data, err) + } + } + contentMap[author + '/' + permlink].highlighted = true + } +} diff --git a/app/redux/TransactionSaga.js b/app/redux/TransactionSaga.js index 7b2287f8d..0822a0c5b 100644 --- a/app/redux/TransactionSaga.js +++ b/app/redux/TransactionSaga.js @@ -204,9 +204,12 @@ function* broadcastOperation( payload.keys.push(signingKey) else { if (!password) { + const opInfo = broadcast._operations[type] + let authType = opInfo && opInfo.roles[0] + if (authType === 'posting') authType = '' yield put(user.actions.showLogin({ operation: {type, operation: op, trx, username, successCallback, errorCallback, saveLogin: true}, - loginDefault: { username, authType: (type == 'transfer' || type == 'account_witness_vote' || type == 'account_witness_proxy') ? 'active' : '' } + loginDefault: { username, authType } })) return } diff --git a/app/redux/Transaction_Error.js b/app/redux/Transaction_Error.js index c8ac7be5a..9419aa4de 100644 --- a/app/redux/Transaction_Error.js +++ b/app/redux/Transaction_Error.js @@ -50,8 +50,8 @@ export default function transactionErrorReducer( ) ) { errorKey = - 'Account requires 10x the account creation fee in Golos Power ' + - '(approximately 300 SP) before it can power down.'; + 'To power down requires 10x the account creation fee in Golos Power ' + + '(~ 1000 GP) before it can power down.'; } else if ( errorStr.includes( 'Account does not have sufficient Golos Power for withdraw.' diff --git a/app/redux/User.js b/app/redux/User.js index 006d0a1fc..e93493851 100644 --- a/app/redux/User.js +++ b/app/redux/User.js @@ -50,27 +50,6 @@ export default createModule({ { action: 'SAVE_LOGIN_CONFIRM', reducer: (state, {payload}) => state.set('saveLoginConfirm', payload) }, { action: 'SAVE_LOGIN', reducer: (state) => state }, // Use only for low security keys (like posting only keys) { action: 'GET_ACCOUNT', reducer: (state) => state }, - { action: 'REMOVE_HIGH_SECURITY_KEYS', reducer: (state) => { - if(!state.hasIn(['current', 'private_keys'])) return state - let empty = false - state = state.updateIn(['current', 'private_keys'], private_keys => { - if(!private_keys) return null - if(private_keys.has('active_private')) - console.log('removeHighSecurityKeys') - private_keys = private_keys.delete('active_private') - empty = private_keys.size === 0 - return private_keys - }) - if(empty) { - // User logged in with Active key then navigates away from the page - // LOGOUT - return defaultState.merge({logged_out: true}) - } - const username = state.getIn(['current', 'username']) - state = state.setIn(['authority', username, 'active'], 'none') - state = state.setIn(['authority', username, 'owner'], 'none') - return state - }}, { action: 'CHANGE_CURRENCY', reducer: (state, {payload}) => { return state.set('currency', payload)} }, diff --git a/app/redux/UserSaga.js b/app/redux/UserSaga.js index 0dfc99965..d81b4e401 100644 --- a/app/redux/UserSaga.js +++ b/app/redux/UserSaga.js @@ -19,7 +19,6 @@ import uploadImageWatch from './UserSaga_UploadImage'; import session from 'app/utils/session' export function* userWatches() { - yield fork(watchRemoveHighSecurityKeys); // keep first to remove keys early when a page change happens yield fork(loginWatch); yield fork(changeAccountWatch) yield fork(saveLoginWatch); @@ -33,8 +32,6 @@ export function* userWatches() { -const highSecurityPages = Array() - function* lookupPreviousOwnerAuthorityWatch() { yield takeLatest('user/lookupPreviousOwnerAuthority', lookupPreviousOwnerAuthority); } @@ -59,10 +56,6 @@ function* watchLoadSavingsWithdraw() { yield takeLatest('user/LOAD_SAVINGS_WITHDRAW', loadSavingsWithdraw); } -export function* watchRemoveHighSecurityKeys() { - yield takeLatest('@@router/LOCATION_CHANGE', removeHighSecurityKeys); -} - function* loadSavingsWithdraw() { const username = yield select(state => state.user.getIn(['current', 'username'])) const to = yield call([api, api.getSavingsWithdrawToAsync], username) @@ -90,16 +83,6 @@ function* getAccountWatch() { yield takeEvery('user/GET_ACCOUNT', getAccountHandler); } -function* removeHighSecurityKeys({payload: {pathname}}) { - const highSecurityPage = highSecurityPages.find(p => p.test(pathname)) != null - // Let the user keep the active key when going from one high security page to another. This helps when - // the user logins into the Wallet then the Permissions tab appears (it was hidden). This keeps them - // from getting logged out when they click on Permissions (which is really bad because that tab - // disappears again). - if(!highSecurityPage) - yield put(user.actions.removeHighSecurityKeys()) -} - /** @arg {object} action.username - Unless a WIF is provided, this is hashed with the password and key_type to create private keys. @arg {object} action.password - Password or WIF private key. A WIF becomes the posting key, a password can create all three @@ -113,11 +96,8 @@ function* usernamePasswordLogin(action) { const username = current.get('username') yield fork(loadFollows, "getFollowingAsync", username, 'blog') if (process.env.BROWSER) { - //const notification_channel_created = yield select(state => state.user.get('notification_channel_created')) - //if (!notification_channel_created) { - const { onUserLogin } = PushNotificationSaga; - yield call(onUserLogin, { username }); - //} + const { onUserLogin } = PushNotificationSaga + yield call(onUserLogin, { username }) } } } @@ -129,7 +109,7 @@ function* usernamePasswordLogin(action) { const clean = (value) => value == null || value === '' || /null|undefined/.test(value) ? undefined : value function* usernamePasswordLogin2({payload: {username, password, saveLogin, - operationType /*high security*/, afterLoginRedirectToWelcome + operationType, highSecurityLogin, afterLoginRedirectToWelcome }}) { // login, using saved password let autopost, memoWif, login_owner_pubkey, login_wif_owner_pubkey @@ -163,12 +143,6 @@ function* usernamePasswordLogin2({payload: {username, password, saveLogin, [username, userProvidedRole] = username.split('/') } - const pathname = yield select(state => state.global.get('pathname')) - const highSecurityLogin = - // /owner|active/.test(userProvidedRole) || - // isHighSecurityOperations.indexOf(operationType) !== -1 || - highSecurityPages.find(p => p.test(pathname)) != null - const isRole = (role, fn) => (!userProvidedRole || role === userProvidedRole ? fn() : undefined) let account = yield call(getAccount, username) @@ -209,7 +183,7 @@ function* usernamePasswordLogin2({payload: {username, password, saveLogin, let authority = yield select(state => state.user.getIn(['authority', username])) const hasActiveAuth = authority.get('active') === 'full' // Forbid loging in with active key - if(!operationType) { + if(!operationType && !highSecurityLogin) { const accountName = account.get('name') authority = authority.set('active', 'none') yield put(user.actions.setAuthority({accountName, auth: authority})) @@ -241,6 +215,8 @@ function* usernamePasswordLogin2({payload: {username, password, saveLogin, if (authority.get('posting') !== 'full') private_keys = private_keys.remove('posting_private') + const pathname = yield select(state => state.global.get('pathname')) + if((!highSecurityLogin || authority.get('active') !== 'full') && !pathname.endsWith('/permissions')) private_keys = private_keys.remove('active_private') @@ -304,12 +280,6 @@ function* usernamePasswordLogin2({payload: {username, password, saveLogin, if (!autopost && saveLogin && !operationType) yield put(user.actions.saveLogin()); - if (authSession() || notifySession()) { // if changing account - notifyApiLogout() - authApiLogout() - serverApiLogout() - } - let alreadyAuthorized = false; try { const res = yield notifyApiLogin(username, localStorage.getItem('X-Auth-Session')); diff --git a/app/utils/ApidexApiClient.js b/app/utils/ApidexApiClient.js index 21ba37347..0138b4d45 100644 --- a/app/utils/ApidexApiClient.js +++ b/app/utils/ApidexApiClient.js @@ -1,4 +1,4 @@ -import fetchWithTimeout from 'shared/fetchWithTimeout' +import { fetchEx } from 'golos-lib-js/lib/utils' const request_base = { method: 'get', @@ -44,7 +44,10 @@ export async function apidexGetPrices(sym) { if (cache && (now - cache.time) < 60000) { return cache.resp } else { - let resp = await fetchWithTimeout(apidexUrl(`/api/v1/cmc/${sym}`), 2000, request) + let resp = await fetchEx(apidexUrl(`/api/v1/cmc/${sym}`), { + ...request, + timeout: 2000 + }) resp = await resp.json() if (resp.data && resp.data.slug) resp['page_url'] = getPageURL(resp.data.slug) diff --git a/app/utils/NotifyApiClient.js b/app/utils/NotifyApiClient.js index f8f7c5cbd..cecf846bc 100644 --- a/app/utils/NotifyApiClient.js +++ b/app/utils/NotifyApiClient.js @@ -1,11 +1,13 @@ -const request_base = { +import { fetchEx } from 'golos-lib-js/lib/utils' + +const requestBase = () => ({ method: 'post', credentials: 'include', headers: { Accept: 'application/json', 'Content-Type': 'application/json' } -}; +}) const notifyAvailable = () => { return process.env.BROWSER && typeof($STM_Config) !== 'undefined' @@ -38,11 +40,11 @@ function saveSession(response) { export function notifyApiLogin(account, authSession) { if (!notifyAvailable()) return; - let request = Object.assign({}, request_base, { + let request = Object.assign({}, requestBase(), { body: JSON.stringify({account, authSession}), }); setSession(request); - return fetch(notifyUrl(`/login_account`), request).then(r => { + return fetchEx(notifyUrl(`/login_account`), request).then(r => { saveSession(r); return r.json(); }); @@ -50,20 +52,20 @@ export function notifyApiLogin(account, authSession) { export function notifyApiLogout() { if (!notifyAvailable()) return; - let request = Object.assign({}, request_base, { + let request = Object.assign({}, requestBase(), { method: 'get', }); setSession(request); - fetch(notifyUrl(`/logout_account`), request).then(r => { + fetchEx(notifyUrl(`/logout_account`), request).then(r => { saveSession(r); }); } export function getNotifications(account) { if (!notifyAvailable()) return Promise.resolve(null); - let request = Object.assign({}, request_base, {method: 'get'}); + let request = Object.assign({}, requestBase(), {method: 'get'}); setSession(request); - return fetch(notifyUrl(`/counters/@${account}`), request).then(r => { + return fetchEx(notifyUrl(`/counters/@${account}`), request).then(r => { saveSession(r); return r.json(); }).then(res => { @@ -73,10 +75,10 @@ export function getNotifications(account) { export function markNotificationRead(account, fields) { if (!notifyAvailable()) return Promise.resolve(null); - let request = Object.assign({}, request_base, {method: 'put', mode: 'cors'}); + let request = Object.assign({}, requestBase(), {method: 'put', mode: 'cors'}); setSession(request); const fields_str = fields.join(','); - return fetch(notifyUrl(`/counters/@${account}/${fields_str}`), request).then(r => { + return fetchEx(notifyUrl(`/counters/@${account}/${fields_str}`), request).then(r => { saveSession(r); return r.json(); }).then(res => { @@ -88,9 +90,9 @@ export async function notificationSubscribe(account, scopes = 'message', sidKey if (!notifyAvailable()) return; if (window[sidKey]) return; try { - let request = Object.assign({}, request_base, {method: 'get'}); + let request = Object.assign({}, requestBase(), {method: 'get'}); setSession(request); - let response = await fetch(notifyUrl(`/subscribe/@${account}/${scopes}`), request); + let response = await fetchEx(notifyUrl(`/subscribe/@${account}/${scopes}`), request); const result = await response.json(); if (response.ok) { saveSession(response); @@ -113,9 +115,9 @@ export async function notificationUnsubscribe(account, sidKey = '__subscriber_id let url = notifyUrl(`/unsubscribe/@${account}/${window[sidKey]}`); let response; try { - let request = Object.assign({}, request_base, {method: 'get'}); + let request = Object.assign({}, requestBase(), {method: 'get'}); setSession(request); - response = await fetch(url, request); + response = await fetchEx(url, request); if (response.ok) { saveSession(response); } @@ -139,9 +141,12 @@ export async function notificationTake(account, removeTaskIds, forEach, sidKey = url += '/' + removeTaskIds; let response; try { - let request = Object.assign({}, request_base, {method: 'get'}); + let request = Object.assign({}, requestBase(), {method: 'get'}); setSession(request); - response = await fetch(url, request); + response = await fetchEx(url, { + ...request, + timeout: null + }) if (response.ok) { saveSession(response); } @@ -170,6 +175,167 @@ export async function notificationTake(account, removeTaskIds, forEach, sidKey = } } +function getSubId(author, permlink) { + return author + '|' + permlink +} + +export async function subscribePost(account, author, permlink) { + const entity_id = getSubId(author, permlink) + + const request = Object.assign({}, requestBase(), { + body: JSON.stringify({account, entity_id}), + }) + try { + setSession(request) + const response = await fetchEx(notifyUrl(`/subs/subscribe`), request) + const result = await response.json() + if (result.status === 'ok') { + } else { + throw new Error(response.status + ': ' + result.error) + } + } catch (ex) { + console.error(ex) + throw ex + } +} + +export async function unsubscribePost(account, author, permlink) { + const entity_id = getSubId(author, permlink) + + const request = Object.assign({}, requestBase(), { + method: 'DELETE' + }) + try { + setSession(request) + const response = await fetchEx(notifyUrl(`/subs/@${account}/${entity_id}/unsubscribe`), request) + const result = await response.json() + if (result.status === 'ok') { + console.log('unsi', result) + } else { + throw new Error(response.status + ': ' + result.error) + } + } catch (ex) { + console.error(ex) + throw ex + } +} + +export async function markCommentsRead(account, author, permlink) { + const entity_id = getSubId(author, permlink) + + const request = Object.assign({}, requestBase(), { + method: 'PATCH' + }) + try { + setSession(request) + const response = await fetchEx(notifyUrl(`/subs/@${account}/${entity_id}`), request) + const result = await response.json() + if (result.status === 'ok') { + console.log('mark_read', result) + } else { + throw new Error(response.status + ': ' + result.error) + } + } catch (ex) { + console.error(ex) + throw ex + } +} + +export async function getSubs(account, from, limit) { + const params = new URLSearchParams() + if (from) params.set('from', from) + if (limit) params.set('limit', limit) + try { + let request = Object.assign({}, requestBase(), {method: 'get'}); + setSession(request) + const url = notifyUrl(`/subs/@${account}`) + '?' + params.toString() + const response = await fetchEx(url, request) + const result = await response.json() + if (result.status === 'ok') { + return result + } else { + throw new Error(response.status + ': ' + result.error) + } + } catch (ex) { + console.error(ex) + throw ex + } +} + +export async function getEvents(account, author, permlink) { + const entity_id = getSubId(author, permlink) + try { + let request = Object.assign({}, requestBase(), {method: 'get'}); + setSession(request) + const url = notifyUrl(`/subs/@${account}/${entity_id}/events`) + const response = await fetchEx(url, { + ...request, + timeout: 1500 + }) + const result = await response.json() + if (result.status === 'ok') { + return result.result || [] + } else { + throw new Error(response.status + ': ' + result.error) + } + } catch (ex) { + console.error(ex) + throw ex + } +} + +export function notifyPageView(author, permlink) { + if (!notifyAvailable()) return + let request = Object.assign({}, requestBase(), { + body: JSON.stringify({author, permlink}), + }) + setSession(request) + return fetchEx(notifyUrl(`/stats/view`), request).then(r => { + saveSession(r) + return r.json() + }) +} + +export function notifyGetViews(commentIds) { + if (!notifyAvailable()) return + let request = Object.assign({}, requestBase(), { + body: JSON.stringify({ items: commentIds }), + timeout: 1500 + }) + setSession(request) + return fetchEx(notifyUrl(`/stats/views`), request).then(r => { + saveSession(r) + return r.json() + }) +} + +export function isHighlight() { + if (!process.env.BROWSER) { + return false + } + let pa + try { + pa = new URLSearchParams(window.location.search) + } catch (err) { + console.error(err) + return false + } + return pa.has('highlight') +} + +export function addHighlight(url) { + if (!process.env.BROWSER) { + return url + } + const [ main, hash ] = url.split('#') + const [ body, search ] = main.split('?') + if (!search) { + return body + '?highlight=1' + (hash ? '#' + hash : '') + } else { + return body + '?' + search + '&highlight=1' + (hash ? '#' + hash : '') + } +} + if (process.env.BROWSER) { window.getNotifications = getNotifications; window.markNotificationRead = markNotificationRead; diff --git a/app/utils/SearchClient.js b/app/utils/SearchClient.js index e2abc13c9..f41bfc7ab 100644 --- a/app/utils/SearchClient.js +++ b/app/utils/SearchClient.js @@ -1,9 +1,9 @@ import { Headers } from 'cross-fetch' import diff_match_patch from 'diff-match-patch' import {config, api} from 'golos-lib-js'; +import { fetchEx } from 'golos-lib-js/lib/utils' import { detransliterate } from 'app/utils/ParsersAndFormatters' -import fetchWithTimeout from 'shared/fetchWithTimeout' const dmp = new diff_match_patch() @@ -159,7 +159,8 @@ export async function sendSearchRequest(_index, _type, sr, timeoutMsec = 10000) let body = sr.build ? sr.build() : sr let url = new URL($STM_Config.elastic_search.url); url += _index + '/' + _type + '/_search?pretty' - const response = await fetchWithTimeout(url, timeoutMsec, { + const response = await fetchEx(url, { + timeout: timeoutMsec, method: 'post', headers: new Headers({ 'Authorization': 'Basic ' + btoa($STM_Config.elastic_search.login + ':' + $STM_Config.elastic_search.password), diff --git a/app/utils/StateFunctions.js b/app/utils/StateFunctions.js index 19034dfa3..c39557e45 100644 --- a/app/utils/StateFunctions.js +++ b/app/utils/StateFunctions.js @@ -1,9 +1,17 @@ import assert from 'assert'; -import constants from 'app/redux/constants'; -import {parsePayoutAmount, repLog10} from 'app/utils/ParsersAndFormatters'; -import {Long} from 'bytebuffer'; -import {VEST_TICKER, LIQUID_TICKER} from 'app/client_config' +import ByteBuffer, { Long } from 'bytebuffer'; import {Map, Seq, fromJS} from 'immutable'; +import { Signature, hash } from 'golos-lib-js/lib/auth/ecc/index' + +import { VEST_TICKER, LIQUID_TICKER } from 'app/client_config' +import constants from 'app/redux/constants' +import { parsePayoutAmount, repLog10 } from 'app/utils/ParsersAndFormatters' + +export const hashPermlink = (permlink) => { + const h = hash.sha256(permlink, 'binary') + const buf = ByteBuffer.fromBinary(h, ByteBuffer.LITTLE_ENDIAN) + return buf.readUint64().toString() +} // '1000000' -> '1,000,000' export const numberWithCommas = (x) => x.replace(/\B(?=(\d{3})+(?!\d))/g, ",") diff --git a/app/utils/blacklist.js b/app/utils/blacklist.js new file mode 100644 index 000000000..9ec5a43e7 --- /dev/null +++ b/app/utils/blacklist.js @@ -0,0 +1,18 @@ +import ByteBuffer from 'bytebuffer' + +function toHex(str) { + return '3'+ByteBuffer.fromUTF8(str).toHex()+'a' +} + +function fromHex(str) { + return ByteBuffer.fromHex(str).toUTF8() +} + +export function packBlacklist(arr) { + return arr.map(item => toHex(item)) +} + +export function isBlocked(who, where) { + const hex = toHex(who) + return where.includes(hex) +} diff --git a/package.json b/package.json index a87ce16ec..8095cde9b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "foundation-sites": "^6.4.3", "fs-extra": "^10.0.1", "git-rev-sync": "^1.12.0", - "golos-lib-js": "^0.9.45", + "golos-lib-js": "^0.9.48", "history": "^2.0.0-rc2", "immutable": "^3.8.2", "intl": "^1.2.5", diff --git a/server/api/general.js b/server/api/general.js index c4e93147c..1cee85d1c 100644 --- a/server/api/general.js +++ b/server/api/general.js @@ -7,7 +7,6 @@ import coBody from 'co-body'; import {PublicKey, Signature, hash} from 'golos-lib-js/lib/auth/ecc'; import {api, broadcast} from 'golos-lib-js'; import { getDynamicGlobalProperties } from 'app/utils/APIWrapper' -import useGetAddressHandler from 'server/api/uia_address' export default function useGeneralApi(app) { const router = koa_router({prefix: '/api/v1'}); @@ -97,6 +96,4 @@ export default function useGeneralApi(app) { router.post('/page_view', koaBody, function *() { this.body = JSON.stringify({views: 1}); }); - - useGetAddressHandler(router) } diff --git a/server/api/uia_address.js b/server/api/uia_address.js deleted file mode 100644 index e455f3101..000000000 --- a/server/api/uia_address.js +++ /dev/null @@ -1,91 +0,0 @@ -import { api } from 'golos-lib-js' - -import { rateLimitReq } from 'server/utils/misc' -import fetchWithTimeout from 'shared/fetchWithTimeout' - -export default function useGetAddressHandler(app) { - app.get('/uia_address/:symbol/:account', function *() { - let symbol - let accName - const errResp = (errorName, logData, errorData) => { - console.error('/uia_address', errorName, symbol, ...logData) - this.body = { status: 'err', - error: errorName, - symbol, - error_data: errorData, - } - } - try { - if (rateLimitReq(this, this.req)) - return errResp('too_many_requests', [symbol + '/' + accName]) - - symbol = this.params.symbol - if (!symbol) - return errResp('no_symbol_parameter_in_query') - - accName = this.params.account - if (!accName) - return errResp('no_account_parameter_in_query') - let accs - try { - accs = yield api.getAccounts([accName]) - } catch (err) { - return errResp('blockchain_unavailable', [err]) - } - if (!accs[0]) - return errResp('no_such_golos_account', [accName]) - - let assets; - try { - assets = yield api.getAssetsAsync('', [ - symbol, - ], '', '20', 'by_symbol_name') - } catch (err) { - return errResp('blockchain_unavailable', [err]) - } - if (!assets[0]) - return errResp('no_such_asset') - - let meta = assets[0].json_metadata - try { - meta = JSON.parse(meta) - } catch (err) { - return errResp('your_asset_has_wrong_json_metadata', [meta]) - } - - let apiURL = meta.deposit && meta.deposit.to_api - if (!apiURL) - return errResp('no_deposit_settings_in_your_asset', [meta]) - if (!apiURL.includes('')) - return errResp('url_template_not_contains_place_for_account_name', [meta]) - apiURL = apiURL.replace(//g, accName) - - let resp - try { - resp = yield fetchWithTimeout(apiURL, 10000) - } catch (err) { - return errResp('cannot_connect_gateway', [meta.deposit, err]) - } - try { - resp = yield resp.text() - } catch (err) { - return errResp('cannot_get_address_from_gateway', [meta.deposit, err]) - } - try { - resp = JSON.parse(resp) - } catch (err) { - resp = resp.substring(0, 100) - return errResp('invalid_json_from_gateway', [meta.deposit, err], resp) - } - - if (!resp.address) - return errResp('no_address_field_in_response', [resp], resp) - this.body = { - status: 'ok', - address: resp.address, - } - } catch (err) { - return errResp('internal_error', err) - } - }) -} diff --git a/server/index.js b/server/index.js index d09eefc27..854528fa0 100755 --- a/server/index.js +++ b/server/index.js @@ -1,6 +1,7 @@ import config from 'config'; import * as golos from 'golos-lib-js'; const version = require('./version'); +const { packBlacklist } = require('../app/utils/blacklist') delete process.env.BROWSER; @@ -12,6 +13,12 @@ const ROOT = path.join(__dirname, '..'); process.env.NODE_PATH = path.resolve(__dirname, '..'); require('module').Module._initPaths(); +let blocked_users = config.get('blocked_users') +blocked_users = packBlacklist(blocked_users) + +let blocked_posts = config.get('blocked_posts') +blocked_posts = packBlacklist(blocked_posts) + global.$STM_Config = { ws_connection_client: config.get('ws_connection_client'), hide_comment_neg_rep: config.get('hide_comment_neg_rep'), @@ -28,8 +35,8 @@ global.$STM_Config = { messenger_service: config.get('messenger_service'), apidex_service: config.get('apidex_service'), forums: config.get('forums'), - blocked_users: config.get('blocked_users'), - blocked_posts: config.get('blocked_posts'), + blocked_users, + blocked_posts, ui_version: version || '1.0-unknown', }; diff --git a/server/server.js b/server/server.js index 4c2de7d84..e0e1d8c70 100644 --- a/server/server.js +++ b/server/server.js @@ -20,6 +20,7 @@ import config from 'config'; import { routeRegex } from 'app/ResolveRoute'; import secureRandom from 'secure-random'; import { APP_NAME_UP } from 'app/client_config'; +import { isBlocked } from 'app/utils/blacklist' console.log('application server starting, please wait.'); @@ -93,7 +94,7 @@ app.use(function*(next) { } else { userCheck = p.split("/")[1].slice(1); } - if ($STM_Config.blocked_users.includes(userCheck)) { + if (isBlocked(userCheck, $STM_Config.blocked_users)) { console.log('Illegal content user found blocked', `@${userCheck}`); this.status = 451; return; diff --git a/shared/fetchWithTimeout.js b/shared/fetchWithTimeout.js deleted file mode 100644 index 7369f1554..000000000 --- a/shared/fetchWithTimeout.js +++ /dev/null @@ -1,10 +0,0 @@ -import fetch from 'cross-fetch' - -export default async function fetchWithTimeout(url, timeoutMsec, opts) { - const controller = new AbortController() - setTimeout(() => controller.abort(), timeoutMsec) - return await fetch(url, { - signal: controller.signal, - ...opts - }) -} diff --git a/shared/getUIAAddress.js b/shared/getUIAAddress.js deleted file mode 100644 index 55b08c9d4..000000000 --- a/shared/getUIAAddress.js +++ /dev/null @@ -1,57 +0,0 @@ -import { api } from 'golos-lib-js' - -import fetchWithTimeout from 'shared/fetchWithTimeout' - -export default async function getUIAAddress(accName, symbol, okResp, errResp) { - try { - let assets; - try { - assets = await api.getAssetsAsync('', [ - symbol, - ], '', '20', 'by_symbol_name') - } catch (err) { - return errResp('blockchain_unavailable', [err]) - } - if (!assets[0]) - return errResp('no_such_asset') - - let meta = assets[0].json_metadata - try { - meta = JSON.parse(meta) - } catch (err) { - return errResp('your_asset_has_wrong_json_metadata', [meta]) - } - - let apiURL = meta.deposit && meta.deposit.to_api - if (!apiURL) - return errResp('no_deposit_settings_in_your_asset', [meta]) - if (!apiURL.includes('')) - return errResp('url_template_not_contains_place_for_account_name', [meta]) - apiURL = apiURL.replace(//g, accName) - - let resp - try { - resp = await fetchWithTimeout(apiURL, 10000) - } catch (err) { - return errResp('cannot_connect_gateway', [meta.deposit, err]) - } - try { - resp = await resp.text() - } catch (err) { - return errResp('cannot_get_address_from_gateway', [meta.deposit, err]) - } - try { - resp = JSON.parse(resp) - } catch (err) { - resp = resp.substring(0, 100) - return errResp('invalid_json_from_gateway', [meta.deposit, err], resp) - } - - if (!resp.address) - return errResp('no_address_field_in_response', [resp], resp) - - return okResp(resp.address) - } catch (err) { - return errResp('internal_error', err) - } -} diff --git a/tests/uiadepo/index.js b/tests/uiadepo/index.js deleted file mode 100644 index e88e3839f..000000000 --- a/tests/uiadepo/index.js +++ /dev/null @@ -1,33 +0,0 @@ -const { config, api, broadcast, importNativeLib, memo, } = require('golos-lib-js'); - -const acc = 'ecurrex-tether'; -const accActive = '5JFZC7AtEe1wF2ce6vPAUxDeevzYkPgmtR14z9ZVgvCCtrFAaLw'; -const memoIn = 'deposit'; -const memoOut = '# This is test of UIA deposit'; - -config.set('websocket', 'wss://apibeta.golos.today/ws'); - -api.streamOperations(async (err, op) => { - if (op[0] === 'transfer' && op[1].to === acc) { - console.log('Received transfer', op); - if (op[1].memo === memoIn) { - console.log('Encoding'); - await importNativeLib(); - const acc2 = await api.getAccountsAsync([op[1].from]); - let m = memo.encode(accActive, acc2[0].memo_key, memoOut); - - console.log('Sending response'); - broadcast.transfer(accActive, acc, op[1].from, - '0.001 GOLOS', m, (err, res) => { - if (err) { - console.error('Cannot send', err); - return; - } - console.log('Response sent'); - }); - } - } -}); - -console.log('Started'); -console.log('Please send transfer to', acc, 'with memo:', memoIn); diff --git a/tests/uiadepo/package.json b/tests/uiadepo/package.json deleted file mode 100644 index bacce80d6..000000000 --- a/tests/uiadepo/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "uiadepo", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "golos-lib-js": "^0.9.18" - }, - "scripts": { - "start": "node index.js" - } -} diff --git a/tests/uiadepo/yarn.lock b/tests/uiadepo/yarn.lock deleted file mode 100644 index 1ac55b253..000000000 --- a/tests/uiadepo/yarn.lock +++ /dev/null @@ -1,666 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bigi@^1.1.0, bigi@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" - integrity sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU= - -browserify-aes@^1.0.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -bytebuffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" - integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= - dependencies: - long "~3" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -core-js@^3.17.3: - version "3.19.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.19.1.tgz#f6f173cae23e73a7d88fa23b6e9da329276c6641" - integrity sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg== - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-env@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.1.tgz#b2c76c1ca7add66dc874d11798466094f551b34d" - integrity sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ== - dependencies: - cross-spawn "^6.0.5" - -cross-fetch@^3.0.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" - integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== - dependencies: - node-fetch "2.6.1" - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -detect-node@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" - integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - -ecurve@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.6.tgz#dfdabbb7149f8d8b78816be5a7d5b83fcf6de797" - integrity sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w== - dependencies: - bigi "^1.1.0" - safe-buffer "^5.0.1" - -es-abstract@^1.18.5: - version "1.19.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" - integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" - is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -golos-lib-js@^0.9.18: - version "0.9.18" - resolved "https://registry.yarnpkg.com/golos-lib-js/-/golos-lib-js-0.9.18.tgz#d4a52ddc09dd3f01ff9dca97da95b49ccc999159" - integrity sha512-CGBluy2GSA3hSYO/keCk3tJV8ltn6qNIWHGyn7YXBk5A+nzonuvtYvIeKtqJL7OkWAkGooLi9EBtP9tnrfxbGA== - dependencies: - assert "^2.0.0" - bigi "^1.4.2" - browserify-aes "^1.0.6" - bs58 "^4.0.0" - buffer "^6.0.3" - bytebuffer "^5.0.1" - core-js "^3.17.3" - create-hash "^1.1.2" - create-hmac "^1.1.4" - cross-env "^5.0.0" - cross-fetch "^3.0.0" - debug "^2.6.8" - detect-node "^2.0.3" - ecurve "^1.0.5" - lodash "^4.17.21" - process "^0.11.10" - regenerator-runtime "^0.13.9" - secure-random "^1.1.1" - stream-browserify "^3.0.0" - ws "^8.2.3" - -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== - -has-symbols@^1.0.1, has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.4, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - -is-number-object@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" - integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== - dependencies: - has-tostringtag "^1.0.0" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" - integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.3, is-typed-array@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" - integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - -is-weakref@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" - integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== - dependencies: - call-bind "^1.0.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long@~3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -object-inspect@^1.11.0, object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== - -object-is@^1.0.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -readable-stream@^3.5.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -regenerator-runtime@^0.13.9: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -secure-random@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/secure-random/-/secure-random-1.1.2.tgz#ed103b460a851632d420d46448b2a900a41e7f7c" - integrity sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ== - -semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" - -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util@^0.12.0: - version "0.12.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" - integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.7" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -ws@^8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== diff --git a/yarn.lock b/yarn.lock index 00bed9407..72eb9278a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4619,9 +4619,9 @@ core-js@^3.0.4, core-js@^3.19.0, core-js@^3.19.1, core-js@^3.6.5, core-js@^3.8.2 integrity sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg== core-js@^3.17.3: - version "3.25.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.25.5.tgz#e86f651a2ca8a0237a5f064c2fe56cef89646e27" - integrity sha512-nbm6eZSjm+ZuBQxCUPQKQCoUEfFOXjUZ8dTTyikyKaWrTYmAVbykQfwsKE5dBK88u3QCkCrzsx/PPlKfhsvgpw== + version "3.26.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.0.tgz#a516db0ed0811be10eac5d94f3b8463d03faccfe" + integrity sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw== core-js@^3.6.0: version "3.12.1" @@ -5945,9 +5945,9 @@ es-abstract@^1.17.4, es-abstract@^1.18.0, es-abstract@^1.18.0-next.1, es-abstrac unbox-primitive "^1.0.1" es-abstract@^1.19.5, es-abstract@^1.20.0: - version "1.20.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.3.tgz#90b143ff7aedc8b3d189bcfac7f1e3e3f81e9da1" - integrity sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw== + version "1.20.4" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" + integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -5959,7 +5959,7 @@ es-abstract@^1.19.5, es-abstract@^1.20.0: has-property-descriptors "^1.0.0" has-symbols "^1.0.3" internal-slot "^1.0.3" - is-callable "^1.2.6" + is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" @@ -7263,10 +7263,10 @@ globule@^1.0.0: lodash "~4.17.10" minimatch "~3.0.2" -golos-lib-js@^0.9.45: - version "0.9.45" - resolved "https://registry.yarnpkg.com/golos-lib-js/-/golos-lib-js-0.9.45.tgz#63276e8eb495b7d6353607ec074447f93e3a60ca" - integrity sha512-L5V4oLOHviqko3x7aaod5wbtE7fF164EjtPxoBvnYWcy5PhAReMiXM6v4l2uXhZyR1Z06b5O/ceNvLqAD5ZnHQ== +golos-lib-js@^0.9.48: + version "0.9.48" + resolved "https://registry.yarnpkg.com/golos-lib-js/-/golos-lib-js-0.9.48.tgz#d65ea3e852600c9bc5369585d94b042d1d432ad3" + integrity sha512-M7lcKSYuLs89bS508NJiLsJ90FERo9n5smFtspYDc5TdLZPGm2F31LSUgTSNt5wRriHZ7XF+WiBFcfqMcrRF8g== dependencies: abort-controller "^3.0.0" assert "^2.0.0" @@ -8207,7 +8207,7 @@ is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== -is-callable@^1.2.6: +is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -12760,11 +12760,16 @@ regenerator-runtime@^0.13.4: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== -regenerator-runtime@^0.13.7, regenerator-runtime@^0.13.9: +regenerator-runtime@^0.13.7: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +regenerator-runtime@^0.13.9: + version "0.13.10" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" + integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== + regenerator-transform@^0.14.2: version "0.14.5" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" @@ -15115,15 +15120,14 @@ util@^0.11.0: inherits "2.0.3" util@^0.12.0: - version "0.12.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== dependencies: inherits "^2.0.3" is-arguments "^1.0.4" is-generator-function "^1.0.7" is-typed-array "^1.1.3" - safe-buffer "^5.1.2" which-typed-array "^1.1.2" utila@~0.4: @@ -15660,9 +15664,9 @@ ws@^4.0.0: safe-buffer "~5.1.0" ws@^8.2.3: - version "8.9.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.9.0.tgz#2a994bb67144be1b53fe2d23c53c028adeb7f45e" - integrity sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg== + version "8.10.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.10.0.tgz#00a28c09dfb76eae4eb45c3b565f771d6951aa51" + integrity sha512-+s49uSmZpvtAsd2h37vIPy1RBusaLawVe8of+GyEPsaJTCMpj/2v8NpeK1SHXjBlQ95lQTmQofOJnFiLoaN3yw== x-xss-protection@1.1.0: version "1.1.0"