From bb453f32b38c7c653d56f574ea65637db8c9c630 Mon Sep 17 00:00:00 2001 From: Chlod Alejandro Date: Sun, 10 Sep 2023 14:17:51 +0800 Subject: [PATCH] cci: hide user by default --- i18n/settings/en.json | 2 ++ src/config/UserConfiguration.ts | 6 ++++++ src/ui/root/DeputyContributionSurveyRevision.tsx | 8 +++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/i18n/settings/en.json b/i18n/settings/en.json index c6ca13c7..32822a44 100644 --- a/i18n/settings/en.json +++ b/i18n/settings/en.json @@ -51,6 +51,8 @@ "deputy.setting.user.cci.enablePageToolbar.description": "Enables the page toolbar, which is used to quickly show tools, analysis options, and related case information on a page that is the subject of a CCI investigation.", "deputy.setting.user.cci.showCvLink.name": "Show \"cv\" (\"copyvios\") link for revisions", "deputy.setting.user.cci.showCvLink.description": "Show a \"cv\" link next to \"cur\" and \"prev\" on revision rows. This link will only appear if this wiki is configured to use Earwig's Copyvio Detector.", + "deputy.setting.user.cci.showUsername.name": "Show username", + "deputy.setting.user.cci.showUsername.description": "Show the username of the user who made the edit on revision rows. This may be redundant for cases which only have one editor.", "deputy.setting.user.cci.forceUtc.name": "Force UTC time", "deputy.setting.user.cci.forceUtc.description": "Forces Deputy to use UTC time whenever displaying dates and times, irregardless of your system's timezone or your MediaWiki time settings.", "deputy.setting.user.cci.signingBehavior.name": "Row signing behavior", diff --git a/src/config/UserConfiguration.ts b/src/config/UserConfiguration.ts index 484c0b41..9eb309bb 100644 --- a/src/config/UserConfiguration.ts +++ b/src/config/UserConfiguration.ts @@ -86,6 +86,12 @@ export default class UserConfiguration extends ConfigurationBase { type: 'checkbox' } } ), + showUsername: new Setting( { + defaultValue: false, + displayOptions: { + type: 'checkbox' + } + } ), forceUtc: new Setting( { defaultValue: false, displayOptions: { diff --git a/src/ui/root/DeputyContributionSurveyRevision.tsx b/src/ui/root/DeputyContributionSurveyRevision.tsx index 70ef3f47..d267cb89 100644 --- a/src/ui/root/DeputyContributionSurveyRevision.tsx +++ b/src/ui/root/DeputyContributionSurveyRevision.tsx @@ -193,9 +193,11 @@ export default class DeputyContributionSurveyRevision timestamp={ this.revision.timestamp } /> { + window.deputy.config.cci.showUsername.get() && + }