Add limited post warning
This commit is contained in:
parent
f1e7a9b063
commit
43e5766761
2 changed files with 8 additions and 1 deletions
|
@ -14,9 +14,10 @@ const mapStateToProps = state => ({
|
||||||
hashtagWarning: ['public', 'public_unlisted', 'login'].indexOf(state.getIn(['compose', 'privacy'])) < 0 && state.getIn(['compose', 'searchability']) !== 'public' && HASHTAG_PATTERN_REGEX.test(state.getIn(['compose', 'text'])),
|
hashtagWarning: ['public', 'public_unlisted', 'login'].indexOf(state.getIn(['compose', 'privacy'])) < 0 && state.getIn(['compose', 'searchability']) !== 'public' && HASHTAG_PATTERN_REGEX.test(state.getIn(['compose', 'text'])),
|
||||||
directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',
|
directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',
|
||||||
searchabilityWarning: state.getIn(['compose', 'searchability']) === 'limited',
|
searchabilityWarning: state.getIn(['compose', 'searchability']) === 'limited',
|
||||||
|
limitedPostWarning: state.getIn(['compose', 'privacy']) === 'mutual',
|
||||||
});
|
});
|
||||||
|
|
||||||
const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning, searchabilityWarning }) => {
|
const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning, searchabilityWarning, limitedPostWarning }) => {
|
||||||
if (needsLockWarning) {
|
if (needsLockWarning) {
|
||||||
return <Warning message={<FormattedMessage id='compose_form.lock_disclaimer' defaultMessage='Your account is not {locked}. Anyone can follow you to view your follower-only posts.' values={{ locked: <a href='/settings/profile'><FormattedMessage id='compose_form.lock_disclaimer.lock' defaultMessage='locked' /></a> }} />} />;
|
return <Warning message={<FormattedMessage id='compose_form.lock_disclaimer' defaultMessage='Your account is not {locked}. Anyone can follow you to view your follower-only posts.' values={{ locked: <a href='/settings/profile'><FormattedMessage id='compose_form.lock_disclaimer.lock' defaultMessage='locked' /></a> }} />} />;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +40,10 @@ const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning
|
||||||
return <Warning message={<FormattedMessage id='compose_form.searchability_warning' defaultMessage='Self only searchability is not available other mastodon servers. Others can search your post.' />} />;
|
return <Warning message={<FormattedMessage id='compose_form.searchability_warning' defaultMessage='Self only searchability is not available other mastodon servers. Others can search your post.' />} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (limitedPostWarning) {
|
||||||
|
return <Warning message={<FormattedMessage id='compose_form.limited_post_warning' defaultMessage='Limited posts are NOT reached Misskey, normal Mastodon or so on.' />} />;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,6 +52,7 @@ WarningWrapper.propTypes = {
|
||||||
hashtagWarning: PropTypes.bool,
|
hashtagWarning: PropTypes.bool,
|
||||||
directMessageWarning: PropTypes.bool,
|
directMessageWarning: PropTypes.bool,
|
||||||
searchabilityWarning: PropTypes.bool,
|
searchabilityWarning: PropTypes.bool,
|
||||||
|
limitedPostWarning: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps)(WarningWrapper);
|
export default connect(mapStateToProps)(WarningWrapper);
|
||||||
|
|
|
@ -146,6 +146,7 @@
|
||||||
"compose_form.direct_message_warning_learn_more": "もっと詳しく",
|
"compose_form.direct_message_warning_learn_more": "もっと詳しく",
|
||||||
"compose_form.encryption_warning": "Mastodonの投稿はエンドツーエンド暗号化に対応していません。安全に送受信されるべき情報をMastodonで共有しないでください。",
|
"compose_form.encryption_warning": "Mastodonの投稿はエンドツーエンド暗号化に対応していません。安全に送受信されるべき情報をMastodonで共有しないでください。",
|
||||||
"compose_form.hashtag_warning": "この投稿は公開設定ではないのでハッシュタグの一覧に表示されません。公開投稿だけがハッシュタグで検索できます。",
|
"compose_form.hashtag_warning": "この投稿は公開設定ではないのでハッシュタグの一覧に表示されません。公開投稿だけがハッシュタグで検索できます。",
|
||||||
|
"compose_form.limited_post_warning": "限定投稿は現状、ごく一部のMastodonサーバーにしか届きませんがいずれ改善されるでしょう(2023年8月時点でFedibirdとkmyblueのみです)",
|
||||||
"compose_form.lock_disclaimer": "あなたのアカウントは{locked}になっていません。誰でもあなたをフォローすることができ、フォロワー限定の投稿を見ることができます。",
|
"compose_form.lock_disclaimer": "あなたのアカウントは{locked}になっていません。誰でもあなたをフォローすることができ、フォロワー限定の投稿を見ることができます。",
|
||||||
"compose_form.lock_disclaimer.lock": "承認制",
|
"compose_form.lock_disclaimer.lock": "承認制",
|
||||||
"compose_form.markdown.marked": "Markdown有効",
|
"compose_form.markdown.marked": "Markdown有効",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue