diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ebce0..34f16ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -### 1.4.1 (WIP) +### 1.4.1 +* Compatibility: Sidebar Expander * Bugfix: Put back players panel if switching hotbar position other than to extreme left without need to refresh +* Bugfix: Removed unnecessary deprecated code ### 1.4.0 * Enhancement: Achieve a new level of minimalism with new Minimal UI defaults and settings diff --git a/module.json b/module.json index 6b0a721..9f9a06e 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "title": "Minimal UI", "author": "JeansenVaars#2857", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", - "version": "1.4.0", + "version": "1.4.1", "minimumCoreVersion": "9.233", "compatibleCoreVersion": "9.238", "dependencies": [ @@ -30,5 +30,5 @@ ], "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.0/foundryvtt-minimal-ui_1.4.0.zip" + "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.4.1/foundryvtt-minimal-ui_1.4.1.zip" } diff --git a/modules/component/hotbar.js b/modules/component/hotbar.js index 1cac439..925e7c3 100644 --- a/modules/component/hotbar.js +++ b/modules/component/hotbar.js @@ -23,11 +23,9 @@ export default class MinimalUIHotbar { ` - static async collapseHotbar() { - await ui.hotbar.collapse(); - } - static lockHotbar(unlock) { + if ((game.modules.get("custom-hotbar")?.active) || (game.modules.get('monks-hotbar-expansion')?.active)) + return; const barLock = $("#bar-lock > i"); if (MinimalUIHotbar.hotbarLocked && unlock) { rootStyle.setProperty('--hotbarypos', MinimalUIHotbar.cssHotbarHidden); @@ -83,7 +81,7 @@ export default class MinimalUIHotbar { static configureHotbar() { switch (game.settings.get('minimal-ui', 'hotbar')) { case 'collapsed': { - MinimalUIHotbar.collapseHotbar(); + ui.hotbar.collapse(); break; } case 'autohide': { diff --git a/modules/patch.js b/modules/patch.js index 403d320..7e3e528 100644 --- a/modules/patch.js +++ b/modules/patch.js @@ -13,14 +13,9 @@ export default class MinimalUIPatch { target.bringToTop(); }); - Hooks.once('ready', async function () { - $("#sidebar-tabs > a:nth-child(n)").click(function (eve) { - if (eve.currentTarget.classList.contains('collapse')) return; - const tabName = jQuery(eve.currentTarget).attr('data-tab'); - if (ui.sidebar._collapsed) { - ui.sidebar.activateTab(tabName); - } - }); + Hooks.on('renderSidebarTab', function (app) { + if (ui.sidebar._collapsed && app) + app.bringToTop(); }); } diff --git a/package-lock.json b/package-lock.json index 1e306bf..669ce51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "foundryvtt-minimal-ui", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "@rollup/plugin-json": "^4.1.0", diff --git a/package.json b/package.json index e63a1b1..008a728 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foundryvtt-minimal-ui", - "version": "1.4.0", + "version": "1.4.1", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", "main": "minimalui.js", "scripts": {