Content deleted Content added
(bot/CD) |
(bot/CD) |
||
Line 350:
}));
var version = "0.
var gitAbbrevHash = "
var gitBranch = "
var gitDate = "
var gitVersion = "0.
/**
Line 2,950:
function last(array) {
return array[array.length - 1];
}
/**
* Shows a confirmation dialog, if the user does not have danger mode enabled.
* If the user has danger mode enabled, this immediately resolves to true, letting
* the action run immediately.
*
* Do not use this with any action that can potentially break templates, user data,
* or cause irreversible data loss.
*
* @param config The user's configuration
* @param message See {@link OO.ui.MessageDialog}'s parameters.
* @param options See {@link OO.ui.MessageDialog}'s parameters.
* @return Promise resolving to a true/false boolean.
*/
function dangerModeConfirm(config, message, options) {
if (config.all.core.dangerMode.get()) {
return $.Deferred().resolve(true);
}
else {
return OO.ui.confirm(message, options);
}
}
Line 3,331 ⟶ 3,353:
}
});
}
/**
* Mark all revisions of this section as finished.
*/
markAllAsFinished() {
this.revisions.forEach((revision) => {
revision.completed = true;
});
this.onUpdate();
}
/**
Line 3,516 ⟶ 3,547:
});
this.checkAllButton.on('click', () => {
if (confirmed) {
this.
}
});
Line 3,926 ⟶ 3,954:
*
* @param editSummary The edit summary
* @param config The user's configuration. Used to get the "danger mode" setting.
* @return The decorated edit summary (in wikitext)
*/
function decorateEditSummary (editSummary, config) {
var _a;
const dangerMode = (_a = config === null || config === void 0 ? void 0 : config.core.dangerMode.get()) !== null && _a !== void 0 ? _a : false;
return `${editSummary} ([[Wikipedia:Deputy|Deputy]] v${version}${dangerMode ? '!' : ''})`;
}
Line 4,155 ⟶ 4,186:
}
if (this.closed) {
if (!this._section.originallyClosed) {
closingComments += ' ~~~~';
}
final.splice(1, 0, msgEval(window.deputy.wikiConfig.cci.collapseTop.get(), closingComments).plain());
if (final[final.length - 1].trim().length === 0) {
final.pop();
}
final.push(window.deputy.wikiConfig.cci.collapseBottom.get());
}
// If the section was originally closed, don't allow the archiving
// message to be edited.
}
return final.join('\n');
Line 4,248 ⟶ 4,287:
*/
prepare() {
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {
let listElements = this.sectionNodes.filter((el) => el instanceof HTMLElement && el.tagName === 'UL'); if (listElements.length === 0) {
//
const collapsible = (_b = (_a = this.sectionNodes.find((v) => v instanceof HTMLElement && v.querySelector('.mw-collapsible'))) === null || _a === void 0 ? void 0 : _a.querySelector('.mw-collapsible')) !== null && _b !== void 0 ? _b : null;
if (collapsible) {
// This section has a collapsible. It's possible that it's a closed section.
// From here, use a different `sectionNodes` (specifically targeting all nodes
// inside that collapsible), and then locate all ULs inside that collapsible.
targetSectionNodes = Array.from(collapsible.childNodes);
listElements = Array.from(collapsible.querySelectorAll('ul'));
}
else {
// No collapsible found. Give up.
console.warn('Could not find valid ULs in CCI section.', targetSectionNodes);
return false;
}
}
const rowElements = {};
Line 4,320 ⟶ 4,374:
lastNode != null &&
// The node is part of this section
(
// The node is not an element
Line 4,343 ⟶ 4,397:
// Array of Nodes
this.wikitextLines.push(line);
// Only append the row element if it has contents.
// Otherwise, there will be a blank blue box.
this.rowElements.push(DeputyExtraneousElement(rowElement));
}
}
else if (typeof rowElement === 'string') {
Line 4,386 ⟶ 4,444:
}
/**
* Toggles the closing comments input box
* This will disable the input box AND hide the element from view.
*
* @param show
*/
this.closingComments.setDisabled(!show);
this.closingComments.toggle(show);
this.closingCommentsSign.setDisabled(!show);
this.closingCommentsSign.toggle(show);
}
/**
Line 4,401 ⟶ 4,461:
*/
setDisabled(disabled) {
var _a, _b, _c, _d, _e, _f, _g;
(_a = this.closeButton) === null || _a === void 0 ? void 0 : _a.setDisabled(disabled);
(_b = this.reviewButton) === null || _b === void 0 ? void 0 : _b.setDisabled(disabled);
Line 4,407 ⟶ 4,467:
(_d = this.closingCheckbox) === null || _d === void 0 ? void 0 : _d.setDisabled(disabled);
(_e = this.closingComments) === null || _e === void 0 ? void 0 : _e.setDisabled(disabled);
(_f = this.
(_g = this.rows) === null || _g === void 0 ? void 0 : _g.forEach((row) => row.setDisabled(disabled));
this.disabled = disabled;
}
Line 4,421 ⟶ 4,482:
throw new Error(mw.msg('deputy.session.section.missingSection'));
}
if (this.closed &&
!this._section.originallyClosed &&
!window.deputy.config.core.dangerMode.get() &&
this.rows.some(r => !r.completed)) {
throw new Error(mw.msg('deputy.session.section.sectionIncomplete'));
}
return MwApi.action.postWithEditToken(Object.assign(Object.assign({}, changeTag(yield window.deputy.getWikiConfig())), { action: 'edit', pageid: this.casePage.pageId, section: sectionId, text: this.wikitext, baserevid: this.revid, summary: decorateEditSummary(this.editSummary, window.deputy.config) })).then(function (data) {
return data;
}, (code, data) => {
Line 4,464 ⟶ 4,528:
*/
render() {
this.closingCheckbox = new OO.ui.CheckboxInputWidget({
selected: this._section.originallyClosed,
disabled: this._section.originallyClosed
});
this.closingComments = new OO.ui.TextInputWidget({
placeholder: mw.msg('deputy.session.section.closeComments'),
value: this._section.closingComments,
disabled: true
});
this.
});
this.closeButton = new OO.ui.ButtonWidget(Object.assign({ label: mw.msg('deputy.session.section.stop'), title: mw.msg('deputy.session.section.stop.title') }, (dangerMode ? { invisibleLabel: true, icon: 'pause' } : {})));
this.reviewButton = new OO.ui.ButtonWidget(Object.assign({ label: mw.msg('deputy.review'), title: mw.msg('deputy.review.title') }, (dangerMode ? { invisibleLabel: true, icon: 'eye' } : {})));
this.saveButton = new OO.ui.ButtonWidget({
label: mw.msg('deputy.save'),
Line 4,484 ⟶ 4,553:
this.closeButton.on('click', () => __awaiter(this, void 0, void 0, function* () {
if (this.wikitext !== (yield this.getSection()).originalWikitext) {
if (confirmed) {
this.close();
Line 4,529 ⟶ 4,598:
heading.parentNode.insertBefore(child, insertRef);
this.sectionNodes.push(child);
// noinspection JSUnresolvedReference
$(child).children('.mw-collapsible').makeCollapsible();
}
}
Line 4,545 ⟶ 4,616:
// Run this asynchronously.
setTimeout(this.loadData.bind(this), 0);
}
else {
this.close();
yield window.deputy.session.rootSession.closeSection(this);
}
}
Line 4,558 ⟶ 4,633:
this.setDisabled(false);
}));
// Section closing (archive/ctop) elements
const closingWarning = DeputyMessageWidget({
classes: ['dp-cs-section-unfinishedWarning'],
Line 4,566 ⟶ 4,642:
const updateClosingWarning = (() => {
const incomplete = this.rows.some((row) => !row.completed);
this.saveButton.setDisabled(false);
closingWarning.setLabel(mw.msg('deputy.session.section.closeError.danger'));
}
else {
closingWarning.setLabel(mw.msg('deputy.session.section.closeError'));
this.saveButton.setDisabled(incomplete);
}
closingWarning.toggle(incomplete);
});
const closingCommentsField = new OO.ui.FieldLayout(this.closingComments, {
align: 'top',
label: mw.msg('
invisibleLabel: true,
helpInline: true,
classes: ['dp-cs-section-closingCommentsField']
});
const closingCommentsSignField = new OO.ui.FieldLayout(this.closingCommentsSign, {
label: mw.msg('deputy.session.section.closeCommentsSign')
});
const closingFields = h_1("div", { class: "dp-cs-section-closing", style: { display: 'none' } },
unwrapWidget(closingWarning),
unwrapWidget(closingCommentsField),
unwrapWidget(closingCommentsSignField));
const updateClosingFields = (v) => {
this.closed = v;
// This section was originally closed. Hide everything.
v = false;
}
closingFields.style.display = v ? '' : 'none';
this.toggleClosingElements(v);
if (v) {
updateClosingWarning();
Line 4,600 ⟶ 4,688:
});
}
}
this.closingCheckbox.on('change', updateClosingFields);
updateClosingFields(this.closed);
this.closingComments.on('change', (v) => {
this.comments = v;
});
// Danger mode buttons
const dangerModeElements = [];
if (dangerMode) {
const markAllFinishedButton = new OO.ui.ButtonWidget({
flags: ['destructive'],
icon: 'checkAll',
label: mw.msg('deputy.session.section.markAllFinished'),
title: mw.msg('deputy.session.section.markAllFinished'),
invisibleLabel: true
});
markAllFinishedButton.on('click', () => {
this.rows.forEach(v => v.markAllAsFinished());
});
const instantArchiveButton = new OO.ui.ButtonWidget({
flags: ['destructive', 'primary'],
label: mw.msg('deputy.session.section.instantArchive'),
title: mw.msg('deputy.session.section.instantArchive.title')
});
instantArchiveButton.on('click', () => {
this.closingCheckbox.setSelected(true);
this.saveButton.emit('click');
});
const dangerModeButtons = [
unwrapWidget(markAllFinishedButton),
unwrapWidget(instantArchiveButton)
];
dangerModeElements.push(h_1("div", { class: "dp-cs-section-danger--separator" }, mw.msg('deputy.session.section.danger')), dangerModeButtons);
// Remove spacing from save button
unwrapWidget(this.saveButton).style.marginRight = '0';
}
// Actual element
return this.container = h_1("div", { class: classMix('deputy', 'dp-cs-section', this._section.originallyClosed && 'dp-cs-section-archived') },
this._section.originallyClosed && h_1("div", { class: "dp-cs-section-archived-warn" }, unwrapWidget(new OO.ui.MessageWidget({
type: 'warning',
label: mw.msg('deputy.session.section.closed')
}))),
h_1("div", null, this.rowElements.map((row) => row instanceof HTMLElement ? row : row.render())),
h_1("div", { class: "dp-cs-section-footer" },
h_1("div", { style: { display: 'flex' } },
h_1("div", { style: {
flex: '1 1 100%',
display: 'flex',
flexDirection: 'column'
} },
unwrapWidget(new OO.ui.FieldLayout(this.closingCheckbox, {
Line 4,618 ⟶ 4,742:
label: mw.msg('deputy.session.section.close')
})),
h_1("div", { style:
alignContent: 'end',
justifyContent: 'end',
flexWrap: 'wrap',
maxWidth: '320px'
} },
unwrapWidget(this.closeButton),
unwrapWidget(this.reviewButton),
unwrapWidget(this.saveButton
dangerModeElements)),
saveContainer));
}
Line 7,037 ⟶ 7,167:
this.copiedTemplateRow[rowName] !== newValue) {
confirmProcess.next(() => __awaiter(this, void 0, void 0, function* () {
const confirmPromise =
confirmPromise.done((confirmed) => {
if (confirmed) {
Line 7,261 ⟶ 7,391:
const notices = parentTemplate.parsoid.findNoticeType(type);
// Confirm before merging.
if (confirmed) {
// Recursively merge all templates
Line 7,443 ⟶ 7,573:
deleteButton.on('click', () => {
if (this.copiedTemplate.rows.length > 0) {
if (confirmed) {
this.copiedTemplate.destroy();
Line 8,274 ⟶ 8,404:
deleteButton.on('click', () => {
if (this.splitArticleTemplate.rows.length > 0) {
if (confirmed) {
this.splitArticleTemplate.destroy();
Line 9,335 ⟶ 9,465:
deleteButton.on('click', () => {
if (this.backwardsCopyTemplate.rows.length > 0) {
if (confirmed) {
this.backwardsCopyTemplate.destroy();
Line 11,604 ⟶ 11,734:
.reduce((p, n) => p + n.length, 0);
return noticeCount ?
if (!confirmed) {
return;
Line 11,622 ⟶ 11,752:
});
resetButton.on('click', () => {
if (confirmed) {
this.loadTalkPage().then(() => {
Line 11,642 ⟶ 11,772:
// Original copied notice count.
const notices = this.parsoid.findNotices();
if (confirmed) {
for (const notice of notices) {
Line 11,701 ⟶ 11,831:
if (this.parsoid.getPage() !== talkPage) {
// Ask for user confirmation.
title: mw.msg('deputy.ante.loadRedirect.title'),
actions: [
Line 11,788 ⟶ 11,918:
return new mw.Api().postWithEditToken(Object.assign(Object.assign({}, changeTag(yield window.CopiedTemplateEditor.getWikiConfig())), { action: 'edit', format: 'json', formatversion: '2', utf8: 'true', title: this.parsoid.getPage(), text: yield this.parsoid.toWikitext(), summary: decorateEditSummary(mw.msg(this.parsoid.originalCount > 0 ?
'deputy.ante.content.modify' :
'deputy.ante.content.add'), window.CopiedTemplateEditor.config) })).catch((e, c) => {
throw errorToOO(e, c);
});
Line 12,501 ⟶ 12,631:
defaultValue: [],
displayOptions: { hidden: true }
}),
dangerMode: new Setting({
defaultValue: false,
displayOptions: {
type: 'checkbox'
}
})
};
Line 12,563 ⟶ 12,699:
}),
signingBehavior: new Setting(generateEnumConfigurationProperties(ContributionSurveyRowSigningBehavior, ContributionSurveyRowSigningBehavior.Always)),
signSectionArchive: new Setting({
defaultValue: true,
displayOptions: {
type: 'checkbox'
}
}),
openOldOnContinue: new Setting({
defaultValue: false,
Line 13,037 ⟶ 13,179:
"deputy.setting.user.core.portletNames.short": "Shortened names (e.g. Attrib. Template Editor)",
"deputy.setting.user.core.portletNames.acronym": "Acronyms (e.g. ANTE)",
"deputy.setting.user.core.dangerMode.name": "Danger mode",
"deputy.setting.user.core.dangerMode.description": "Live on the edge. This disables most confirmations and warnings given by Deputy, only leaving potentially catastrophic actions, such as page edits which break templates. It also adds extra buttons meant for rapid case processing. Intended for clerk use; use with extreme caution.",
"deputy.setting.user.cci": "CCI",
"deputy.setting.user.cci.enablePageToolbar.name": "Enable page toolbar",
Line 13,061 ⟶ 13,205:
"deputy.setting.user.cci.signingBehavior.lastOnly": "Only sign the last row modified (prevents assessor recognition)",
"deputy.setting.user.cci.signingBehavior.never": "Never sign rows (prevents assessor recognition)",
"deputy.setting.user.cci.signSectionArchive.name": "Sign by default when archiving CCI sections",
"deputy.setting.user.cci.signSectionArchive.description": "If enabled, Deputy will enable the \"include my signature\" checkbox by default when archiving a CCI section.",
"deputy.setting.user.cci.openOldOnContinue.name": "Open old versions on continue",
"deputy.setting.user.cci.openOldOnContinue.description": "If enabled, all previously-open sections of a given case page will also be opened alongside the section where the \"continue CCI session\" link was clicked.",
Line 14,229 ⟶ 14,375:
];
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;}.oo-ui-image-destructive.oo-ui-icon-checkAll, .oo-ui-image-destructive.mw-ui-icon-checkAll::before {background-image: url(\"data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ctitle%3E check all %3C/title%3E%3Cpath fill=%22%23d73333%22 d=%22m.29 12.71 1.42-1.42 2.22 2.22 8.3-10.14 1.54 1.26-9.7 11.86zM12 10h5v2h-5zm-3 4h5v2H9zm6-8h5v2h-5z%22/%3E%3C/svg%3E\");}/*=============================================================================== 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-section-archived .dp-cs-row-content {background-color: rgba(255, 0, 0, 6%);}.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-danger--separator {flex-basis: 100%;margin: 8px 0;border-bottom: 1px solid #d73333;color: #d73333;font-weight: bold;font-size: 0.7em;text-align: right;text-transform: uppercase;line-height: 0.7em;padding-bottom: 0.2em;}.dp-cs-section-closing {margin: 1em 1.75em;}.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-section-archived-warn, .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,255 ⟶ 14,401:
"deputy.session.section.close": "Archive section",
"deputy.session.section.closeComments": "Archiving comments",
"deputy.session.section.
"deputy.session.section.closeError": "Some revisions remain unassessed. You must mark these revisions as assessed before archiving this section.",
"deputy.session.section.closeError.danger": "Some revisions remain unassessed, but Deputy will allow archiving while danger mode is enabled.",
"deputy.session.section.closeWarn": "You have unsaved changes. Close the section without saving?",
"deputy.session.section.closed": "This section has been archived. You can edit its contents, but you cannot un-archive it.",
"deputy.session.section.stop": "Stop session",
"deputy.session.section.stop.title": "Stop then current session, closing all sections and saving changes for later.",
"deputy.session.section.saved": "Section saved",
"deputy.session.section.failed": "Failed to save section",
Line 14,265 ⟶ 14,414:
"deputy.session.section.conflict.title": "Edit conflict",
"deputy.session.section.conflict.help": "Someone else edited the page before you. Deputy will restart to load the new case content. Your changes will be preserved.",
"deputy.session.section.danger": "Danger mode",
"deputy.session.section.markAllFinished": "Mark all revisions in all sections as finished",
"deputy.session.section.instantArchive": "Archive",
"deputy.session.section.instantArchive.title": "Archive and save this section immediately. Revisions will not be marked as finished.",
"deputy.session.row.status": "Current page status",
"deputy.session.row.status.unfinished": "Unfinished",
Line 14,341 ⟶ 14,494:
"deputy.cancel": "Cancel",
"deputy.review": "Review",
"deputy.review.title": "Review a diff of the changes to be made to the page",
"deputy.save": "Save",
"deputy.close": "Close",
Line 14,640 ⟶ 14,794:
yield this.tryListingAppend(this.getListingWikitext(page, comments), decorateEditSummary(mw.msg(presumptive ?
'deputy.ia.content.listing.pd' :
'deputy.ia.content.listing', listingPage.getPrefixedText(), page.getPrefixedText()), window.InfringementAssistant.config));
});
}
Line 14,674 ⟶ 14,828:
yield this.tryListingAppend(this.getBatchListingWikitext(page, title, comments), decorateEditSummary(mw.msg(presumptive ?
'deputy.ia.content.batchListing.pd' :
'deputy.ia.content.batchListing', listingPage.getPrefixedText(), title), window.InfringementAssistant.config));
});
}
Line 15,090 ⟶ 15,244:
return __awaiter(this, void 0, void 0, function* () {
const newWikitext = yield this.addComment(message, indent);
yield MwApi.action.postWithEditToken(Object.assign(Object.assign({}, changeTag(yield window.InfringementAssistant.getWikiConfig())), { action: 'edit', format: 'json', formatversion: '2', utf8: 'true', title: this.listingPage.title.getPrefixedText(), text: newWikitext, summary: decorateEditSummary(summary !== null && summary !== void 0 ? summary : mw.msg('deputy.ia.content.respond', this.listingPage.title.getPrefixedText(), this.title.getPrefixedText()), window.InfringementAssistant.config) }));
yield this.listingPage.getWikitext(true);
});
Line 15,794 ⟶ 15,948:
.cci.rootPage.get().getPrefixedText(),
this.data.presumptiveCase
] : [])), window.InfringementAssistant.config) }));
});
}
|