pinokiod 5.0.2 → 5.0.4
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/aside +0 -0
- package/package.json +1 -1
- package/server/views/app.ejs +11 -4
package/aside
ADDED
|
File without changes
|
package/package.json
CHANGED
package/server/views/app.ejs
CHANGED
|
@@ -216,7 +216,7 @@ body.dark .appcanvas > aside {
|
|
|
216
216
|
.appcanvas > aside .menu-container {
|
|
217
217
|
display: flex;
|
|
218
218
|
flex-direction: row;
|
|
219
|
-
align-items:
|
|
219
|
+
align-items: center;
|
|
220
220
|
gap: 6px;
|
|
221
221
|
padding: 0;
|
|
222
222
|
overflow-x: auto;
|
|
@@ -7457,7 +7457,9 @@ const rerenderMenuSection = (container, html) => {
|
|
|
7457
7457
|
renderDiff(diffJson, diffBody)
|
|
7458
7458
|
const openBtn = diffViewer.querySelector('.pinokio-git-diff-open-file')
|
|
7459
7459
|
if (openBtn) {
|
|
7460
|
-
openBtn.addEventListener('click', async () => {
|
|
7460
|
+
openBtn.addEventListener('click', async (event) => {
|
|
7461
|
+
event.preventDefault()
|
|
7462
|
+
event.stopPropagation()
|
|
7461
7463
|
const repoKey = openBtn.getAttribute('data-open-repo') || repoParam || ''
|
|
7462
7464
|
const rel = openBtn.getAttribute('data-open-relpath') || ''
|
|
7463
7465
|
if (!repoKey || !rel) return
|
|
@@ -7482,9 +7484,12 @@ const rerenderMenuSection = (container, html) => {
|
|
|
7482
7484
|
fileItemsArray.forEach(item => {
|
|
7483
7485
|
item.addEventListener('click', async (event) => {
|
|
7484
7486
|
const targetIsCheckbox = event.target && event.target.hasAttribute && event.target.hasAttribute('data-file-checkbox')
|
|
7487
|
+
if (!targetIsCheckbox) {
|
|
7488
|
+
event.preventDefault()
|
|
7489
|
+
event.stopPropagation()
|
|
7490
|
+
}
|
|
7485
7491
|
const index = Number(item.getAttribute('data-index') || '-1')
|
|
7486
7492
|
if (!targetIsCheckbox) {
|
|
7487
|
-
// Preview only
|
|
7488
7493
|
lastSelectedIndex = index
|
|
7489
7494
|
await renderFileDiff(item)
|
|
7490
7495
|
return
|
|
@@ -8033,7 +8038,9 @@ const rerenderMenuSection = (container, html) => {
|
|
|
8033
8038
|
}
|
|
8034
8039
|
|
|
8035
8040
|
fileItems.forEach(item => {
|
|
8036
|
-
item.addEventListener('click', async () => {
|
|
8041
|
+
item.addEventListener('click', async (event) => {
|
|
8042
|
+
event.preventDefault()
|
|
8043
|
+
event.stopPropagation()
|
|
8037
8044
|
// Remove active class from all items
|
|
8038
8045
|
fileItems.forEach(i => i.classList.remove('pinokio-active-file-item'))
|
|
8039
8046
|
// Add active class to clicked item
|