diff --git a/src/module/applications/compendium-browser.js b/src/module/applications/compendium-browser.js index 672b1fd..afc92f1 100644 --- a/src/module/applications/compendium-browser.js +++ b/src/module/applications/compendium-browser.js @@ -38,7 +38,7 @@ export class CompendiumBrowserVueApplication extends Application { template: "modules/compendium-browser/templates/vue-compendium-browser.html", id: "compendium-browser", title: game.i18n.localize("CMPBrowser.compendiumBrowser"), - width: 800, + width: 600, height: 730, resizable: true, }; diff --git a/src/module/compendium-browser.js b/src/module/compendium-browser.js index 58a8959..399421d 100644 --- a/src/module/compendium-browser.js +++ b/src/module/compendium-browser.js @@ -1570,20 +1570,12 @@ class CompendiumBrowser extends Application { Hooks.once("init", () => { game.compendiumBrowser = new CompendiumBrowser(); -}); - -// @todo hooks are never async. -Hooks.once("init", async () => { - await preloadTemplates(); + preloadTemplates(); }); Hooks.once("setup", () => { registerSettings(); -}); - -// @todo hooks are never async. -Hooks.once("setup", async () => { - await game.compendiumBrowser.setup(); + game.compendiumBrowser.setup(); }); /* ---------------------------------------------- */ diff --git a/src/styles/compendium-browser.less b/src/styles/compendium-browser.less index 63eeb02..cc1b406 100644 --- a/src/styles/compendium-browser.less +++ b/src/styles/compendium-browser.less @@ -16,7 +16,7 @@ overflow-y: hidden !important; max-width: 1100px; max-height: 90vh; - min-width: 630px; + min-width: 600px; min-height: 500px; .window-content { overflow-y: hidden !important; @@ -61,12 +61,7 @@ } .control-area { position: sticky; - display: block; - min-width: 250px; - max-width: 45%; - width: 350px; height: 100%; - padding-right: 5px; overflow: auto; button { background: rgba(0, 0, 0, 0.05); @@ -132,12 +127,8 @@ } .list-area { position: sticky; - display: flex; - min-width: 250px; - max-width: 55%; - width: 400px; height: 100%; - padding-right: 5px; + flex: 2; .loading { flex: 0; text-align: center; @@ -322,21 +313,19 @@ .npc-line { line-height: 25px; padding: 9px 0 5px 5px; - } - .npc-name { - font-weight: bold; - font-size: 16px; - } - .cr { - display: inline-block; - width: 55px; - } - .size { - display: inline-block; - width: 75px; - } - .type { - display: inline-block; + + .npc-name { + font-weight: bold; + font-size: 16px; + } + .npc-tags { + .bold { + font-weight: bold; + } + .details { + flex: 2; + } + } } } } diff --git a/src/vue/components/dialogs/compendium-browser/CompendiumBrowserCreatures.vue b/src/vue/components/dialogs/compendium-browser/CompendiumBrowserCreatures.vue index da7ae51..e090551 100644 --- a/src/vue/components/dialogs/compendium-browser/CompendiumBrowserCreatures.vue +++ b/src/vue/components/dialogs/compendium-browser/CompendiumBrowserCreatures.vue @@ -90,13 +90,18 @@
- {{ entry.name }} + [{{ game.dnd5e.utils.formatCR(entry.system.details.cr) }}] {{ entry.name }}
-
- {{ game.dnd5e.utils.formatCR(entry.system.details.cr) }} - {{ CONFIG.DND5E.actorSizes?.[entry.system.traits.size].label ?? entry.system.traits.size }} - {{ CONFIG.DND5E.creatureTypes?.[entry.system.details.type.value]?.label ?? entry.system.details.type.value }} +
+
+ + HP: {{ entry.system.attributes.hp.max }} + AC: {{ entry.system.attributes.ac.flat }} +
+
+ {{ CONFIG.DND5E.actorSizes?.[entry.system.traits.size].label ?? entry.system.traits.size }} {{ CONFIG.DND5E.creatureTypes?.[entry.system.details.type.value]?.label ?? entry.system.details.type.value }} +