User:Chlod/Scripts/Deputy.js: Difference between revisions

Content deleted Content added
(bot/CD)
(bot/CD)
Line 3,579:
 
var version = "0.4.2";
var gitAbbrevHash = "7a3ac05c8ca05a";
var gitBranch = "main";
var gitDate = "SunSat, 251 JunJul 2023 2111:2728:3210 +0800";
var gitVersion = "0.4.2+g7a3ac05gc8ca05a";
 
/**
Line 4,060:
return __awaiter(this, void 0, void 0, function* () {
if (sectionId == null) {
mw.notifythrow new Error(mw.msg('deputy.session.section.missingSection'), {);
autoHide: false,}
if (this.closed && this.rows.some(r => title: mw!r.msg('deputy.session.section.failed'completed)), {
throw new type: Error(mw.msg('errordeputy.session.section.sectionIncomplete'));
});
}
return MwApi.action.postWithEditToken({
Line 4,195 ⟶ 4,194:
}
}), (error) => {
OO.ui.alert(error.message, {
title: mw.msg('deputy.session.section.failed')
});
console.error(error);
saveContainer.classList.remove('active');
Line 4,204 ⟶ 4,206:
const closingWarning = DeputyMessageWidget({
classes: ['dp-cs-section-unfinishedWarning'],
type: 'warningerror',
label: mw.msg('deputy.session.section.closeWarningcloseError')
});
closingWarning.toggle(false);
const updateClosingWarning = (() => {
closingWarning.toggle(const incomplete = this.rows.some((row) => !row.completed));
this.saveButton.setDisabled(incomplete);
closingWarning.toggle(incomplete);
});
const closingCommentsField = new OO.ui.FieldLayout(this.closingComments, {
Line 4,237 ⟶ 4,241:
else {
closingWarning.toggle(false);
this.saveButton.setDisabled(false);
this.rows.forEach((row) => {
row.removeEventListener('update', updateClosingWarning);
Line 13,547 ⟶ 13,552:
"deputy.session.section.closeComments": "Archiving comments",
"deputy.session.section.closeHelp": "Your signature will automatically be included.",
"deputy.session.section.closeWarningcloseError": "Some revisions remain unassessed. You may want tomust mark these revisions as assessed before archiving this section.",
"deputy.session.section.closeWarn": "You have unsaved changes. Close the section without saving?",
"deputy.session.section.stop": "Stop session",
Line 13,553 ⟶ 13,558:
"deputy.session.section.failed": "Failed to save section",
"deputy.session.section.missingSection": "The target section is missing from the case page.",
"deputy.session.section.sectionIncomplete": "The target section still has unreviewed rows.",
"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.",
Line 13,581 ⟶ 13,587:
"deputy.session.row.checked.talk": "talk",
"deputy.session.row.checked.contribs": "contribs",
"deputy.session.revision.assessed": "Mark as assessed",
"deputy.session.revision.cur": "cur",
"deputy.session.revision.prev": "prev",