diff --git a/compendium-browser.css b/compendium-browser.css index 3923145..d1a9f07 100644 --- a/compendium-browser.css +++ b/compendium-browser.css @@ -31,6 +31,7 @@ } .compendium-browser .window-content .parent .content .tab .browser ul { overflow-y: auto; + overflow-x: hidden; height: 100%; } .compendium-browser .window-content .parent .content .tab .settings { @@ -57,7 +58,7 @@ width: 350px; height: 100%; padding-right: 5px; - overflow: scroll; + overflow: auto; } .compendium-browser .list-area { position: sticky; @@ -67,7 +68,10 @@ width: 400px; height: 100%; padding-right: 5px; - overflow-y: scroll; +} +.compendium-browser .list-area .loading { + flex: 0; + text-align: center; } .compendium-browser .control-area button { background: rgba(0, 0, 0, 0.05); diff --git a/compendium-browser.js b/compendium-browser.js index 0653e5a..ca79667 100644 --- a/compendium-browser.js +++ b/compendium-browser.js @@ -3,18 +3,15 @@ const NOT_MIGRATED = "NotMigratedException"; class CompendiumBrowser extends Application { static get defaultOptions() { - const options = super.defaultOptions; - mergeObject(options, { + return mergeObject(super.defaultOptions, { title: "CMPBrowser.compendiumBrowser", tabs: [{ navSelector: ".tabs", contentSelector: ".content", initial: "spell" }], - classes: options.classes.concat("compendium-browser"), + classes: ["compendium-browser"], template: "modules/compendium-browser/template/template.html", width: 800, - height: 700, + height: 730, resizable: true, - minimizable: true, }); - return options; } get maxLoad() { diff --git a/lang/en.json b/lang/en.json index 6af2b6c..fdc9e59 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,60 +1,75 @@ { - "CMPBrowser.compendiumBrowser": "Compendium Browser", - "CMPBrowser.sortBy": "Sort by", - "CMPBrowser.generalSettings": "General Settings", - "CMPBrowser.allowSpellAcc": "Allow Players Access to the spell browser", - "CMPBrowser.allowFeatAcc": "Allow Players Access to the feat browser", - "CMPBrowser.allowItemAcc": "Allow Players Access to the item browser", - "CMPBrowser.allowNpcAcc": "Allow Players Access to the npc browser", - "CMPBrowser.compSettingsSpell": "Item Compendium Settings", - "CMPBrowser.compSettingsNpc": "NPC Compendium Settings", - "CMPBrowser.load": "Load", - "CMPBrowser.castingTime": "Casting Time", - "CMPBrowser.spellType": "Spell Type", - "CMPBrowser.damageType": "Damage Type", - "CMPBrowser.UsesResources": "Uses Resources", - "CMPBrowser.GameMechanics": "Game Mechanics", - "CMPBrowser.ItemSubtype": "Item Subtype", - "CMPBrowser.MagicItems": "Magic Items", - "CMPBrowser.ItemsPacks": "Packs", - "CMPBrowser.ItemsPacksBurglar": "Burglar's Pack", - "CMPBrowser.ItemsPacksDiplomat": "Diplomat's Pack", - "CMPBrowser.ItemsPacksDungeoneer": "Dungeoneer's Pack", - "CMPBrowser.ItemsPacksEntertainer": "Entertainer's Pack", - "CMPBrowser.ItemsPacksExplorer": "Explorer's Pack", - "CMPBrowser.ItemsPacksMonsterHunter": "Monster Hunter's Pack", - "CMPBrowser.ItemsPacksPriest": "Priest's Pack", - "CMPBrowser.ItemsPacksScholar": "Scholar's Pack", - "CMPBrowser.artificer": "Artificer", - "CMPBrowser.barbarian": "Barbarian", - "CMPBrowser.bard": "Bard", - "CMPBrowser.cleric": "Cleric", - "CMPBrowser.druid": "Druid", - "CMPBrowser.fighter": "Fighter", - "CMPBrowser.monk": "Monk", - "CMPBrowser.paladin": "Paladin", - "CMPBrowser.ranger": "Ranger", - "CMPBrowser.rogue": "Rogue", - "CMPBrowser.sorcerer": "Sorcerer", - "CMPBrowser.warlock": "Warlock", - "CMPBrowser.wizard": "Wizard", - "CMPBrowser.general": "General", - "CMPBrowser.overall": "Overall Type", - "CMPBrowser.subfeature": "Subfeature Type", - "CMPBrowser.hasSpells": "Has Spells", - "CMPBrowser.hasLegAct": "Has Legendary Actions", - "CMPBrowser.hasLegRes": "Has Legendary Resistance", - "CMPBrowser.dmgInteraction": "Damage Interaction", - "CMPBrowser.dmgDealt": "Damage Dealt", - "CMPBrowser.Tab.SpellBrowser": "Spell Browser", - "CMPBrowser.Tab.FeatBrowser": "Feat Browser", - "CMPBrowser.Tab.ItemBrowser": "Item Browser", - "CMPBrowser.Tab.NPCBrowser": "NPC Browser", - "CMPBrowser.Tab.Settings": "Settings", - "CMPBrowser.SETTING.Maxload.NAME": "Maximum load", - "CMPBrowser.SETTING.Maxload.HINT": "Maximum number of spells, feats, items, or NPCs to display; to see more use the filters. This setting is to allow manageing memory and server load.", - "CMPBrowser.LOADING.Message": "Loading...{numLoaded} {itemType}s", - "CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s", - "CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)", - "CMPBrowser.Filters.ResetFilters": "Reset Filters" + "CMPBrowser": { + "compendiumBrowser": "Compendium Browser", + "sortBy": "Sort by", + "generalSettings": "General Settings", + "allowSpellAcc": "Allow Players Access to the spell browser", + "allowFeatAcc": "Allow Players Access to the feat browser", + "allowItemAcc": "Allow Players Access to the item browser", + "allowNpcAcc": "Allow Players Access to the npc browser", + "compSettingsSpell": "Item Compendium Settings", + "compSettingsNpc": "NPC Compendium Settings", + "load": "Load", + "castingTime": "Casting Time", + "spellType": "Spell Type", + "damageType": "Damage Type", + "UsesResources": "Uses Resources", + "GameMechanics": "Game Mechanics", + "ItemSubtype": "Item Subtype", + "MagicItems": "Magic Items", + "ItemsPacks": "Packs", + "ItemsPacksBurglar": "Burglar's Pack", + "ItemsPacksDiplomat": "Diplomat's Pack", + "ItemsPacksDungeoneer": "Dungeoneer's Pack", + "ItemsPacksEntertainer": "Entertainer's Pack", + "ItemsPacksExplorer": "Explorer's Pack", + "ItemsPacksMonsterHunter": "Monster Hunter's Pack", + "ItemsPacksPriest": "Priest's Pack", + "ItemsPacksScholar": "Scholar's Pack", + "artificer": "Artificer", + "barbarian": "Barbarian", + "bard": "Bard", + "cleric": "Cleric", + "druid": "Druid", + "fighter": "Fighter", + "monk": "Monk", + "paladin": "Paladin", + "ranger": "Ranger", + "rogue": "Rogue", + "sorcerer": "Sorcerer", + "warlock": "Warlock", + "wizard": "Wizard", + "general": "General", + "overall": "Overall Type", + "subfeature": "Subfeature Type", + "hasSpells": "Has Spells", + "hasLegAct": "Has Legendary Actions", + "hasLegRes": "Has Legendary Resistance", + "dmgInteraction": "Damage Interaction", + "dmgDealt": "Damage Dealt", + "Tab": { + "SpellBrowser": "Spell Browser", + "FeatBrowser": "Feat Browser", + "ItemBrowser": "Item Browser", + "NPCBrowser": "NPC Browser", + "Settings": "Settings" + }, + "SETTING": { + "Maxload.NAME": "Maximum load", + "Maxload.HINT": "Maximum number of spells, feats, items, or NPCs to display; to see more use the filters. This setting is to allow manageing memory and server load." + }, + "LOADING": { + "Message": "Loading...{numLoaded} {itemType}s" + }, + "LOADED": { + "Message": { + "feat": "Loaded {numLoaded} feats", + "item": "Loaded {numLoaded} items", + "npc": "Loaded {numLoaded} npcs", + "spell": "Loaded {numLoaded} spells" + }, + "MaxLoaded": "(maximum displayed; to see more, use the filters)" + }, + "Filters.ResetFilters": "Reset Filters" + } } diff --git a/template/feat-browser.html b/template/feat-browser.html index b95c166..9b58b21 100644 --- a/template/feat-browser.html +++ b/template/feat-browser.html @@ -2,8 +2,15 @@
- +
{{localize "CMPBrowser.sortBy"}}:
@@ -20,9 +27,9 @@ {{> "modules/compendium-browser/template/filter-container.html" filters=featFilters}}
- +
diff --git a/template/item-browser.html b/template/item-browser.html index c2efd98..70f67a7 100644 --- a/template/item-browser.html +++ b/template/item-browser.html @@ -2,8 +2,15 @@
- +
{{localize "CMPBrowser.sortBy"}}:
@@ -20,9 +27,9 @@ {{> "modules/compendium-browser/template/filter-container.html" filters=itemFilters}}
- +
diff --git a/template/loading.html b/template/loading.html index 3ffe1af..eddb985 100644 --- a/template/loading.html +++ b/template/loading.html @@ -1,13 +1,15 @@ - +/> --> - {{#if doneLoading}} {{localize "CMPBrowser.LOADED.Message" numLoaded=numLoaded itemType=itemType}} {{else}} - {{localize "CMPBrowser.LOADING.Message" numLoaded=numLoaded itemType=itemType}} {{/if}} {{#if maxLoaded}}{{localize - "CMPBrowser.LOADED.MaxLoaded"}}{{/if}} + {{#if doneLoading}} {{localize (concat "CMPBrowser.LOADED.Message." itemType) numLoaded=numLoaded}} + + {{else}} {{localize "CMPBrowser.LOADING.Message" numLoaded=numLoaded itemType=itemType}} {{/if}} + + {{#if maxLoaded}}{{localize "CMPBrowser.LOADED.MaxLoaded"}}{{/if}} diff --git a/template/npc-browser.html b/template/npc-browser.html index c05d51a..61eba1e 100644 --- a/template/npc-browser.html +++ b/template/npc-browser.html @@ -2,8 +2,15 @@
- +
{{localize "CMPBrowser.sortBy"}}:
@@ -21,9 +28,9 @@ {{> "modules/compendium-browser/template/filter-container.html" filters=npcFilters}}
- +
diff --git a/template/spell-browser.html b/template/spell-browser.html index 533538a..595e992 100644 --- a/template/spell-browser.html +++ b/template/spell-browser.html @@ -1,32 +1,35 @@
-
-
-
- -
-
-
{{localize "CMPBrowser.sortBy"}}:
-
- -
-
- - -
- {{> "modules/compendium-browser/template/filter-container.html" - filters=spellFilters}} -
-
- - -
+
+
+
+ +
+
+
{{localize "CMPBrowser.sortBy"}}:
+
+ +
+
+ + +
+ {{> "modules/compendium-browser/template/filter-container.html" filters=spellFilters}} +
+
+ + +