Skip to content

Commit

Permalink
1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Jan 29, 2023
1 parent babd9c9 commit 25c6ac1
Show file tree
Hide file tree
Showing 17 changed files with 148 additions and 40 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 1.11.2

- (Fix) Made the TAH-nag actually go away forever if you tell it to
- (Fix) Limited scope of styling to avoid affecting prose-mirror dropdowns, to resolve an issue where the dropdowns because illegible on hover
- (New) Loot sheet now has dark theme compatibility
- (Fix) Maybe fixed migrations, we'll see
- (Fix) Made sure the module doesn't overwrite the background used in journals of the Abomination Vaults premium module v2
- (Maintenance) Extended the styling to affect the system version of persistent damage, not just the module version

# 1.11.1

- (Fix) Resolved an issue that caused scrollbars to appear on small dialogs
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"flags": {}
}
],
"version": "1.11.1",
"version": "1.11.2",
"compatibility": {
"minimum": "10",
"verified": "10"
Expand Down Expand Up @@ -66,6 +66,6 @@
"modules/message-hooks.js",
"modules/consts.js"
],
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.11.1.zip",
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.11.2.zip",
"manifest": "https://github.com/Dorako/pf2e-dorako-ui/releases/latest/download/module.json"
}
2 changes: 1 addition & 1 deletion modules/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const baseThemeCoreFoundryApplications = ["ImagePopout","ChatMessage","Sc
// prettier-ignore
export const baseThemePf2eApplications = ["HotbarPF2e", "EffectsPanel", "SceneDarknessAdjuster"]; // "JournalSheetPF2e",
// prettier-ignore
export const baseThemePf2eSheets = ["ItemSheet","ActorSheet"]; //"FamiliarSheetPF2e","HazardSheetPF2e"
export const baseThemePf2eSheets = ["ItemSheet","ActorSheet","LootSheetPF2e"]; //"FamiliarSheetPF2e","HazardSheetPF2e"
// prettier-ignore
export const baseThemeModuleApplications = ["CommonToolbar","MonksHotbarExpansion","CustomHotbar", "TokenActionHUD"]

Expand Down
2 changes: 1 addition & 1 deletion modules/dark-theme-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for (const app of ["Application", ...baseThemePf2eSheets]) {
if (darkThemeIncompatibleApplications.includes(app?.constructor?.name)) return;
let html0 = html[0];
if (!html0.classList.contains("app")) return;
debug(`render${app.constructor.name}) | theme: ${degree}`);
debug(`render${app.constructor.name}) | theme: ${theme}`);
html0.classList.add("dorako-ui");
html0.classList.add("dark-theme");
});
Expand Down
36 changes: 20 additions & 16 deletions modules/settings/migrations.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { MODULE_NAME } from "../consts.js";
import { debug } from "../util.js";
import { debug, getSetting, setSetting } from "../util.js";

let oldSettings;
export default async function migrate() {
const oldWorldSettings = game.settings.storage.get("world").filter((setting) => setting.key.includes(MODULE_NAME));
const oldClientSettings = game.settings.storage.get("client").filter((setting) => setting.key.includes(MODULE_NAME));
const oldClientSettings = Object.keys(game.settings.storage.get("client")).filter((setting) =>
setting.includes(MODULE_NAME)
);

oldSettings = [...oldWorldSettings, ...oldClientSettings];

Expand All @@ -31,27 +33,29 @@ function findOldSettingValue(oldSettingKey) {
const migrations = {
"1.11.1": async () => {
// Migrate dark-theme degree -> application-theme
if (findOldSettingValue("theme.dark-theme-degree")) {
if (getSetting("theme.dark-theme-degree") === "supported" || getSetting("theme.dark-theme-degree") === "extended")
const oldDarkThemeDegree = findOldSettingValue("theme.dark-theme-degree");
if (oldDarkThemeDegree) {
if (oldDarkThemeDegree === "supported" || oldDarkThemeDegree === "extended")
await setSetting("theme.application-theme", "dark-theme");
if (getSetting("theme.dark-theme-degree") === "none") await setSetting("theme.application-theme", "light-theme");
if (oldDarkThemeDegree === "none") await setSetting("theme.application-theme", "light-theme");
}

// Migrate individual dark theme sheets -> application-theme
if (findOldSettingValue("theme.pc-sheet-theme")) {
if (getSetting("theme.pc-sheet-theme") === "dark-theme")
await setSetting("theme.application-theme", "dark-theme");
const oldPcSheetTheme = findOldSettingValue("theme.pc-sheet-theme");
if (oldPcSheetTheme) {
if (oldPcSheetTheme === "dark-theme") await setSetting("theme.application-theme", "dark-theme");
}
if (findOldSettingValue("theme.npc-sheet-theme")) {
if (getSetting("theme.npc-sheet-theme") === "dark-theme")
await setSetting("theme.application-theme", "dark-theme");
const oldNpcSheetTheme = findOldSettingValue("theme.npc-sheet-theme");
if (oldNpcSheetTheme) {
if (oldNpcSheetTheme === "dark-theme") await setSetting("theme.application-theme", "dark-theme");
}
if (findOldSettingValue("theme.loot-sheet-theme")) {
if (getSetting("theme.loot-sheet-theme") === "dark-theme")
await setSetting("theme.application-theme", "dark-theme");
const oldLootSheetTheme = findOldSettingValue("theme.loot-sheet-theme");
if (oldLootSheetTheme) {
if (oldLootSheetTheme === "dark-theme") await setSetting("theme.application-theme", "dark-theme");
}
if (findOldSettingValue("theme.familiar-sheet-theme")) {
if (getSetting("theme.loot-sheet-theme") === "dark" || getSetting("theme.loot-sheet-theme") === "darkRedHeader")
const oldFamiliarSheetTheme = findOldSettingValue("theme.familiar-sheet-theme");
if (oldFamiliarSheetTheme) {
if (oldFamiliarSheetTheme === "dark" || oldFamiliarSheetTheme === "darkRedHeader")
await setSetting("theme.application-theme", "dark-theme");
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Hooks.once("init", async () => {
type: Boolean,
});

game.settings.register("pf2e-dorako-ui", "tah-nag", {
game.settings.register("pf2e-dorako-ui", "migration-version", {
scope: "world",
config: false,
default: "0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions sass/_actor-sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
gap: 3px;
}

&.actor.sheet .inventory .list-row .item-controls .item-control.item-carry-type {
&.actor.sheet .inventory .list-row .item-controls .item-control.item-carry-type:not(.active) {
color: var(--half-transparent);
}

Expand Down Expand Up @@ -158,7 +158,7 @@
}

// Blue PC

// &.actor.sheet .crb-style {
// background-image: var(--header), var(--sheet);
// }
Expand Down
23 changes: 15 additions & 8 deletions sass/_app-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,22 @@
}
}

.dorako-ui.app.journal-entry .window-content {
box-shadow: none;
margin: 0px;
background: none;
.dorako-ui.app.journal-entry {
.window-content {
box-shadow: none;
margin: 0px;
background: none;

.journal-entry-content {
@include sheet;
margin-left: 4px;
height: calc(100% - 4px);
}
}

.journal-entry-content {
@include sheet;
margin-left: 4px;
height: calc(100% - 4px);
&.pf2e-av .journal-entry-content.flexcol {
color: black;
background: url(../../../modules/pf2e-abomination-vaults/styles/assets/parchment-av.jpg) repeat;
}
}

Expand Down
1 change: 1 addition & 0 deletions sass/_application-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
color: var(--color-text-light-heading);

&:hover {
@include glass; // re-included glass to set potential borders to none etc.
background-color: var(--primary);
color: var(--color-text-light-highlight);
box-shadow: var(--glassy); // Overrides prosemirror, possibly other stuff
Expand Down
2 changes: 1 addition & 1 deletion sass/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
}

.dorako-ui form button {
.dorako-ui form button:not(.pm-dropdown) {
@include quick-transition;
border: 1px solid var(--color-border-light-primary);

Expand Down
18 changes: 18 additions & 0 deletions sass/_messages-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@
}
}

.persistent-damage-recovery {
hr {
display: none;
}

button {
@include glass;
@include quick-transition;
color: var(--color-text-light-heading);
text-shadow: 0px 0px 3px black;
margin-top: 5px;
&:hover {
background-color: var(--primary);
color: var(--color-text-light-highlight);
}
}
}

.table-draw {
.table-description {
color: var(--color-text-light-highlight);
Expand Down
20 changes: 20 additions & 0 deletions sass/_messages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,26 @@
}
}

.persistent-damage-recovery {
hr {
display: none;
}

button {
// @include glass;
// @include quick-transition;
// color: var(--color-text-light-heading);
// text-shadow: 0px 0px 3px black;
margin-top: 3px;
&:hover {
text-shadow: 0px 0px 3px black;
background-color: var(--primary-light);
color: white;
box-shadow: 0px 0px 1px 1px var(--tertiary) inset, 0px 0px 5px var(--primary);
}
}
}

.message-content {
margin-top: 5px;

Expand Down
8 changes: 7 additions & 1 deletion sass/module-support.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ wrapper.pf2e-td.name-top .pf2e-td.name {
width: 100%;
}

.dorako-ui.chat-message {
hr.pf2e-td {
display: none !important; // inline style overwrite
}
}

.dorako-ui.dark-theme.chat-message {
hr.pf2e-td {
display: none !important; // inline style overwrite
Expand Down Expand Up @@ -764,7 +770,7 @@ nav.damage-log-nav.tabs {
/* ----------------------------------------- */

#chat-log .message.round-marker {
border-bottom: 1px solid var(--tertiary);
border-bottom: 1px solid var(--tertiary) !important; // is 'important' in source
}

#darkness-progress > div > div {
Expand Down
47 changes: 43 additions & 4 deletions styles/dorako-ui.css

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

Loading

0 comments on commit 25c6ac1

Please sign in to comment.