Skip to content

Commit

Permalink
raise my hand compat
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Feb 10, 2022
1 parent 9d54e23 commit 23e76da
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.4.17
* Bugfix: Minimized sidebar tabs should now maximize if right-clicked
* Compatibility: Updated compatibility with raise my hand module

### 1.4.16
* Bugfix: Autohide-plus controls now sets toggle controls styles correctly on startup

Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.",
"version": "1.4.16",
"version": "1.4.17",
"minimumCoreVersion": "9.233",
"compatibleCoreVersion": "9",
"dependencies": [
Expand Down Expand Up @@ -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.16/foundryvtt-minimal-ui_1.4.16.zip",
"download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.4.17/foundryvtt-minimal-ui_1.4.17.zip",
"changelog": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/blob/main/CHANGELOG.md"
}
5 changes: 0 additions & 5 deletions modules/component/players.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,8 @@ export default class MinimalUIPlayers {
}
);
}
// Compatibility for Raise Hand module
let playerWidthPixel = parseInt(MinimalUIPlayers.cssPlayersHiddenWidth);

if (game.modules.get('raise-my-hand') && game.modules.get('raise-my-hand').active) {
playerWidthPixel += 14;
rootStyle.setProperty('--playerslh', '20px');
}
// Compatibility for Ping Logger module
if (game.modules.get('ping-logger')?.active) {
if (game.settings.get('minimal-ui', 'playerShowPing') === "showPing") {
Expand Down
10 changes: 8 additions & 2 deletions modules/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class MinimalUIPatch {
static initHooks() {
Hooks.on('changeSidebarTab', function (app) {
const target = Object.values(ui.windows).find(a => a.tabName === app.tabName);
if (target && target._minimized)
if (ui.sidebar._collapsed && target?._minimized)
target.maximize();
else if (ui.sidebar._collapsed && target?.popOut)
target.bringToTop();
Expand All @@ -21,7 +21,7 @@ export default class MinimalUIPatch {

static readyHooks() {
// For some reason, the chat pop out does not trigger a changeSidebarTab nor renderSidebarTab. Apply exceptionally.
const chatTab = ui.sidebar.element.find('[data-tab="chat"]')
const chatTab = ui.sidebar.element.find('[data-tab="chat"]');
if (chatTab?.length) {
chatTab.click(() => {
if (ui.sidebar._collapsed)
Expand All @@ -31,6 +31,12 @@ export default class MinimalUIPatch {
ui.chat._popout?.bringToTop();
});
}
$("#sidebar-tabs > a").contextmenu((e) => {
const tab = ui[$(e.currentTarget).attr('data-tab')];
console.log(tab);
if (tab?._popout?._minimized)
tab._popout.maximize();
});
}

}
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.16",
"version": "1.4.17",
"description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.",
"main": "minimalui.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion styles/component/players.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
}

.raised-hand {
font-size: 12px;
font-size: 20px;
position: fixed;
}

.pingLogger_pingSpan {
Expand Down

0 comments on commit 23e76da

Please sign in to comment.