pinokiod 3.213.0 → 3.214.0
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/index.js +4 -5
- package/server/public/layout.js +1 -0
- package/server/public/style.css +0 -2
- package/server/views/layout.ejs +32 -1
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -3009,16 +3009,15 @@ class Server {
|
|
|
3009
3009
|
|
|
3010
3010
|
if (this.theme === "dark") {
|
|
3011
3011
|
this.colors = {
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
symbolColor: "
|
|
3012
|
+
color: "rgb(27, 28, 29)",
|
|
3013
|
+
// symbolColor: "white"
|
|
3014
|
+
symbolColor: "#F4F4F4"
|
|
3015
3015
|
// color: "rgb(31, 29, 39)",
|
|
3016
3016
|
// symbolColor: "#b7a1ff"
|
|
3017
3017
|
}
|
|
3018
3018
|
} else {
|
|
3019
3019
|
this.colors = {
|
|
3020
|
-
color: "
|
|
3021
|
-
//color: "white",
|
|
3020
|
+
color: "white",
|
|
3022
3021
|
// color: "#F5F4FA",
|
|
3023
3022
|
symbolColor: "black",
|
|
3024
3023
|
}
|
package/server/public/layout.js
CHANGED
package/server/public/style.css
CHANGED
|
@@ -847,11 +847,9 @@ body {
|
|
|
847
847
|
position: relative;
|
|
848
848
|
}
|
|
849
849
|
/* Reserve scrollbar space to prevent header layout shift */
|
|
850
|
-
/*
|
|
851
850
|
html {
|
|
852
851
|
scrollbar-gutter: stable both-edges;
|
|
853
852
|
}
|
|
854
|
-
*/
|
|
855
853
|
body.dark {
|
|
856
854
|
color: var(--dark-color);
|
|
857
855
|
background: var(--dark-bg);
|
package/server/views/layout.ejs
CHANGED
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
--layout-gutter-bg: rgba(0, 0, 0, 0.04);
|
|
12
12
|
--layout-gutter-bg-hover: cornflowerblue;
|
|
13
13
|
--layout-shadow: rgba(0, 0, 0, 0.06);
|
|
14
|
+
--layout-viewport-height: 100vh;
|
|
14
15
|
color-scheme: light dark;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
html, body {
|
|
18
|
-
height:
|
|
19
|
+
height: var(--layout-viewport-height);
|
|
20
|
+
min-height: var(--layout-viewport-height);
|
|
19
21
|
width: 100%;
|
|
20
22
|
margin: 0;
|
|
21
23
|
padding: 0;
|
|
@@ -118,6 +120,35 @@
|
|
|
118
120
|
pointer-events: none;
|
|
119
121
|
}
|
|
120
122
|
</style>
|
|
123
|
+
<script>
|
|
124
|
+
(function () {
|
|
125
|
+
const root = document.documentElement;
|
|
126
|
+
const updateViewportHeight = () => {
|
|
127
|
+
const viewport = window.visualViewport;
|
|
128
|
+
const height = viewport ? viewport.height : window.innerHeight;
|
|
129
|
+
if (!height || !Number.isFinite(height)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
root.style.setProperty('--layout-viewport-height', `${Math.max(0, height).toFixed(2)}px`);
|
|
133
|
+
window.dispatchEvent(new Event('pinokio:viewport-change'));
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const resizeEvents = ['resize', 'orientationchange'];
|
|
137
|
+
const boundUpdate = () => requestAnimationFrame(updateViewportHeight);
|
|
138
|
+
|
|
139
|
+
updateViewportHeight();
|
|
140
|
+
|
|
141
|
+
resizeEvents.forEach((eventName) => {
|
|
142
|
+
window.addEventListener(eventName, boundUpdate, { passive: true });
|
|
143
|
+
});
|
|
144
|
+
if (window.visualViewport) {
|
|
145
|
+
window.visualViewport.addEventListener('resize', boundUpdate, { passive: true });
|
|
146
|
+
window.visualViewport.addEventListener('scroll', boundUpdate, { passive: true });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
window.addEventListener('pageshow', boundUpdate, { passive: true });
|
|
150
|
+
})();
|
|
151
|
+
</script>
|
|
121
152
|
</head>
|
|
122
153
|
<body class="<%= theme %>" data-agent="<%= agent %>">
|
|
123
154
|
<div id='dragger'></div>
|