Content deleted Content added
(bot/CD) |
(bot/CD) |
||
Line 351:
var version = "0.5.1";
var gitAbbrevHash = "
var gitBranch = "main";
var gitDate = "
var gitVersion = "0.5.1+
/**
Line 1,684:
constructor(casePage, wikitext) {
this.data = new ContributionSurveyRowParser(wikitext).parse();
this.type = this.data.type;
this.casePage = casePage;
this.wikitext = wikitext;
Line 2,676 ⟶ 2,677:
* @param row.title The title of the row (page) that this dropdown accesses
* @param options Additional construction options, usually used by the root session.
* @param row.type
*/
constructor(row, options = {}) {
Line 2,901 ⟶ 2,903:
*
* For
* - Unfinished: WithoutViolations, unless it's `pageonly`, on which it'll be kept as is.
* - Unknown: Unfinished
* - WithViolations: _usually not disabled, kept as is_
Line 2,912 ⟶ 2,914:
selectNextBestValue(status) {
if (status === ContributionSurveyRowStatus.Unfinished) {
this.status = ContributionSurveyRowStatus.WithoutViolations;
}
Line 3,072 ⟶ 3,078:
'originally-unfinished row. Assuming unfinished and moving on...');
}
// "* "
let result = this.row.data.bullet;
Line 3,084 ⟶ 3,089:
result += `${this.row.extras}`;
}
const unfinishedDiffs = (
let diffsText = '';
if (unfinishedDiffs.length > 0) {
Line 3,144 ⟶ 3,149:
result += ' ~~~~';
};
if (
▲ useUserData();
▲ }
▲ else {
result += this.row.comment;▼
▲ }
}
else if ((_d = this.wasFinished) !== null && _d !== void 0 ? _d : false) {
}
// Otherwise, leave this row unchanged.
}
return result;
Line 3,277 ⟶ 3,278:
}
if (this.revisions && this.statusDropdown) {
if (this.row.type !== 'pageonly') {
this.statusDropdown.setOptionDisabled(ContributionSurveyRowStatus.Unfinished, this.completed, true);▼
// Only disable this option if the row isn't already finished.
▲ this.statusDropdown.setOptionDisabled(ContributionSurveyRowStatus.Unfinished, this.completed, true);
}
const unfinishedWithStatus = this.statusModified && !this.completed;
if (this.unfinishedMessageBox) {
Line 3,378 ⟶ 3,382:
revisionList.appendChild(unwrapWidget(this.unfinishedMessageBox));
revisionList.appendChild(unwrapWidget(this.renderCommentsTextInput(this.row.comment)));
}
expanded: window.deputy.config.cci.autoShowDiff.get() &&▼
else {
const
// Recheck options first to avoid "Unfinished" being selected when done.
this.onUpdate();
});
yield revisionUIEl.prepare();
revisionList.appendChild(revisionUIEl.render());
this.revisions.push(revisionUIEl);
}
}
return revisionList;
Line 3,477 ⟶ 3,488:
requireAcknowledge: false
});
if (
((diffs && diffs.size === 0) || this.wasFinished)) {
// If there are no diffs found or `this.wasFinished` is set (both meaning there are
// no diffs and this is an already-assessed row), then the "Unfinished" option will
// be disabled. This does not apply for page-only rows, which never have diffs.
this.statusDropdown.setOptionDisabled(ContributionSurveyRowStatus.Unfinished, true);
}
Line 3,628 ⟶ 3,640:
status: this.status,
enabledStatuses: this.statusDropdown.getEnabledOptions(),
rowType: this.row.type,
revisionStatus: rev ? rev.completed : undefined,
revision: event.data.revision,
Line 5,499 ⟶ 5,512:
this.row = {
casePage: yield DeputyCase.build(this.options.caseId, normalizeTitle(this.options.caseTitle)),
title: normalizeTitle(this.options.title),
type: this.options.rowType
};
});
Line 5,623 ⟶ 5,637:
*/
renderRevisionNavigationButtons() {
if (this.row.type === 'pageonly') {
return h_1("div", { class: "dp-pt-section" }, unwrapWidget(new OO.ui.PopupButtonWidget({
icon: 'info',
framed: false,
label: mw.msg('deputy.session.page.pageonly.title'),
popup: {
head: true,
icon: 'infoFilled',
$content: $(h_1("p", null, mw.msg('deputy.session.page.pageonly.help'))),
padded: true
}
})));
}
const getButtonClickHandler = (button, reverse) => {
return () => __awaiter(this, void 0, void 0, function* () {
Line 5,720 ⟶ 5,748:
this.renderCaseInfo(),
this.renderRevisionInfo(),
this.revisionNavigationSection =
this.renderRevisionNavigationButtons(), this.renderMenus());
}
Line 5,758 ⟶ 5,787:
this.options.nextRevision = data.nextRevision;
// Re-render button.
swapElements(this.revisionNavigationSection, this.revisionNavigationSection =
this.renderRevisionNavigationButtons()); }
}
Line 14,220 ⟶ 14,250:
];
var deputyStyles = "/*=============================================================================== GLOBAL DEPUTY CLASSES===============================================================================*/* > .deputy.dp-heading {position: absolute;opacity: 0;pointer-events: none;}*:hover > .deputy.dp-heading:not(.dp-heading--active) {opacity: 1;pointer-events: all;}.dp-loadingDots-1, .dp-loadingDots-2, .dp-loadingDots-3 {display: inline-block;margin: 0.1em 0.6em 0.1em 0.1em;width: 0.8em;height: 0.8em;background-color: rgba(0, 0, 0, 50%);animation: dp-loadingDots linear 3s infinite;border-radius: 50%;}@keyframes dp-loadingDots {0% {background-color: rgba(0, 0, 0, 10%);}16% {background-color: rgba(0, 0, 0, 40%);}32% {background-color: rgba(0, 0, 0, 10%);}100% {background-color: rgba(0, 0, 0, 10%);}}.dp-loadingDots-1 {animation-delay: -1s;}.dp-loadingDots-2 {animation-delay: -0.5s;}#mw-content-text.dp-reloading {opacity: 0.2;pointer-events: none;}p.dp-messageWidget-message {margin: 0 0 0.5em 0;}.dp-messageWidget-actions .oo-ui-buttonElement {margin-top: 0;}/*=============================================================================== DEPUTY REVIEW DIALOG (DeputyReviewDialog)===============================================================================*/.dp-review-progress {flex: 1;width: 60%;min-width: 300px;}/*=============================================================================== DEPUTY ENTRY POINTS (DeputyCCISessionStartLink, etc.)===============================================================================*/.deputy.dp-sessionStarter {font-size: small;font-weight: normal;margin-left: 0.25em;vertical-align: baseline;line-height: 1em;font-family: sans-serif;}.deputy.dp-sessionStarter::before {content: '\\200B';}.mw-content-ltr .deputy.dp-sessionStarter .dp-sessionStarter-bracket:first-of-type,.mw-content-rtl .deputy.dp-sessionStarter .dp-sessionStarter-bracket:not(:first-of-type) {margin-right: 0.25em;color: #54595d;}.client-js .deputy.dp-sessionStarter .dp-sessionStarter-bracket:first-of-type,.client-js .deputy.dp-sessionStarter .dp-sessionStarter-bracket:not(:first-of-type) {margin-left: 0.25em;color: #54595d}.dp-cs-section-add {position: absolute;top: 0;/* -1.6em derived from MediaWiki list margins. */left: -1.6em;width: calc(100% + 1.6em);background-color: rgba(255, 255, 255, 75%);display: flex;justify-content: center;align-items: center;}.dp-cs-section-add .dp-cs-section-addButton {opacity: 0;transition: opacity 0.2s ease-in-out;}.dp-cs-section-add:hover .dp-cs-section-addButton {opacity: 1;}/*=============================================================================== DEPUTY CONTRIBUTION SURVEY SECTION===============================================================================*/.dp-cs-session-notice {margin-top: 8px;position: sticky;top: 8px;z-index: 50;}.skin-vector-2022.vector-sticky-header-visible .dp-cs-session-notice {top: calc(3.125rem + 8px);}.dp-cs-section-footer {position: relative;padding: 8px;}.dp-cs-section-progress {margin-top: 8px;max-height: 0;transition: max-height 0.2s ease-in-out;display: flex;justify-content: center;align-items: center;overflow: hidden;}.dp-cs-section-progress.active {max-height: 50px;}.dp-cs-section-progress .oo-ui-progressBarWidget {flex: 1}.dp-cs-section-closingCommentsField {margin-top: 8px;}.dp-cs-extraneous {border: 1px solid rgba(0, 159, 255, 40%);background-color: rgba(0, 159, 255, 10%);margin-bottom: 8px;padding: 16px;}.dp-cs-extraneous > dl {margin-left: -1.6em;}.dp-cs-extraneous > :first-child {margin-top: 0 !important;}.dp-cs-extraneous > :last-child {margin-bottom: 0 !important;}.dp-cs-row, .dp-cs-extraneous {margin-bottom: 8px;}.dp-cs-row .dp--loadingDots {display: flex;align-items: center;justify-content: center;padding: 0.4em;}.dp-cs-row-status {max-width: 5.4em;}.dp-cs-row-status .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label {width: 0;opacity: 0;}.dp-cs-row-status .dp-cs-row-status--unknown:not(.oo-ui-optionWidget-selected) {display: none;}.dp-cs-row-head > * {vertical-align: middle;}.dp-cs-row-comments {padding: 16px;background-color: rgba(0, 159, 255, 10%);margin: 4px 0;}.dp-cs-row-comments > b {letter-spacing: 0.1em;font-weight: bold;text-transform: uppercase;color: rgba(0, 0, 0, 0.5);}.dp-cs-row-comments hr {border-color: rgb(0, 31, 51);}body.mediawiki.ltr .dp-cs-row-head > :not(:first-child):not(:last-child),body.mediawiki.ltr .dp-cs-row-head > :not(:first-child):not(:last-child) {margin-right: 16px;}body.mediawiki.rtl .dp-cs-row-head > :not(:first-child):not(:last-child),body.mediawiki.rtl .dp-cs-row-head > :not(:first-child):not(:last-child) {margin-left: 16px;}.dp-cs-row-links {margin-right: 0 !important;}.dp-cs-row-links > :not(:last-child) {margin-right: 8px !important;}.dp-cs-row-title {font-weight: bold;font-size: 1.2em;vertical-align: middle;}.dp-cs-row-details {color: #4a5054;font-weight: bold;}.dp-cs-row-toggle .oo-ui-iconElement-icon {background-size: 1em;}.dp-cs-row-toggle .oo-ui-buttonElement-button {border-radius: 50%;}.dp-cs-row .history-user,.dp-cs-row :not(.newpage) + .mw-changeslist-date {margin-left: 0.4em;margin-right: 0.2em;}.dp-cs-row .newpage {margin-left: 0.4em;}.dp-cs-row-content {padding: 16px;background-color: rgba(0, 0, 0, 6%);margin: 4px 0;}.dp-cs-row-content.dp-cs-row-content-empty {display: none !important;}.dp-cs-row-unfinishedWarning {margin-bottom: 8px;}.dp-cs-section-unfinishedWarning {margin-top: 8px;}.dp-cs-row-closeComments {font-family: monospace, monospace;font-size: small;}.dp-cs-row-closeComments:not(:last-child) {margin-bottom: 8px;}.dp-cs-row-finished .oo-ui-fieldLayout:first-child {margin-top: 0;}.dp-cs-row-finished .oo-ui-fieldLayout {margin-top: 8px;}.dp-cs-row-revisions .mw-tag-markers .mw-tag-marker:not(:first-child),.dp-cs-row-detail:not(:first-child) {margin-left: 0.2em;}.dp-cs-rev-checkbox {margin-right: 4px;}.dp-cs-rev-toggleDiff {vertical-align: baseline;margin-right: 4px;}.dp-cs-rev-diff {background-color: white;position: relative;}.dp-cs-rev-diff--loaded {margin: 4px 0;padding: 8px 14px;}.dp-cs-rev-diff--hidden {display: none;}.dp-cs-rev-toggleDiff > .oo-ui-buttonElement-button {padding: 0;min-height: 1em;background-color: unset !important;}.dp-cs-rev-toggleDiff .oo-ui-indicatorElement-indicator {top: -1px;}/*=============================================================================== DEPUTY PAGE TOOLBAR===============================================================================*/.dp-pageToolbar {position: fixed;bottom: 8px;left: 8px;z-index: 100;padding: 8px;background-color: #fff;border: 1px solid gray;font-size: 0.9rem;display: flex;align-items: center;}@media only screen and (max-width: 768px) {.dp-pageToolbar {flex-wrap: wrap;bottom: 0;left: 0;border-left: 0;border-bottom: 0;border-right: 0;width: 100%;}}.dp-pt-section {display: inline-block;white-space: nowrap;}.dp-pt-section .oo-ui-popupWidget-popup {/** Avoid preventing line breaks in popups */white-space: initial;}.dp-pt-section + .dp-pt-section {/* TODO: Recheck RTL compatibility */margin-left: 16px;padding-left: 16px;border-left: 1px solid gray;}.dp-pt-section:last-child {/* TODO: Recheck RTL compatibility */margin-right: 8px;}.dp-pt-section-label {font-weight: bold;font-size: 0.6rem;color: #4a5054;text-transform: uppercase;}.dp-pt-section-content .oo-ui-buttonElement:last-child {margin-right: 0;}.dp-pt-caseInfo {font-weight: bold;font-size: 1.3rem;pointer-events: none;}.dp-pt-missingRevision {white-space: normal;}.dp-pageToolbar .dp-cs-row-status {width: 5.4em;}.dp-pt-menu .oo-ui-menuSelectWidget {min-width: 300px;}.dp-pt-menu .oo-ui-menuOptionWidget {padding-top: 8px;padding-bottom: 8px;}";
var deputyCoreEnglish = {
Line 14,282 ⟶ 14,312:
"deputy.session.row.checked.talk": "talk",
"deputy.session.row.checked.contribs": "contribs",
"deputy.session.row.pageonly": "This row does not contain any diffs. Please assess the page history manually.",
"deputy.session.revision.assessed": "Mark as assessed",
"deputy.session.revision.diff.toggle": "Toggle comparison (diff) view",
Line 14,309 ⟶ 14,340:
"deputy.session.page.caseInfo.assessed": "Assessed?",
"deputy.session.page.caseInfo.next": "Navigate to the next unassessed revision",
"deputy.session.page.pageonly.title": "No revisions",
"deputy.session.page.pageonly.help": "This row does not contain any revisions with it. Please assess the page history manually before making an assessment.",
"deputy.session.page.analysis": "Analysis",
"deputy.session.page.earwigLatest": "Earwig's Copyvio Detector (latest)",
|