Add searchability warning
This commit is contained in:
parent
bfabffcf17
commit
51e8eddbb4
3 changed files with 9 additions and 2 deletions
|
@ -32,11 +32,12 @@ const APPROX_HASHTAG_RE = buildHashtagRE();
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']),
|
needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']),
|
||||||
hashtagWarning: state.getIn(['compose', 'privacy']) !== 'public' && APPROX_HASHTAG_RE.test(state.getIn(['compose', 'text'])),
|
hashtagWarning: ['public', 'public_unlisted'].indexOf(state.getIn(['compose', 'privacy'])) < 0 && APPROX_HASHTAG_RE.test(state.getIn(['compose', 'text'])),
|
||||||
directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',
|
directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',
|
||||||
|
searchabilityWarning: state.getIn(['compose', 'searchability']) === 'direct',
|
||||||
});
|
});
|
||||||
|
|
||||||
const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning }) => {
|
const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning, searchabilityWarning }) => {
|
||||||
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> }} />} />;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +56,10 @@ const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning
|
||||||
return <Warning message={message} />;
|
return <Warning message={message} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (searchabilityWarning) {
|
||||||
|
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 null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
"compose_form.lock_disclaimer": "Your account is not {locked}. Anyone can follow you to view your follower-only posts.",
|
"compose_form.lock_disclaimer": "Your account is not {locked}. Anyone can follow you to view your follower-only posts.",
|
||||||
"compose_form.lock_disclaimer.lock": "locked",
|
"compose_form.lock_disclaimer.lock": "locked",
|
||||||
"compose_form.placeholder": "What's on your mind?",
|
"compose_form.placeholder": "What's on your mind?",
|
||||||
|
"compose_form.searchability_warning": "Self only searchability is not available other mastodon servers. Others can search your post.",
|
||||||
"compose_form.poll.add_option": "Add a choice",
|
"compose_form.poll.add_option": "Add a choice",
|
||||||
"compose_form.poll.duration": "Poll duration",
|
"compose_form.poll.duration": "Poll duration",
|
||||||
"compose_form.poll.option_placeholder": "Choice {number}",
|
"compose_form.poll.option_placeholder": "Choice {number}",
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
"compose_form.lock_disclaimer": "あなたのアカウントは{locked}になっていません。誰でもあなたをフォローすることができ、フォロワー限定の投稿を見ることができます。",
|
"compose_form.lock_disclaimer": "あなたのアカウントは{locked}になっていません。誰でもあなたをフォローすることができ、フォロワー限定の投稿を見ることができます。",
|
||||||
"compose_form.lock_disclaimer.lock": "承認制",
|
"compose_form.lock_disclaimer.lock": "承認制",
|
||||||
"compose_form.placeholder": "今なにしてる?",
|
"compose_form.placeholder": "今なにしてる?",
|
||||||
|
"compose_form.searchability_warning": "検索許可「自分のみ」はkmyblue内の検索でのみ有効です。他のサーバーでは「リアクションした人のみ」と同等に扱われます",
|
||||||
"compose_form.poll.add_option": "追加",
|
"compose_form.poll.add_option": "追加",
|
||||||
"compose_form.poll.duration": "アンケート期間",
|
"compose_form.poll.duration": "アンケート期間",
|
||||||
"compose_form.poll.option_placeholder": "項目 {number}",
|
"compose_form.poll.option_placeholder": "項目 {number}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue