Fix macos build, tweak variable names, remove unnecessary variable.

This commit is contained in:
Bruno Bernardino 2022-05-16 16:25:46 +01:00
parent 3ae8aa2c38
commit 04e7867413
No known key found for this signature in database
GPG Key ID: D1B0A69ADD114ECE
3 changed files with 3 additions and 5 deletions

View File

@ -55,7 +55,6 @@ jobs:
run: npm run tauri:build:debug
env:
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- name: Build (production)
@ -63,7 +62,6 @@ jobs:
run: npm run tauri:build
env:
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- name: Archive AppImage

View File

@ -15,7 +15,7 @@ impl AddDefaultSubmenus for Menu {
return self.add_submenu(Submenu::new(
app_name.to_string(),
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::Services)
.add_native_item(MenuItem::Separator)

View File

@ -7,7 +7,7 @@ const { version } = require("./package.json");
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 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 assetsDir = resolve(rootDir, process.env.PL_ASSETS_DIR || "assets");
const { name, terms_of_service } = require(join(assetsDir, "manifest.json"));
@ -67,7 +67,7 @@ module.exports = {
meta: {
"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:;`,
},
},
}),