Skip to content

Commit

Permalink
CSS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Aug 24, 2021
1 parent 861a5b6 commit fd2f6e3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions module/SystemProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class SystemProvider {
}

get customCSS() {
return [];
return "";
}

get loadTemplates() {
Expand Down Expand Up @@ -509,7 +509,7 @@ export class swadeProvider extends SystemProvider {

export class wfrp4eProvider extends SystemProvider {
get customCSS() {
return ["wfrp4e"];
return "wfrp4e";
}

get template() {
Expand Down
2 changes: 1 addition & 1 deletion module/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class PartyOverviewApp extends Application {
resizable: true,
title: "Party Overview",
template: currentSystemProvider.template,
classes: ["party-overview", ...currentSystemProvider.customCSS],
classes: ["party-overview", game.system.id],
tabs: [
{
navSelector: ".tabs",
Expand Down
8 changes: 2 additions & 6 deletions party-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,15 @@ Hooks.on("ready", () => {
Hooks.on("renderActorDirectory", (app, html, data) => {
if (!game.user.isGM && !game.settings.get("party-overview", "EnablePlayerAccess"))
return;
let div = $(
`<div id="party-overview" class="action-buttons flexrow"></div>`
);
$(html).find("header.directory-header").prepend(div);

let button = $(
`<button class="party-overview"><i class="fas fa-users"></i> Party Overview</button>`
`<button class="party-overview ${currentSystemProvider.customCSS}"><i class="fas fa-users"></i> Party Overview</button>`
);
button.on("click", (e) => {
party.render(true);
});

$(html).find("#party-overview").prepend(button);
$(html).find(".header-actions").prepend(button);
});

Hooks.on("deleteActor", (actor, ...rest) => {
Expand Down
8 changes: 8 additions & 0 deletions style/party-overview.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,11 @@ div.party-overview.wfrp4e .table-row .button button {
div.party-overview.wfrp4e .table-row:nth-child(2n) {
background-color: rgba(228, 228, 228, 0.34);
}

/* Buttons */
button.party-overview.wfrp4e {
min-width: max-content;
}
button.party-overview:not(.wfrp4e) {
flex-basis: 100%;
}

0 comments on commit fd2f6e3

Please sign in to comment.