pinokiod 5.0.7 → 5.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/views/app.ejs +15 -15
package/package.json
CHANGED
package/server/views/app.ejs
CHANGED
|
@@ -7405,27 +7405,27 @@ const rerenderMenuSection = (container, html) => {
|
|
|
7405
7405
|
const hasPaths = Boolean(trackedArg || untrackedArg)
|
|
7406
7406
|
const hasTarget = Boolean(viewerCwd && hasPaths && selectionCount > 0)
|
|
7407
7407
|
let bulkUrl = null
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7408
|
+
if (hasTarget) {
|
|
7409
|
+
const urlParts = [`/run/scripts/git/reset_files.json?cwd=${encodeURIComponent(viewerCwd)}`]
|
|
7410
|
+
if (trackedArg) urlParts.push(`tracked_paths=${encodeURIComponent(trackedArg)}`)
|
|
7411
|
+
if (untrackedArg) urlParts.push(`untracked_paths=${encodeURIComponent(untrackedArg)}`)
|
|
7412
|
+
urlParts.push('callback_target=parent')
|
|
7413
|
+
urlParts.push('callback=$location.href')
|
|
7414
|
+
bulkUrl = urlParts.join('&')
|
|
7415
|
+
}
|
|
7416
|
+
bulkResetButton.textContent = `Reset selected (${selectionCount})`
|
|
7417
|
+
bulkResetButton.disabled = selectionCount === 0
|
|
7418
7418
|
bulkResetButton.onclick = null
|
|
7419
7419
|
bulkResetButton.onclick = () => {
|
|
7420
7420
|
if (selectionCount === 0) return
|
|
7421
7421
|
if (!viewerCwd || !hasPaths || !bulkUrl) {
|
|
7422
7422
|
Swal.showValidationMessage('Cannot reset: missing repository context or paths')
|
|
7423
7423
|
return
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7424
|
+
}
|
|
7425
|
+
const confirmed = confirm(`Reset ${selectionCount} selected file${selectionCount === 1 ? '' : 's'}?`)
|
|
7426
|
+
if (!confirmed) return
|
|
7427
|
+
reopenDiffOnCallback = true
|
|
7428
|
+
showIframeView(bulkUrl)
|
|
7429
7429
|
}
|
|
7430
7430
|
}
|
|
7431
7431
|
|