mirror of
https://github.com/wassname/talk.git
synced 2026-07-14 11:18:50 +08:00
karma -> karmaThresholds
This commit is contained in:
@@ -76,7 +76,13 @@ class UserDetail extends React.Component {
|
||||
renderLoaded() {
|
||||
const {
|
||||
root,
|
||||
root: { me, user, totalComments, rejectedComments, settings: { karma } },
|
||||
root: {
|
||||
me,
|
||||
user,
|
||||
totalComments,
|
||||
rejectedComments,
|
||||
settings: { karmaThresholds },
|
||||
},
|
||||
activeTab,
|
||||
selectedCommentIds,
|
||||
toggleSelect,
|
||||
@@ -240,7 +246,7 @@ class UserDetail extends React.Component {
|
||||
{user.reliable.commenterKarma}
|
||||
</span>
|
||||
</div>
|
||||
<KarmaTooltip thresholds={karma.comment} />
|
||||
<KarmaTooltip thresholds={karmaThresholds.comment} />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -228,7 +228,7 @@ export const withUserDetailQuery = withQuery(
|
||||
${getSlotFragmentSpreads(slots, 'user')}
|
||||
}
|
||||
settings {
|
||||
karma {
|
||||
karmaThresholds {
|
||||
comment {
|
||||
reliable
|
||||
unreliable
|
||||
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
commenter: {
|
||||
$set: calculateReliability(
|
||||
prev.user.reliable.commenterKarma - 1,
|
||||
prev.settings.karma.comment
|
||||
prev.settings.karmaThresholds.comment
|
||||
),
|
||||
},
|
||||
commenterKarma: {
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
commenter: {
|
||||
$set: calculateReliability(
|
||||
prev.user.reliable.commenterKarma + 1,
|
||||
prev.settings.karma.comment
|
||||
prev.settings.karmaThresholds.comment
|
||||
),
|
||||
},
|
||||
commenterKarma: {
|
||||
|
||||
@@ -2,7 +2,7 @@ const { VIEW_PROTECTED_SETTINGS } = require('../../perms/constants');
|
||||
const { decorateWithPermissionCheck } = require('./util');
|
||||
|
||||
const Settings = {
|
||||
karma: (
|
||||
karmaThresholds: (
|
||||
settings,
|
||||
args,
|
||||
{ connectors: { services: { Karma: { THRESHOLDS } } } }
|
||||
@@ -16,7 +16,7 @@ const PROTECTED_SETTINGS = {
|
||||
autoCloseStream: [VIEW_PROTECTED_SETTINGS],
|
||||
wordlist: [VIEW_PROTECTED_SETTINGS],
|
||||
domains: [VIEW_PROTECTED_SETTINGS],
|
||||
karma: [VIEW_PROTECTED_SETTINGS],
|
||||
karmaThresholds: [VIEW_PROTECTED_SETTINGS],
|
||||
};
|
||||
|
||||
// decorate the fields on the settings resolver with a permission check.
|
||||
|
||||
@@ -897,8 +897,9 @@ type Settings {
|
||||
# domains will return a given list of domains.
|
||||
domains: Domains
|
||||
|
||||
# karma contains the currently set thresholds for triggering Trust beheviour.
|
||||
karma: KarmaThresholds
|
||||
# karmaThresholds contains the currently set thresholds for triggering Trust
|
||||
# beheviour.
|
||||
karmaThresholds: KarmaThresholds
|
||||
}
|
||||
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user