pinokiod 7.5.27 → 7.5.28
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/kernel/index.js +2 -5
- package/kernel/info.js +20 -0
- package/kernel/shell.js +2 -54
- package/package.json +1 -1
- package/server/public/common.js +42 -0
- package/server/public/style.css +126 -14
- package/server/views/app.ejs +171 -13
- package/server/views/app_search_test.ejs +3 -0
- package/server/views/connect/x.ejs +3 -0
- package/server/views/container.ejs +3 -0
- package/server/views/download.ejs +3 -0
- package/server/views/explore.ejs +3 -0
- package/server/views/form.ejs +3 -0
- package/server/views/frame.ejs +3 -0
- package/server/views/help.ejs +3 -0
- package/server/views/index.ejs +21 -66
- package/server/views/index2.ejs +3 -0
- package/server/views/init/index.ejs +3 -0
- package/server/views/mini.ejs +3 -0
- package/server/views/net.ejs +3 -0
- package/server/views/network.ejs +3 -0
- package/server/views/network2.ejs +3 -0
- package/server/views/old_network.ejs +3 -0
- package/server/views/partials/app_navheader.ejs +3 -0
- package/server/views/partials/home_action_modal.ejs +18 -31
- package/server/views/partials/main_sidebar.ejs +101 -4
- package/server/views/prototype/index.ejs +3 -0
- package/server/views/review.ejs +3 -0
- package/server/views/screenshots.ejs +3 -0
- package/server/views/settings.ejs +3 -0
- package/server/views/setup_home.ejs +3 -0
- package/server/views/terminal.ejs +3 -0
- package/server/views/terminals.ejs +3 -0
- package/test/info-ready.test.js +88 -0
- package/test/launch-settings-ui.test.js +3 -0
- package/test/shell-cleaned-log.test.js +66 -0
package/server/views/explore.ejs
CHANGED
|
@@ -150,6 +150,9 @@ body.dark .explore-url {
|
|
|
150
150
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
151
151
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
152
152
|
</button>
|
|
153
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
154
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
155
|
+
</a>
|
|
153
156
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
154
157
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
155
158
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/form.ejs
CHANGED
|
@@ -162,6 +162,9 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
162
162
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
163
163
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
164
164
|
</button>
|
|
165
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
166
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
167
|
+
</a>
|
|
165
168
|
<button class='btn2' id='screenshot' data-tippy-content="screen capture"><i class="fa-solid fa-camera"></i></button>
|
|
166
169
|
<button class='btn2' id='inspector' data-tippy-content="X-ray mode"><i class="fa-solid fa-eye"></i></button>
|
|
167
170
|
<div class='flexible'></div>
|
package/server/views/frame.ejs
CHANGED
|
@@ -92,6 +92,9 @@ main iframe {
|
|
|
92
92
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
93
93
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
94
94
|
</button>
|
|
95
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
96
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
97
|
+
</a>
|
|
95
98
|
<button class='btn2' id='screenshot' data-tippy-content="screen capture"><i class="fa-solid fa-camera"></i></button>
|
|
96
99
|
<button class='btn2' id='inspector' data-tippy-content="X-ray mode"><i class="fa-solid fa-eye"></i></button>
|
|
97
100
|
<div class='flexible'></div>
|
package/server/views/help.ejs
CHANGED
|
@@ -259,6 +259,9 @@ body.dark .item .tile .badge {
|
|
|
259
259
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
260
260
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
261
261
|
</button>
|
|
262
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
263
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
264
|
+
</a>
|
|
262
265
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
263
266
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
264
267
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/index.ejs
CHANGED
|
@@ -1005,51 +1005,29 @@ body.dark .home-actions-close:hover,
|
|
|
1005
1005
|
body.dark .home-actions-close:focus-visible {
|
|
1006
1006
|
background: rgba(255, 255, 255, 0.08);
|
|
1007
1007
|
}
|
|
1008
|
-
.home-actions-tabs {
|
|
1009
|
-
display: flex;
|
|
1010
|
-
gap: 6px;
|
|
1011
|
-
padding: 10px 18px 0;
|
|
1012
|
-
border-bottom: 1px solid rgba(15, 23, 42, 0.09);
|
|
1013
|
-
}
|
|
1014
|
-
body.dark .home-actions-tabs {
|
|
1015
|
-
border-bottom-color: rgba(255, 255, 255, 0.08);
|
|
1016
|
-
}
|
|
1017
|
-
.home-actions-tab {
|
|
1018
|
-
display: inline-flex;
|
|
1019
|
-
align-items: center;
|
|
1020
|
-
gap: 7px;
|
|
1021
|
-
height: 34px;
|
|
1022
|
-
padding: 0 12px;
|
|
1023
|
-
border: 1px solid transparent;
|
|
1024
|
-
border-bottom: none;
|
|
1025
|
-
border-radius: 6px 6px 0 0;
|
|
1026
|
-
background: transparent;
|
|
1027
|
-
color: rgba(15, 23, 42, 0.68);
|
|
1028
|
-
font-size: 12px;
|
|
1029
|
-
font-weight: 700;
|
|
1030
|
-
cursor: pointer;
|
|
1031
|
-
}
|
|
1032
|
-
.home-actions-tab.is-active {
|
|
1033
|
-
border-color: rgba(15, 23, 42, 0.11);
|
|
1034
|
-
background: rgba(248, 250, 252, 0.9);
|
|
1035
|
-
color: rgba(15, 23, 42, 0.94);
|
|
1036
|
-
}
|
|
1037
|
-
body.dark .home-actions-tab {
|
|
1038
|
-
color: rgba(226, 232, 240, 0.68);
|
|
1039
|
-
}
|
|
1040
|
-
body.dark .home-actions-tab.is-active {
|
|
1041
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
1042
|
-
background: rgba(255, 255, 255, 0.055);
|
|
1043
|
-
color: rgba(248, 250, 252, 0.94);
|
|
1044
|
-
}
|
|
1045
1008
|
.home-actions-body {
|
|
1046
1009
|
min-height: 0;
|
|
1047
1010
|
flex: 1 1 auto;
|
|
1048
1011
|
overflow: auto;
|
|
1049
1012
|
padding: 14px 18px 18px;
|
|
1050
1013
|
}
|
|
1051
|
-
.home-actions-
|
|
1052
|
-
|
|
1014
|
+
.home-actions-section + .home-actions-section {
|
|
1015
|
+
margin-top: 16px;
|
|
1016
|
+
padding-top: 16px;
|
|
1017
|
+
border-top: 1px solid rgba(15, 23, 42, 0.09);
|
|
1018
|
+
}
|
|
1019
|
+
body.dark .home-actions-section + .home-actions-section {
|
|
1020
|
+
border-top-color: rgba(255, 255, 255, 0.08);
|
|
1021
|
+
}
|
|
1022
|
+
.home-actions-section-title {
|
|
1023
|
+
margin: 0 0 8px;
|
|
1024
|
+
color: rgba(15, 23, 42, 0.58);
|
|
1025
|
+
font-size: 11px;
|
|
1026
|
+
font-weight: 800;
|
|
1027
|
+
line-height: 1.2;
|
|
1028
|
+
}
|
|
1029
|
+
body.dark .home-actions-section-title {
|
|
1030
|
+
color: rgba(226, 232, 240, 0.56);
|
|
1053
1031
|
}
|
|
1054
1032
|
.home-run-menu-list,
|
|
1055
1033
|
.home-actions-command-list,
|
|
@@ -1165,6 +1143,7 @@ body.dark .home-run-stop {
|
|
|
1165
1143
|
color: rgba(252, 165, 165, 0.86);
|
|
1166
1144
|
}
|
|
1167
1145
|
.home-mode-command.is-danger {
|
|
1146
|
+
margin-top: 6px;
|
|
1168
1147
|
color: rgba(185, 28, 28, 0.86);
|
|
1169
1148
|
}
|
|
1170
1149
|
body.dark .home-mode-command.is-danger {
|
|
@@ -1421,6 +1400,9 @@ body.dark aside .current.selected {
|
|
|
1421
1400
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1422
1401
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1423
1402
|
</button>
|
|
1403
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1404
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1405
|
+
</a>
|
|
1424
1406
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1425
1407
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1426
1408
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -2678,21 +2660,6 @@ const closeContextMenuForNode = (node) => {
|
|
|
2678
2660
|
}
|
|
2679
2661
|
}
|
|
2680
2662
|
window.PinokioHomeCloseContextMenu = closeContextMenuForNode
|
|
2681
|
-
const setHomeActionsTab = (dialog, tabName) => {
|
|
2682
|
-
if (!dialog || !tabName) {
|
|
2683
|
-
return
|
|
2684
|
-
}
|
|
2685
|
-
dialog.querySelectorAll('.home-actions-tab[data-tab]').forEach((tab) => {
|
|
2686
|
-
const isActive = tab.getAttribute('data-tab') === tabName
|
|
2687
|
-
tab.classList.toggle('is-active', isActive)
|
|
2688
|
-
tab.setAttribute('aria-selected', isActive ? 'true' : 'false')
|
|
2689
|
-
})
|
|
2690
|
-
dialog.querySelectorAll('.home-actions-panel').forEach((panel) => {
|
|
2691
|
-
const isActive = panel.getAttribute('data-panel') === tabName
|
|
2692
|
-
panel.classList.toggle('is-active', isActive)
|
|
2693
|
-
panel.hidden = !isActive
|
|
2694
|
-
})
|
|
2695
|
-
}
|
|
2696
2663
|
const homeActionsDrawerMedia = window.matchMedia('(min-width: 961px)')
|
|
2697
2664
|
const homeActionsReducedMotionMedia = window.matchMedia('(prefers-reduced-motion: reduce)')
|
|
2698
2665
|
const isHomeActionsDrawerViewport = () => homeActionsDrawerMedia.matches
|
|
@@ -2791,7 +2758,6 @@ const openHomeActionsDialog = (button) => {
|
|
|
2791
2758
|
return
|
|
2792
2759
|
}
|
|
2793
2760
|
closeHomeActionsDialogs(dialog)
|
|
2794
|
-
setHomeActionsTab(dialog, button.getAttribute('data-default-tab') || 'run')
|
|
2795
2761
|
if (isHomeActionsDrawerViewport()) {
|
|
2796
2762
|
setHomeActionsDrawerOffset()
|
|
2797
2763
|
dialog.classList.remove('is-closing')
|
|
@@ -3094,17 +3060,6 @@ document.addEventListener("click", async (e) => {
|
|
|
3094
3060
|
closeHomeActionsDialog(e.target)
|
|
3095
3061
|
return
|
|
3096
3062
|
}
|
|
3097
|
-
if (e.target.classList.contains("home-actions-tab")) {
|
|
3098
|
-
target = e.target
|
|
3099
|
-
} else {
|
|
3100
|
-
target = e.target.closest(".home-actions-tab")
|
|
3101
|
-
}
|
|
3102
|
-
if (target && target.hasAttribute("data-tab")) {
|
|
3103
|
-
e.preventDefault()
|
|
3104
|
-
e.stopPropagation()
|
|
3105
|
-
setHomeActionsTab(target.closest(".home-actions-dialog"), target.getAttribute("data-tab"))
|
|
3106
|
-
return
|
|
3107
|
-
}
|
|
3108
3063
|
if (e.target.classList.contains("home-run-stop")) {
|
|
3109
3064
|
target = e.target
|
|
3110
3065
|
} else {
|
package/server/views/index2.ejs
CHANGED
|
@@ -272,6 +272,9 @@ body.dark .open-menu, body.dark .browse {
|
|
|
272
272
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
273
273
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
274
274
|
</button>
|
|
275
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
276
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
277
|
+
</a>
|
|
275
278
|
<div class='nav-btns'>
|
|
276
279
|
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
277
280
|
<a class='btn2' id='genlog' href="/logs"><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></a>
|
|
@@ -1528,6 +1528,9 @@ body.dark .ace-editor {
|
|
|
1528
1528
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1529
1529
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1530
1530
|
</button>
|
|
1531
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1532
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1533
|
+
</a>
|
|
1531
1534
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1532
1535
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1533
1536
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/mini.ejs
CHANGED
|
@@ -761,6 +761,9 @@ body.dark .appcanvas {
|
|
|
761
761
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
762
762
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
763
763
|
</button>
|
|
764
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
765
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
766
|
+
</a>
|
|
764
767
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
765
768
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
766
769
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/net.ejs
CHANGED
|
@@ -1294,6 +1294,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
1294
1294
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1295
1295
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1296
1296
|
</button>
|
|
1297
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1298
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1299
|
+
</a>
|
|
1297
1300
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1298
1301
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1299
1302
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/network.ejs
CHANGED
|
@@ -1369,6 +1369,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
1369
1369
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1370
1370
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1371
1371
|
</button>
|
|
1372
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1373
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1374
|
+
</a>
|
|
1372
1375
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1373
1376
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1374
1377
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -422,6 +422,9 @@ table h3 {
|
|
|
422
422
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
423
423
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
424
424
|
</button>
|
|
425
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
426
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
427
|
+
</a>
|
|
425
428
|
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
426
429
|
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
427
430
|
<button class='btn2' id='refresh-page'><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -405,6 +405,9 @@ input:checked + .slider:before {
|
|
|
405
405
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
406
406
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
407
407
|
</button>
|
|
408
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
409
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
410
|
+
</a>
|
|
408
411
|
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
409
412
|
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
410
413
|
<button class='btn2' id='refresh-page'><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
5
5
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
6
6
|
</button>
|
|
7
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
8
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
9
|
+
</a>
|
|
7
10
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
8
11
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
9
12
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -25,42 +25,29 @@
|
|
|
25
25
|
</button>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
<div class='home-actions-tabs' aria-label='App action modes'>
|
|
29
|
-
<button type='button' class='home-actions-tab is-active' role='tab' aria-selected='true' data-tab='run' aria-controls='<%= id %>-run'>
|
|
30
|
-
<i class='fa-solid fa-play' aria-hidden='true'></i>
|
|
31
|
-
<span>Run</span>
|
|
32
|
-
</button>
|
|
33
|
-
<button type='button' class='home-actions-tab home-browse' data-src='<%= item.dev_url %>' title='Open dev mode' aria-label='Open dev mode'>
|
|
34
|
-
<i class='fa-solid fa-code' aria-hidden='true'></i>
|
|
35
|
-
<span>Dev</span>
|
|
36
|
-
<% if (item.terminal_online_count > 0) { %>
|
|
37
|
-
<span class='home-actions-count'><%= item.terminal_online_count %> online</span>
|
|
38
|
-
<% } %>
|
|
39
|
-
</button>
|
|
40
|
-
<button type='button' class='home-actions-tab' role='tab' aria-selected='false' data-tab='files' aria-controls='<%= id %>-files'>
|
|
41
|
-
<i class='fa-solid fa-file-lines' aria-hidden='true'></i>
|
|
42
|
-
<span>Files</span>
|
|
43
|
-
</button>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
28
|
<div class='home-actions-body'>
|
|
47
|
-
|
|
48
|
-
<
|
|
29
|
+
<% if (item.menu && item.menu.length > 0) { %>
|
|
30
|
+
<section class='home-actions-section' aria-labelledby='<%= id %>-run-title'>
|
|
31
|
+
<div class='home-actions-section-title' id='<%= id %>-run-title'>Run</div>
|
|
32
|
+
<div class='home-run-menu-list'>
|
|
33
|
+
<%- include('./home_run_menu', { menu: item.menu, app: item }) %>
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
<% } %>
|
|
37
|
+
|
|
38
|
+
<section class='home-actions-section' aria-labelledby='<%= id %>-app-title'>
|
|
39
|
+
<div class='home-actions-section-title' id='<%= id %>-app-title'>App</div>
|
|
40
|
+
<div class='home-actions-command-list'>
|
|
49
41
|
<button type='button' class='home-mode-command home-browse' data-src='<%= item.view_url %>'>
|
|
50
42
|
<i class='fa-regular fa-eye' aria-hidden='true'></i>
|
|
51
43
|
<span>Open without launching</span>
|
|
52
44
|
</button>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<section id='<%= id %>-files' class='home-actions-panel' role='tabpanel' data-panel='files' hidden>
|
|
60
|
-
<div class='home-actions-command-list'>
|
|
61
|
-
<button type='button' class='home-mode-command home-browse' data-src='<%= item.files_url %>'>
|
|
62
|
-
<i class='fa-solid fa-file-lines' aria-hidden='true'></i>
|
|
63
|
-
<span>Open files mode</span>
|
|
45
|
+
<button type='button' class='home-mode-command home-browse' data-src='<%= item.dev_url %>'>
|
|
46
|
+
<i class='fa-solid fa-code' aria-hidden='true'></i>
|
|
47
|
+
<span>Open dev mode</span>
|
|
48
|
+
<% if (item.terminal_online_count > 0) { %>
|
|
49
|
+
<span class='home-actions-count'><%= item.terminal_online_count %> online</span>
|
|
50
|
+
<% } %>
|
|
64
51
|
</button>
|
|
65
52
|
<button type='button' class='home-mode-command' data-filepath='<%= item.filepath %>'>
|
|
66
53
|
<i class='fa-solid fa-folder-open' aria-hidden='true'></i>
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<i class="fa-solid fa-bars" aria-hidden="true"></i>
|
|
36
36
|
</button>
|
|
37
37
|
<button type="button" class="main-sidebar-mobile-backdrop" data-main-sidebar-backdrop aria-label="Close navigation" hidden></button>
|
|
38
|
+
<button type="button" class="main-sidebar-peek-trigger" data-main-sidebar-peek-trigger aria-label="Show navigation" aria-controls="main-sidebar" aria-expanded="false"></button>
|
|
38
39
|
<aside class="main-sidebar" id="main-sidebar" aria-label="Primary navigation">
|
|
39
40
|
<nav class="main-sidebar-nav" aria-label="Pinokio navigation">
|
|
40
41
|
<div class='main-sidebar-section main-sidebar-section-actions' aria-label="Actions">
|
|
@@ -155,6 +156,7 @@
|
|
|
155
156
|
|
|
156
157
|
const headerToggle = document.getElementById("minimize-header");
|
|
157
158
|
const sidebar = document.getElementById("main-sidebar");
|
|
159
|
+
const peekTrigger = document.querySelector("[data-main-sidebar-peek-trigger]");
|
|
158
160
|
if (body && sidebar && headerToggle && !headerToggle.dataset.mainSidebarHeaderToggle) {
|
|
159
161
|
headerToggle.dataset.mainSidebarHeaderToggle = "true";
|
|
160
162
|
headerToggle.classList.add("sidebar-toggle", "main-sidebar-header-toggle");
|
|
@@ -182,17 +184,66 @@
|
|
|
182
184
|
}
|
|
183
185
|
};
|
|
184
186
|
|
|
185
|
-
const
|
|
187
|
+
const desktopPeekMq = window.matchMedia("(min-width: 769px) and (hover: hover) and (pointer: fine)");
|
|
188
|
+
const storageKey = "pinokio.main-sidebar-collapsed";
|
|
189
|
+
let peekCloseTimer = 0;
|
|
190
|
+
|
|
191
|
+
const isCollapsed = () => body.classList.contains("main-sidebar-collapsed");
|
|
192
|
+
const isPeeking = () => body.classList.contains("main-sidebar-peeking");
|
|
193
|
+
const syncSidebarVisibility = () => {
|
|
194
|
+
const peeking = isPeeking();
|
|
195
|
+
sidebar.setAttribute("aria-hidden", isCollapsed() && !peeking ? "true" : "false");
|
|
196
|
+
if (peekTrigger) {
|
|
197
|
+
peekTrigger.setAttribute("aria-expanded", peeking ? "true" : "false");
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const canPeek = () => desktopPeekMq.matches && isCollapsed() && !body.classList.contains("main-sidebar-mobile-open");
|
|
201
|
+
const setPeeking = (peeking) => {
|
|
202
|
+
const next = !!peeking && canPeek();
|
|
203
|
+
window.clearTimeout(peekCloseTimer);
|
|
204
|
+
body.classList.toggle("main-sidebar-peeking", next);
|
|
205
|
+
syncSidebarVisibility();
|
|
206
|
+
};
|
|
207
|
+
const shouldKeepPeekOpen = () => {
|
|
208
|
+
const active = document.activeElement;
|
|
209
|
+
return (
|
|
210
|
+
(peekTrigger && peekTrigger.matches(":hover")) ||
|
|
211
|
+
sidebar.matches(":hover") ||
|
|
212
|
+
(peekTrigger && active === peekTrigger) ||
|
|
213
|
+
(active instanceof Node && sidebar.contains(active))
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
const closePeekSoon = () => {
|
|
217
|
+
window.clearTimeout(peekCloseTimer);
|
|
218
|
+
peekCloseTimer = window.setTimeout(() => {
|
|
219
|
+
if (shouldKeepPeekOpen()) return;
|
|
220
|
+
setPeeking(false);
|
|
221
|
+
}, 120);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const setCollapsed = (collapsed, options = {}) => {
|
|
186
225
|
const next = !!collapsed;
|
|
226
|
+
if (!next) {
|
|
227
|
+
body.classList.remove("main-sidebar-peeking");
|
|
228
|
+
}
|
|
187
229
|
body.classList.toggle("main-sidebar-collapsed", next);
|
|
188
|
-
|
|
230
|
+
syncSidebarVisibility();
|
|
189
231
|
updateToggle(next);
|
|
232
|
+
if (options.persist !== false) {
|
|
233
|
+
try {
|
|
234
|
+
window.localStorage.setItem(storageKey, next ? "1" : "0");
|
|
235
|
+
} catch (_) {}
|
|
236
|
+
}
|
|
190
237
|
document.dispatchEvent(new CustomEvent("pinokio:sidebar-state", {
|
|
191
238
|
detail: { collapsed: next, source: "main-sidebar" }
|
|
192
239
|
}));
|
|
193
240
|
};
|
|
194
241
|
|
|
195
|
-
|
|
242
|
+
let initialCollapsed = false;
|
|
243
|
+
try {
|
|
244
|
+
initialCollapsed = window.localStorage.getItem(storageKey) === "1";
|
|
245
|
+
} catch (_) {}
|
|
246
|
+
setCollapsed(initialCollapsed, { persist: false });
|
|
196
247
|
requestAnimationFrame(() => {
|
|
197
248
|
body.classList.add("main-sidebar-motion-ready");
|
|
198
249
|
});
|
|
@@ -202,9 +253,55 @@
|
|
|
202
253
|
setCollapsed(!body.classList.contains("main-sidebar-collapsed"));
|
|
203
254
|
});
|
|
204
255
|
|
|
256
|
+
if (peekTrigger) {
|
|
257
|
+
peekTrigger.addEventListener("pointerenter", () => setPeeking(true));
|
|
258
|
+
peekTrigger.addEventListener("focus", () => setPeeking(true));
|
|
259
|
+
peekTrigger.addEventListener("click", () => setPeeking(true));
|
|
260
|
+
peekTrigger.addEventListener("pointerleave", closePeekSoon);
|
|
261
|
+
peekTrigger.addEventListener("blur", closePeekSoon);
|
|
262
|
+
sidebar.addEventListener("pointerenter", () => {
|
|
263
|
+
if (isPeeking()) {
|
|
264
|
+
window.clearTimeout(peekCloseTimer);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
sidebar.addEventListener("focusin", () => {
|
|
268
|
+
if (isPeeking()) {
|
|
269
|
+
window.clearTimeout(peekCloseTimer);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
sidebar.addEventListener("pointerleave", closePeekSoon);
|
|
273
|
+
sidebar.addEventListener("focusout", closePeekSoon);
|
|
274
|
+
document.addEventListener("pointerdown", (event) => {
|
|
275
|
+
if (!isPeeking()) return;
|
|
276
|
+
const target = event.target;
|
|
277
|
+
if (target instanceof Node && (sidebar.contains(target) || peekTrigger.contains(target))) return;
|
|
278
|
+
setPeeking(false);
|
|
279
|
+
});
|
|
280
|
+
document.addEventListener("keydown", (event) => {
|
|
281
|
+
if (event.key === "Escape" && isPeeking()) {
|
|
282
|
+
setPeeking(false);
|
|
283
|
+
if (typeof peekTrigger.focus === "function") {
|
|
284
|
+
peekTrigger.focus();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
const handlePeekMediaChange = () => {
|
|
289
|
+
if (!desktopPeekMq.matches) {
|
|
290
|
+
setPeeking(false);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
if (typeof desktopPeekMq.addEventListener === "function") {
|
|
294
|
+
desktopPeekMq.addEventListener("change", handlePeekMediaChange);
|
|
295
|
+
} else if (typeof desktopPeekMq.addListener === "function") {
|
|
296
|
+
desktopPeekMq.addListener(handlePeekMediaChange);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
205
300
|
window.PinokioMainSidebar = {
|
|
206
301
|
setCollapsed,
|
|
207
|
-
|
|
302
|
+
setPeeking,
|
|
303
|
+
isCollapsed,
|
|
304
|
+
isPeeking
|
|
208
305
|
};
|
|
209
306
|
}
|
|
210
307
|
|
|
@@ -1010,6 +1010,9 @@ body.dark .appcanvas {
|
|
|
1010
1010
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1011
1011
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1012
1012
|
</button>
|
|
1013
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1014
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1015
|
+
</a>
|
|
1013
1016
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1014
1017
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1015
1018
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
package/server/views/review.ejs
CHANGED
|
@@ -941,6 +941,9 @@ body.dark .top-menu .btn2.selected {
|
|
|
941
941
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
942
942
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
943
943
|
</button>
|
|
944
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
945
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
946
|
+
</a>
|
|
944
947
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
945
948
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
946
949
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -873,6 +873,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
873
873
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
874
874
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
875
875
|
</button>
|
|
876
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
877
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
878
|
+
</a>
|
|
876
879
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
877
880
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
878
881
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -1011,6 +1011,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
1011
1011
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
1012
1012
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
1013
1013
|
</button>
|
|
1014
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
1015
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
1016
|
+
</a>
|
|
1014
1017
|
<button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
1015
1018
|
<button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
1016
1019
|
<button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -155,6 +155,9 @@ body.dark .card {
|
|
|
155
155
|
<button class='btn2' id='minimize-header' data-tippy-content="fullscreen" title='fullscreen'>
|
|
156
156
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
157
157
|
</button>
|
|
158
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
159
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
160
|
+
</a>
|
|
158
161
|
<button class='btn2' id='screenshot' data-tippy-content="screen capture"><i class="fa-solid fa-camera"></i></button>
|
|
159
162
|
<button class='btn2' id='inspector' data-tippy-content="X-ray mode"><i class="fa-solid fa-eye"></i></button>
|
|
160
163
|
<div class='flexible'></div>
|
|
@@ -3403,6 +3403,9 @@ const reloadMemory = async () => {
|
|
|
3403
3403
|
<button class="btn2" id="minimize-header" data-tippy-content="fullscreen" title="fullscreen">
|
|
3404
3404
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
3405
3405
|
</button>
|
|
3406
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
3407
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
3408
|
+
</a>
|
|
3406
3409
|
<button class="btn2" id="back" data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
3407
3410
|
<button class="btn2" id="forward" data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
3408
3411
|
<button class="btn2" id="refresh-page" data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|
|
@@ -4554,6 +4554,9 @@ body.dark .pinokio-git-commit-item {
|
|
|
4554
4554
|
<button class="btn2" id="minimize-header" data-tippy-content="fullscreen" title="fullscreen">
|
|
4555
4555
|
<div><i class="fa-solid fa-expand"></i></div>
|
|
4556
4556
|
</button>
|
|
4557
|
+
<a class='btn2 pinokio-explore-nav-button' href="/home?mode=explore" data-pinokio-explore-nav="true" data-tippy-content="Explore" title="Explore" aria-label="Explore">
|
|
4558
|
+
<div><i class="fa-solid fa-globe" aria-hidden="true"></i></div>
|
|
4559
|
+
</a>
|
|
4557
4560
|
<button class="btn2" id="back" data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
|
|
4558
4561
|
<button class="btn2" id="forward" data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
|
|
4559
4562
|
<button class="btn2" id="refresh-page" data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
|