Skip to content

Commit

Permalink
patch code review
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Dec 31, 2021
1 parent 77baa9f commit d2e6591
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"
}
8 changes: 3 additions & 5 deletions modules/component/hotbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ export default class MinimalUIHotbar {
</a>
`

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);
Expand Down Expand Up @@ -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': {
Expand Down
11 changes: 3 additions & 8 deletions modules/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit d2e6591

Please sign in to comment.