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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.55.0",
3
+ "version": "3.56.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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")))
@@ -1043,7 +1043,9 @@ header {
1043
1043
  background: white;
1044
1044
  */
1045
1045
  position: sticky;
1046
+ /*
1046
1047
  padding: 10px 10px 0;
1048
+ */
1047
1049
  top: 0;
1048
1050
  box-sizing: border-box;
1049
1051
  z-index: 1000;
@@ -137,7 +137,7 @@ body {
137
137
  <div id='dragger'></div>
138
138
  <header class='grabbable'>
139
139
  <h1>
140
- <a class='path' href="/"><%-logo%></a>
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">