pinokiod 3.55.0 → 3.56.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 +16 -0
- package/server/public/style.css +2 -0
- package/server/views/setup.ejs +1 -1
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2943,6 +2943,22 @@ class Server {
|
|
|
2943
2943
|
origin: '*'
|
|
2944
2944
|
}));
|
|
2945
2945
|
|
|
2946
|
+
this.app.use((req, res, next) => {
|
|
2947
|
+
const userAgent = req.get('User-Agent') || '';
|
|
2948
|
+
const clientType = req.get('X-Client-Type');
|
|
2949
|
+
const customUA = userAgent.includes('MyApp-Electron');
|
|
2950
|
+
req.clientInfo = {
|
|
2951
|
+
userAgent,
|
|
2952
|
+
clientType,
|
|
2953
|
+
isElectron: clientType === 'electron' || customUA,
|
|
2954
|
+
isBrowser: !clientType === 'electron' && !customUA,
|
|
2955
|
+
userAgent: userAgent,
|
|
2956
|
+
clientType: clientType || 'unknown'
|
|
2957
|
+
};
|
|
2958
|
+
console.log("clientInfo", req.clientInfo)
|
|
2959
|
+
next();
|
|
2960
|
+
})
|
|
2961
|
+
|
|
2946
2962
|
if (this.kernel.homedir) {
|
|
2947
2963
|
this.app.use(express.static(this.kernel.path("web/public")))
|
|
2948
2964
|
this.app.use('/prototype', express.static(this.kernel.path("prototype")))
|
package/server/public/style.css
CHANGED
package/server/views/setup.ejs
CHANGED
|
@@ -137,7 +137,7 @@ body {
|
|
|
137
137
|
<div id='dragger'></div>
|
|
138
138
|
<header class='grabbable'>
|
|
139
139
|
<h1>
|
|
140
|
-
<a class='
|
|
140
|
+
<a class='home' href="/"><%-logo%></a>
|
|
141
141
|
<button class='btn2' id='screenshot' data-tippy-content="take a screenshot"><i class="fa-solid fa-camera"></i></button>
|
|
142
142
|
<div class='flexible'></div>
|
|
143
143
|
<a class='btn2' href="/columns" data-tippy-content="split into 2 columns">
|