diff --git a/src/investigator.less b/src/investigator.less index 68077fee9..396928acc 100644 --- a/src/investigator.less +++ b/src/investigator.less @@ -6,90 +6,92 @@ // We wouldn't need to do this if we were exporting our CSS into a file and // getting Foundry to load it, but see https://github.com/lumphammer/gumshoe-fvtt/issues/928 // for why we don't do that. -@layer system { - .window-content.non-resizable { - padding: 0; - position: relative; - } - - .window-content.resizable { - position: relative; - overflow: hidden; - padding: 0; - .react-target { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - } - a.entity-link, - a.content-link, - a.inline-roll { - background: unset; - border-style: dashed; - border-width: 1px; - } +// disabling layers for now to remain v12 compatible +//@layer system { +.window-content.non-resizable { + padding: 0; + position: relative; +} +.window-content.resizable { + position: relative; + overflow: hidden; + padding: 0; .react-target { - flex: 1; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; } +} - // .window-app, - // #sidebar, - // .main-controls li, - // .sub-controls li, - // #players, - // #hotbar > *, - // #navigation a, - // #navigation li { - // backdrop-filter: blur(10px); - // background-image: linear-gradient(to bottom, #000b 0%, #0006 100%); - // } - - hr { - width: calc(100% - 2em); - } +a.entity-link, +a.content-link, +a.inline-roll { + background: unset; + border-style: dashed; + border-width: 1px; +} - .journal-sheet.investigator { - .journal-page-header, - .journal-header { - display: none; - } - .journal-entry-pages { - margin: 0; - } - } +.react-target { + flex: 1; +} - button.investigator-secret-hide-reveal-button { - width: fit-content; - } +// .window-app, +// #sidebar, +// .main-controls li, +// .sub-controls li, +// #players, +// #hotbar > *, +// #navigation a, +// #navigation li { +// backdrop-filter: blur(10px); +// background-image: linear-gradient(to bottom, #000b 0%, #0006 100%); +// } - // foundry v12 adds "position: relative" to .directory-item, which breaks our - // absolutely-positioned combat tracker - .investigator-combatant-list .directory-item { - position: absolute; - } +hr { + width: calc(100% - 2em); +} - // foundry's default styles mean our compendium pack names get cut off - .compendium-sidebar .directory-item.compendium[data-pack*="investigator"] h3 { - // was 16px - font-size: 1em; - // was 80% - max-width: 100%; +.journal-sheet.investigator { + .journal-page-header, + .journal-header { + display: none; } - - // we add the .investigator CSS class in our JS sheet classes so we can pick - // out "our" apps from the others. We are specifically overriding `padding` - // here rather than doing a revert-layer (as below) because we probably want - // the rest of the styles to be applied. - .application.investigator .window-content { - padding: 0; + .journal-entry-pages { + margin: 0; } } +button.investigator-secret-hide-reveal-button { + width: fit-content; +} + +// foundry v12 adds "position: relative" to .directory-item, which breaks our +// absolutely-positioned combat tracker +.investigator-combatant-list .directory-item { + position: absolute; +} + +// foundry's default styles mean our compendium pack names get cut off +.compendium-sidebar .directory-item.compendium[data-pack*="investigator"] h3 { + // was 16px + font-size: 1em; + // was 80% + max-width: 100%; +} + +// we add the .investigator CSS class in our JS sheet classes so we can pick +// out "our" apps from the others. We are specifically overriding `padding` +// here rather than doing a revert-layer (as below) because we probably want +// the rest of the styles to be applied. +.application.investigator .window-content { + padding: 0; +} +// } + // the upside to taking control over layering is that we stick some // `revert-layer`s into lower layers when we want to nullify them @layer elements.typography { diff --git a/src/module/InvestigatorItemSheetV2Class.tsx b/src/module/InvestigatorItemSheetV2Class.tsx index d0e1db97d..30b481d64 100644 --- a/src/module/InvestigatorItemSheetV2Class.tsx +++ b/src/module/InvestigatorItemSheetV2Class.tsx @@ -35,7 +35,7 @@ class ItemSheetV2ClassBase extends ItemSheetV2 { } export const ItemSheetV2Class = ReactApplicationV2Mixin( - "ItemSheetV2Class", + "ItemSheetClassV2", ItemSheetV2ClassBase, render, ); diff --git a/src/module/NPCSheetClassV2.tsx b/src/module/NPCSheetClassV2.tsx index 6deb1f0c1..ad56efdac 100644 --- a/src/module/NPCSheetClassV2.tsx +++ b/src/module/NPCSheetClassV2.tsx @@ -2,9 +2,8 @@ import { ReactApplicationV2Mixin } from "@lumphammer/shared-fvtt-bits/src/ReactA import React from "react"; import { Suspense } from "../components/Suspense"; -import { InvestigatorActor } from "./InvestigatorActor"; -import DocumentSheetV2 = foundry.applications.api.DocumentSheetV2; +import ActorSheetV2 = foundry.applications.sheets.ActorSheetV2; const NPCSheet = React.lazy(() => import("../components/characters/NPCSheet").then(({ NPCSheet }) => ({ @@ -12,7 +11,7 @@ const NPCSheet = React.lazy(() => })), ); -class NPCSheetV2ClassBase extends DocumentSheetV2 { +class NPCSheetV2ClassBase extends ActorSheetV2 { static DEFAULT_OPTIONS = { window: { frame: true, @@ -34,7 +33,7 @@ const render = () => { }; export const NPCSheetClassV2 = ReactApplicationV2Mixin( - "NPCSheetClass", + "NPCSheetClassV2", NPCSheetV2ClassBase, render, ); diff --git a/src/startup/registerSheetsAndClasses.ts b/src/startup/registerSheetsAndClasses.ts index ee3c31918..05b9ffc90 100644 --- a/src/startup/registerSheetsAndClasses.ts +++ b/src/startup/registerSheetsAndClasses.ts @@ -5,13 +5,16 @@ import { InvestigatorCombatant } from "../module/InvestigatorCombatant"; import { InvestigatorCombatTracker } from "../module/InvestigatorCombatTracker"; import { InvestigatorItem } from "../module/InvestigatorItem"; import { ItemSheetClass } from "../module/InvestigatorItemSheetClass"; +// eslint-disable-next-line unused-imports/no-unused-imports import { ItemSheetV2Class } from "../module/InvestigatorItemSheetV2Class"; import { InvestigatorJournalSheet } from "../module/InvestigatorJournalSheet"; import { JournalEditorSheetClass } from "../module/JournalEditorSheetClass"; import { NPCSheetClass } from "../module/NPCSheetClass"; +// eslint-disable-next-line unused-imports/no-unused-imports import { NPCSheetClassV2 } from "../module/NPCSheetClassV2"; import { PartySheetClass } from "../module/PartySheetClass"; import { PCSheetClass } from "../module/PCSheetClass"; +// eslint-disable-next-line unused-imports/no-unused-imports import { PCSheetClassV2 } from "../module/PCSheetClassV2"; export const registerSheetsAndClasses = () => { CONFIG.Actor.documentClass = InvestigatorActor; @@ -27,18 +30,10 @@ export const registerSheetsAndClasses = () => { makeDefault: true, types: [constants.pc], }); - Actors.registerSheet(constants.systemId, PCSheetClassV2, { - makeDefault: false, - types: [constants.pc], - }); Actors.registerSheet(constants.systemId, NPCSheetClass, { makeDefault: true, types: [constants.npc], }); - Actors.registerSheet(constants.systemId, NPCSheetClassV2, { - makeDefault: false, - types: [constants.npc], - }); Actors.registerSheet(constants.systemId, PartySheetClass, { makeDefault: true, types: [constants.party], @@ -56,18 +51,6 @@ export const registerSheetsAndClasses = () => { constants.card, ], }); - Items.registerSheet(constants.systemId, ItemSheetV2Class, { - makeDefault: false, - types: [ - constants.weapon, - constants.equipment, - constants.investigativeAbility, - constants.generalAbility, - constants.mwItem, - constants.personalDetail, - constants.card, - ], - }); Journal.registerSheet("investigator", JournalEditorSheetClass, { types: ["base"], makeDefault: false, @@ -78,4 +61,27 @@ export const registerSheetsAndClasses = () => { makeDefault: false, label: "Investigator Journal Sheet", }); + + // V2 sheets + + // Items.registerSheet(constants.systemId, ItemSheetV2Class, { + // makeDefault: false, + // types: [ + // constants.weapon, + // constants.equipment, + // constants.investigativeAbility, + // constants.generalAbility, + // constants.mwItem, + // constants.personalDetail, + // constants.card, + // ], + // }); + // Actors.registerSheet(constants.systemId, NPCSheetClassV2, { + // makeDefault: false, + // types: [constants.npc], + // }); + // Actors.registerSheet(constants.systemId, PCSheetClassV2, { + // makeDefault: false, + // types: [constants.pc], + // }); };