Fix macos build, tweak variable names, remove unnecessary variable.
This commit is contained in:
parent
3ae8aa2c38
commit
04e7867413
|
@ -55,7 +55,6 @@ jobs:
|
||||||
run: npm run tauri:build:debug
|
run: npm run tauri:build:debug
|
||||||
env:
|
env:
|
||||||
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
|
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
|
||||||
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
- name: Build (production)
|
- name: Build (production)
|
||||||
|
@ -63,7 +62,6 @@ jobs:
|
||||||
run: npm run tauri:build
|
run: npm run tauri:build
|
||||||
env:
|
env:
|
||||||
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
|
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
|
||||||
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
- name: Archive AppImage
|
- name: Archive AppImage
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl AddDefaultSubmenus for Menu {
|
||||||
return self.add_submenu(Submenu::new(
|
return self.add_submenu(Submenu::new(
|
||||||
app_name.to_string(),
|
app_name.to_string(),
|
||||||
Menu::new()
|
Menu::new()
|
||||||
.add_native_item(MenuItem::About(app_name.to_string()))
|
.add_native_item(MenuItem::About(app_name.to_string()), {})
|
||||||
.add_native_item(MenuItem::Separator)
|
.add_native_item(MenuItem::Separator)
|
||||||
.add_native_item(MenuItem::Services)
|
.add_native_item(MenuItem::Services)
|
||||||
.add_native_item(MenuItem::Separator)
|
.add_native_item(MenuItem::Separator)
|
||||||
|
|
|
@ -7,7 +7,7 @@ const { version } = require("./package.json");
|
||||||
const out = process.env.PL_PWA_DIR || resolve(__dirname, "dist");
|
const out = process.env.PL_PWA_DIR || resolve(__dirname, "dist");
|
||||||
const serverUrl = process.env.PL_SERVER_URL || `http://0.0.0.0:${process.env.PL_SERVER_PORT || 3000}`;
|
const serverUrl = process.env.PL_SERVER_URL || `http://0.0.0.0:${process.env.PL_SERVER_PORT || 3000}`;
|
||||||
const pwaUrl = process.env.PL_PWA_URL || `http://localhost:${process.env.PL_PWA_PORT || 8080}`;
|
const pwaUrl = process.env.PL_PWA_URL || `http://localhost:${process.env.PL_PWA_PORT || 8080}`;
|
||||||
const websocketServerUrl = pwaUrl.replace("http://", "ws://").replace("https://", "wss://");
|
const websocketPwaUrl = pwaUrl.replace("http://", "ws://").replace("https://", "wss://");
|
||||||
const rootDir = resolve(__dirname, "../..");
|
const rootDir = resolve(__dirname, "../..");
|
||||||
const assetsDir = resolve(rootDir, process.env.PL_ASSETS_DIR || "assets");
|
const assetsDir = resolve(rootDir, process.env.PL_ASSETS_DIR || "assets");
|
||||||
const { name, terms_of_service } = require(join(assetsDir, "manifest.json"));
|
const { name, terms_of_service } = require(join(assetsDir, "manifest.json"));
|
||||||
|
@ -67,7 +67,7 @@ module.exports = {
|
||||||
meta: {
|
meta: {
|
||||||
"Content-Security-Policy": {
|
"Content-Security-Policy": {
|
||||||
"http-equiv": "Content-Security-Policy",
|
"http-equiv": "Content-Security-Policy",
|
||||||
content: `default-src 'self' ${serverUrl} ${websocketServerUrl} https://api.pwnedpasswords.com blob:; style-src 'self' 'unsafe-inline'; object-src 'self' blob:; frame-src 'self'; img-src 'self' blob: data: https:;`,
|
content: `default-src 'self' ${serverUrl} ${websocketPwaUrl} https://api.pwnedpasswords.com blob:; style-src 'self' 'unsafe-inline'; object-src 'self' blob:; frame-src 'self'; img-src 'self' blob: data: https:;`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue