From e1184ae063c09ba340c9bab676c3e32c4b74e0fc Mon Sep 17 00:00:00 2001 From: Saif Addin Date: Sun, 20 Feb 2022 18:51:04 +0100 Subject: [PATCH] picker for logo and client may be undefined --- CHANGELOG.md | 4 ++++ module.json | 4 ++-- modules/component/camera.js | 2 +- modules/component/logo.js | 1 + package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045a07c..e60f66f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.4.20 +* Bugfix: Logo image setting has now a filepicker to choose logo easily +* Bugfix: Fixed a WebRTC error where rtc client might have not yet loaded + ### 1.4.19 * Bugfix: Switching Camera Behavior modes no longer requires a full refresh * Bugfix: Removed ghost window when a player disables camera while another has it in floating mode (Thanks G.O.D. for reporting) diff --git a/module.json b/module.json index 8aadd01..9284e78 100644 --- a/module.json +++ b/module.json @@ -10,7 +10,7 @@ } ], "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", - "version": "1.4.19", + "version": "1.4.20", "minimumCoreVersion": "9.233", "compatibleCoreVersion": "9", "dependencies": [ @@ -42,6 +42,6 @@ ], "url": "https://github.com/saif-ellafi/foundryvtt-minimal-ui.git", "manifest": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/latest/download/module.json", - "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.4.19/foundryvtt-minimal-ui_1.4.19.zip", + "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.4.20/foundryvtt-minimal-ui_1.4.20.zip", "changelog": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/blob/main/CHANGELOG.md" } diff --git a/modules/component/camera.js b/modules/component/camera.js index a0eac62..1924e8b 100644 --- a/modules/component/camera.js +++ b/modules/component/camera.js @@ -54,7 +54,7 @@ export default class MinimalUICamera { MinimalUICamera.updateCameraSettings(); }); Hooks.on('rtcSettingsChanged', function(act, cl) { - if (cl.client.users[game.user.id].hidden !== undefined) + if (cl.client?.users[game.user.id]?.hidden !== undefined) game.webrtc.render(); }); } diff --git a/modules/component/logo.js b/modules/component/logo.js index 20e3b4f..043c7c3 100644 --- a/modules/component/logo.js +++ b/modules/component/logo.js @@ -91,6 +91,7 @@ export default class MinimalUILogo { scope: 'world', config: true, type: String, + filePicker: 'file', default: "icons/fvtt.png", onChange: _ => { MinimalUILogo.updateImageSrc(game.settings.get('minimal-ui', 'foundryLogoImage')); diff --git a/package-lock.json b/package-lock.json index d9358d4..c6c05db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "foundryvtt-minimal-ui", - "version": "1.4.19", + "version": "1.4.20", "license": "MIT", "dependencies": { "@rollup/plugin-json": "^4.1.0", diff --git a/package.json b/package.json index 91e466b..4ff1d2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foundryvtt-minimal-ui", - "version": "1.4.19", + "version": "1.4.20", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", "main": "minimalui.js", "scripts": {