@swimmingliu/autovpn 1.5.3 → 1.5.5
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/dist/server/http.js
CHANGED
|
@@ -62,7 +62,9 @@ async function writeStaticFile(response, statusCode, filePath, body) {
|
|
|
62
62
|
async function serveRendererIndex(response) {
|
|
63
63
|
const indexPath = path.join(rendererRoot(), 'index.html');
|
|
64
64
|
const html = await fs.readFile(indexPath, 'utf8');
|
|
65
|
-
const injected = html
|
|
65
|
+
const injected = html
|
|
66
|
+
.replace('<body data-page="dashboard">', '<body data-page="dashboard" data-runtime="web">')
|
|
67
|
+
.replace('<script type="module" src="./app.js"></script>', '<script src="/web-adapter.js"></script>\n <script type="module" src="./app.js"></script>');
|
|
66
68
|
await writeStaticFile(response, 200, indexPath, injected);
|
|
67
69
|
}
|
|
68
70
|
async function serveRendererAsset(url, response) {
|
|
@@ -94,6 +94,10 @@ textarea:focus {
|
|
|
94
94
|
min-height: 0;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
body[data-runtime="web"] .app-frame {
|
|
98
|
+
grid-template-rows: minmax(0, 1fr);
|
|
99
|
+
}
|
|
100
|
+
|
|
97
101
|
.window-titlebar {
|
|
98
102
|
-webkit-app-region: drag;
|
|
99
103
|
user-select: none;
|
|
@@ -102,6 +106,10 @@ textarea:focus {
|
|
|
102
106
|
backdrop-filter: blur(16px);
|
|
103
107
|
}
|
|
104
108
|
|
|
109
|
+
body[data-runtime="web"] .window-titlebar {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
105
113
|
.app-content-shell {
|
|
106
114
|
min-height: 0;
|
|
107
115
|
overflow: hidden;
|