level tooltips changed
This commit is contained in:
parent
c328c5ca2d
commit
bb6452b15d
6 changed files with 10 additions and 10 deletions
|
|
@ -18,7 +18,7 @@ export default function CommentControl({
|
|||
title={
|
||||
canComment
|
||||
? ''
|
||||
: 'You must be level 3 to comment or level 5 if this question is protected'
|
||||
: 'You must be level 3 to comment or level 6 if this question is protected'
|
||||
}
|
||||
>
|
||||
<span>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default function CreateAnswer({ canAnswer, show, toggleShow }) {
|
|||
title={
|
||||
canAnswer
|
||||
? ''
|
||||
: 'You need to be authenticated to answer or level 5 if the question is protected'
|
||||
: 'You need to be authenticated to answer or level 6 if the question is protected'
|
||||
}
|
||||
>
|
||||
<span>
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export default function Question({
|
|||
Ask question
|
||||
</Button>
|
||||
|
||||
<Tooltip title={canClose ? '' : 'You must be level 7'}>
|
||||
<Tooltip title={canClose ? '' : 'You must be level 9'}>
|
||||
<span>
|
||||
<Button
|
||||
disabled={!canClose}
|
||||
|
|
@ -119,7 +119,7 @@ export default function Question({
|
|||
</Tooltip>
|
||||
|
||||
<Tooltip
|
||||
title={canProtect ? '' : 'You must be level 6 and this question must be open'}
|
||||
title={canProtect ? '' : 'You must be level 8 and this question must be open'}
|
||||
>
|
||||
<span>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default function VoteControl({
|
|||
title={
|
||||
canDownvote
|
||||
? ''
|
||||
: 'Question must be open, not created by you, and you must be level 4 to downvote'
|
||||
: 'Question must be open, not created by you, and you must be level 5 to downvote'
|
||||
}
|
||||
>
|
||||
<span>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function VoteControlController({
|
|||
const [vote, setVote] = useState();
|
||||
const [original, setOriginal] = useState();
|
||||
let isOwnQ = username === creator;
|
||||
const canDownvote = level >= 4 && status !== 'closed' && !isOwnQ;
|
||||
const canDownvote = level >= 5 && status !== 'closed' && !isOwnQ;
|
||||
const canUpvote = level >= 2 && status !== 'closed' && !isOwnQ;
|
||||
|
||||
const loadVote = async () => {
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@ function getPermissions(questionData, userData, ongoingVote) {
|
|||
permissions.canAccept = true;
|
||||
}
|
||||
|
||||
if (level >= 7 && ongoingVote.type !== 'protect') {
|
||||
if (level >= 9 && ongoingVote.type !== 'protect') {
|
||||
permissions.canClose = true;
|
||||
}
|
||||
|
||||
if (level >= 6 && ongoingVote.type !== 'close' && !protection) {
|
||||
if (level >= 8 && ongoingVote.type !== 'close' && !protection) {
|
||||
permissions.canProtect = true;
|
||||
}
|
||||
|
||||
if (
|
||||
status !== 'closed' &&
|
||||
((level >= 3 && status !== 'protected') ||
|
||||
(level >= 5 && status === 'protected') ||
|
||||
(level >= 6 && status === 'protected') ||
|
||||
username === creator)
|
||||
) {
|
||||
permissions.canComment = true;
|
||||
|
|
@ -38,7 +38,7 @@ function getPermissions(questionData, userData, ongoingVote) {
|
|||
if (
|
||||
status !== 'closed' &&
|
||||
((level >= 1 && status !== 'protected') ||
|
||||
(level >= 5 && status === 'protected') ||
|
||||
(level >= 6 && status === 'protected') ||
|
||||
username === creator)
|
||||
) {
|
||||
permissions.canAnswer = true;
|
||||
|
|
|
|||
Reference in a new issue