diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f466b2..e95f927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# 1.5.2 + +Fixed close-button in Outlaws of Alkenstars premium module journals missing. + +Fixed hidden tokens showing chat portraits. + +Minor fixes to Narrator Tools and CGP compability. + +Changed the blending mode for colored chat headers, should look better for bright, saturated colors that people often use. + +Changed application header styling - it now reacts to what kind of sheet it is showing. + +Updates to dark PC/Familiar sheet, courtesy of @Vesselchuck. + # 1.5.1 Added settings for disabling the portraits-react-to-degree-of-success feature and the use-user-avatar-as-portrait-fallback feature. diff --git a/module.json b/module.json index a812d01..fa62771 100644 --- a/module.json +++ b/module.json @@ -4,12 +4,12 @@ "description": "Overhauls the Foundry UI and several modules.", "url": "https://github.com/Dorako/pf2e-dorako-ui", "author": "Dorako", - "version": "1.5.1", + "version": "1.5.2", "minimumCoreVersion": "9", "compatibleCoreVersion": "9", "system": ["pf2e"], "scripts": ["scripts/dorako-ui.js"], "templates": ["templates/*"], - "download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.5.1.zip", + "download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.5.2.zip", "manifest": "https://github.com/Dorako/pf2e-dorako-ui/raw/main/module.json" } diff --git a/scripts/dorako-ui.js b/scripts/dorako-ui.js index f4edaad..4f871ca 100644 --- a/scripts/dorako-ui.js +++ b/scripts/dorako-ui.js @@ -124,6 +124,10 @@ Hooks.on("renderCombatTracker", addScalingToCombatTrackerAvatars); // Chat cards Hooks.on("renderChatMessage", (chatMessage, html, messageData) => { + if (chatMessage.flags["narrator-tools"]) { + return; + } + let html0 = html[0]; // console.log("renderChatMessage Hook"); @@ -138,7 +142,14 @@ Hooks.on("renderChatMessage", (chatMessage, html, messageData) => { injectMessageTag(html, messageData); injectWhisperParticipants(html, messageData); injectAuthorName(html, messageData); - injectChatPortrait(html, getAvatar(chatMessage)); + + if ( + game.settings.get("pf2e-dorako-ui", "hidePortraitWhenHidden") && + chatMessage.getFlag("pf2e-dorako-ui", "wasTokenHidden") + ) { + } else { + injectChatPortrait(html, getAvatar(chatMessage)); + } moveFlavorTextToContents(html); const theme = game.settings.get("pf2e-dorako-ui", "theme"); @@ -160,8 +171,7 @@ Hooks.on("preCreateChatMessage", (message) => { addAvatarsToFlags(message); // Really should be adding all of them, so you can change the setting and it will apply retroactively message.data.update({ - "flags.pf2eDorakoUi.tokenScale": message?.token?.data?.scale, - "flags.pf2eDorakoUi.wasTokenHidden": message?.token?.data?.hidden, + "flags.pf2e-dorako-ui.wasTokenHidden": message?.token?.data?.hidden, }); }); @@ -247,15 +257,14 @@ function injectMessageTag(html, messageData) { whisperTargets[0] === messageData.message.user; const isRoll = messageData.message.roll !== undefined; - // Inject tag to the left of the timestamp if (isBlind) { rolltype.text("Secret"); messageMetadata.prepend(rolltype); } else if (isSelf && whisperTargets[0]) { - rolltype.text(game.i18n.localize("CHAT.RollSelf")); + rolltype.text("Self roll"); messageMetadata.prepend(rolltype); } else if (isRoll && isWhisper) { - rolltype.text(game.i18n.localize("CHAT.RollPrivate")); + rolltype.text("GM only"); messageMetadata.prepend(rolltype); } else if (isWhisper) { rolltype.text("Whisper"); @@ -369,7 +378,6 @@ function calcHeaderTextColor(html, message) { } function addAvatarsToFlags(message) { - // const main = game.settings.get("pf2e-dorako-ui", "insertSpeakerImage"); let combatantImg = game.modules.get("combat-tracker-images")?.active && message.actor ? message.actor.getFlag("combat-tracker-images", "trackerImage") @@ -399,26 +407,32 @@ function addAvatarsToFlags(message) { } message.data.update({ - "flags.pf2eDorakoUi.userAvatar": userAvatar, - "flags.pf2eDorakoUi.combatantAvatar": combatantAvatar, - "flags.pf2eDorakoUi.tokenAvatar": tokenAvatar, - "flags.pf2eDorakoUi.actorAvatar": actorAvatar, + "flags.pf2e-dorako-ui.userAvatar": userAvatar, + "flags.pf2e-dorako-ui.combatantAvatar": combatantAvatar, + "flags.pf2e-dorako-ui.tokenAvatar": tokenAvatar, + "flags.pf2e-dorako-ui.actorAvatar": actorAvatar, }); } function getAvatar(message) { const main = game.settings.get("pf2e-dorako-ui", "insertSpeakerImage"); - let combatantAvatar = message.data.flags?.pf2eDorakoUi?.combatantAvatar?.image - ? message.data.flags?.pf2eDorakoUi?.combatantAvatar - : null; - let tokenAvatar = message.data.flags?.pf2eDorakoUi?.tokenAvatar; - let actorAvatar = message.data.flags?.pf2eDorakoUi?.actorAvatar; + + let combatantAvatar = message.getFlag("pf2e-dorako-ui", "combatantAvatar"); + let tokenAvatar = message.getFlag("pf2e-dorako-ui", "tokenAvatar"); + let actorAvatar = message.getFlag("pf2e-dorako-ui", "actorAvatar"); let userAvatar = game.settings.get("pf2e-dorako-ui", "use-user-avatar") - ? message.data.flags?.pf2eDorakoUi?.userAvatar + ? message.getFlag("pf2e-dorako-ui", "userAvatar") : null; if (combatantAvatar) return combatantAvatar; + if ( + game.settings.get("pf2e-dorako-ui", "hidePortraitWhenHidden") && + message.getFlag("pf2e-dorako-ui", "wasTokenHidden") + ) { + return null; + } + return main == "token" ? tokenAvatar || actorAvatar || userAvatar : actorAvatar || tokenAvatar || userAvatar; @@ -438,7 +452,6 @@ Hooks.on("renderChatMessage", (message, b) => { "small-creature-token-portrait-size" ); let smallCorrection = avatar.isSmall ? 1.25 * smallScale : 1; - message.data.flags?.pf2eDorakoUi?.combatantAvatar?.image; avatarElem?.setAttribute( "style", "transform: scale(" + avatar.scale * smallCorrection + ")" @@ -617,7 +630,7 @@ Hooks.once("init", async () => { hint: "Configure user avatars by right-clicking users in the lower left area of Foundry.", scope: "world", type: Boolean, - default: true, + default: false, config: true, onChange: () => { debouncedReload(); @@ -629,7 +642,7 @@ Hooks.once("init", async () => { hint: "Disable if your token art is fancy.", scope: "client", config: true, - default: true, + default: false, type: Boolean, onChange: () => { debouncedReload(); @@ -795,7 +808,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-chat", { name: "Theme chat?", hint: "Applies theming to chat cards and sidebar content.", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -807,7 +820,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-navigation", { name: "Theme scene navigation?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -819,7 +832,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-hotbar", { name: "Theme the hotbar (macro bar)?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -831,7 +844,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-controls", { name: "Theme scene controls?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -843,7 +856,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-token-hud", { name: "Theme the token HUD?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -855,7 +868,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-effect-panel", { name: "Theme the effect panel?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -867,7 +880,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-sidebar", { name: "Theme the sidebar?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -879,7 +892,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-app-ui", { name: "Theme app UI?", hint: "This includes the player box, window headers, and similar", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -891,7 +904,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-combat-tracker", { name: "Theme the combat tracker?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -903,7 +916,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-custom-hotbar", { name: "Theme Custom Hotbar module?", hint: "Set the 'core hotbar' to 1px 1px offset in Custom Hotbar settings.", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -915,7 +928,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-token-action-hud", { name: "Theme Token Action HUD?", hint: "Makes TAH more compact and fits in better with the rest of the UI.", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -927,7 +940,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-window-controls", { name: "Theme Window Controls module?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -939,7 +952,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-combat-carousel", { name: "Theme Combat Carousel?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, @@ -951,7 +964,7 @@ Hooks.once("init", async () => { game.settings.register("pf2e-dorako-ui", "skin-dice-tray", { name: "Theme Dice Tray module?", hint: "", - scope: "client", + scope: "World", type: Boolean, default: true, config: true, diff --git a/styles/app-ui.css b/styles/app-ui.css index 9016420..58bee4a 100644 --- a/styles/app-ui.css +++ b/styles/app-ui.css @@ -26,7 +26,7 @@ background-color: var(--dorako-bg-current); backdrop-filter: var(--dorako-vibrancy); /*will-change: backdrop-filter;*/ - transform: translate3d(0px, 0px, 0px); + /* transform: translate3d(0px, 0px, 0px); */ box-shadow: var(--glassy); } @@ -59,7 +59,7 @@ .window-app .window-content { /* box-shadow: 0px 0px 10px black; */ - box-shadow: var(--glassy); + /* box-shadow: var(--glassy); */ background: none; background-color: var(--bg); background-image: var(--pf2e-sheets-bg); @@ -429,4 +429,51 @@ .window-app.story-sheet .window-header { box-shadow: none; background-color: transparent; + } + + + .window-app .window-content { + box-shadow: var(--gold-and-glow) + } + + .app.window-app { + box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.5), var(--gold-and-glow); + } + + .app.window-app .window-header { + box-shadow: var(--gold-and-glow); + transition: border-radius 0.25s; + } + + .app.window-app.hazard .window-header { + background-color: #1C3531 + } + + .app.window-app.character .window-header { + background-color: #5D0E08 + } + + .app.window-app.npc .window-header { + background-color: #422d01 + } + + + /* .app.window-app.minimized { + box-shadow: var(--glassy); + } */ + + .app.window-app.minimized .header { + box-shadow: none; + transition: border-radius 0.25s; + } + + .dice-checks .window-content { + box-shadow: none; + } + + .directory .directory-list .directory-item img { + box-shadow: var(--gold-and-glow), 0px 2px 10px rgba(0, 0, 0, 0.5); + margin: 3px; + border-radius: 5px; + background-color: var(--alt); } \ No newline at end of file diff --git a/styles/chat.css b/styles/chat.css index 6fbd8b0..0a22e4d 100644 --- a/styles/chat.css +++ b/styles/chat.css @@ -1445,13 +1445,13 @@ div#scrollToBottom:hover { } .message .message-header.dark-text { - background-blend-mode: luminosity; + background-blend-mode: multiply; } .message .message-header.dark-header-text { color: black; text-shadow: var(--pf2e-shadow-is-light); - background-blend-mode: luminosity; + background-blend-mode: multiply; } .message .message-header.light-header-text { @@ -1614,6 +1614,7 @@ i[data-pf2-repost] { font-size: small; } +span[data-pf2-effect-area].with-repost, span[data-pf2-check].with-repost { border-right: 1px solid var(--color-border-dark-tertiary); padding: .2em; @@ -1642,4 +1643,9 @@ span[data-pf2-check].with-repost { height: 1.2em; border-radius: 3px; box-shadow: var(--gold-and-glow) +} + +#chat-log .message.narrator-description, +#chat-log .message.narrator-narrative { + border: none; } \ No newline at end of file diff --git a/styles/dorako-ui.css b/styles/dorako-ui.css index 7322b2e..9b4f372 100644 --- a/styles/dorako-ui.css +++ b/styles/dorako-ui.css @@ -75,9 +75,9 @@ form button:focus { transition: background-color 0.1s ease-in-out, box-shadow 0.2s ease-in-out; } -body { +/* body { text-rendering: geometricPrecision; -} +} */ diff --git a/styles/sidebar.css b/styles/sidebar.css index fb66c3a..6516f78 100644 --- a/styles/sidebar.css +++ b/styles/sidebar.css @@ -245,6 +245,11 @@ nav.damage-log-nav.tabs { padding: 0px; } +/* #cgmp-typing-notify.hidden>* { display: none; +} */ + +#sidebar #chat { + overflow: hidden; } \ No newline at end of file diff --git a/templates/base-chat-message.html b/templates/base-chat-message.html deleted file mode 100644 index 79f9040..0000000 --- a/templates/base-chat-message.html +++ /dev/null @@ -1,55 +0,0 @@ -
  • - {{!-- {{#if (showHeader message)}} --}} - {{#if (isUsingHeaderTint message)}} -
    - {{else}} -
    - {{/if}} - {{!-- {{#if (showSpeakerImage message)}} -
    -
    - {{#if (isTokenPortrait message)}} - - {{else}} - - {{/if}} -
    - -
    -

    {{alias}}

    -
    -
    - {{else}} -
    -

    {{alias}}

    -
    - {{/if}} --}} - - {{!--
    --}} -

    {{alias}}

    - {{!--
    --}} - - -
    - {{!-- {{/if}} --}} - - {{#if isWhisper}} -
    {{localize 'CHAT.To'}}: {{whisperTo}}
    - {{/if}} - -
    - {{#if message.flavor}} - {{{message.flavor}}} - {{/if}} - {{{message.content}}} -
    -