parent
16846df323
commit
d0a9c4d369
|
@ -171,6 +171,7 @@
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
border: none;
|
border: none;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
.compendium-browser .npc-browser .npc .npc-line {
|
.compendium-browser .npc-browser .npc .npc-line {
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Felix Müller aka syl3r86
|
* @author Felix Müller aka syl3r86
|
||||||
* @version 0.1.4
|
* @version 0.1.5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SpellBrowser extends Application {
|
class SpellBrowser extends Application {
|
||||||
|
@ -47,14 +47,14 @@ class SpellBrowser extends Application {
|
||||||
options.height = 700;
|
options.height = 700;
|
||||||
options.resizable = true;
|
options.resizable = true;
|
||||||
options.minimizable = true;
|
options.minimizable = true;
|
||||||
options.title = game.i18n.localize("Compendium Browser");
|
options.title = "Compendium Browser";
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
hookCompendiumList() {
|
hookCompendiumList() {
|
||||||
Hooks.on('renderCompendiumDirectory', (app, html, data) => {
|
Hooks.on('renderCompendiumDirectory', (app, html, data) => {
|
||||||
if (game.user.isGM || this.settings.allowSpellBrowser || this.settings.allowNpcBrowser) {
|
if (game.user.isGM || this.settings.allowSpellBrowser || this.settings.allowNpcBrowser) {
|
||||||
const importButton = $(`<button class="compendium-browser-btn"><i class="fas fa-fire"></i> ${game.i18n.localize("Compendium Browser")}</button>`);
|
const importButton = $(`<button class="compendium-browser-btn"><i class="fas fa-fire"></i> ${game.i18n.localize("CMPBrowser.compendiumBrowser")}</button>`);
|
||||||
html.find('.compendium-browser-btn').remove();
|
html.find('.compendium-browser-btn').remove();
|
||||||
|
|
||||||
// adding to directory-list since the footer doesn't exist if the user is not gm
|
// adding to directory-list since the footer doesn't exist if the user is not gm
|
||||||
|
@ -210,6 +210,10 @@ class SpellBrowser extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
|
// localizing title
|
||||||
|
$(html).parents('.app').find('.window-title')[0].innerText = game.i18n.localize("CMPBrowser.compendiumBrowser");
|
||||||
|
|
||||||
|
|
||||||
// activating tabs/*
|
// activating tabs/*
|
||||||
let nav = $('.tabs[data-group="toplvl"]');
|
let nav = $('.tabs[data-group="toplvl"]');
|
||||||
new Tabs(nav, {
|
new Tabs(nav, {
|
||||||
|
|
|
@ -198,6 +198,7 @@
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
border: none;
|
border: none;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.npc-line {
|
.npc-line {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"CMPBrowser.compendiumBrowser":"Compendium Browser",
|
||||||
"CMPBrowser.sortBy":"Sort by",
|
"CMPBrowser.sortBy":"Sort by",
|
||||||
"CMPBrowser.cr":"Challenge Rating",
|
"CMPBrowser.cr":"Challenge Rating",
|
||||||
"CMPBrowser.generalSettings":"General Settings",
|
"CMPBrowser.generalSettings":"General Settings",
|
||||||
|
@ -51,6 +52,5 @@
|
||||||
"CMPBrowser.abilities": "Abilities",
|
"CMPBrowser.abilities": "Abilities",
|
||||||
"CMPBrowser.dmgInteraction": "Damage Interaction",
|
"CMPBrowser.dmgInteraction": "Damage Interaction",
|
||||||
"CMPBrowser.dmgDealt": "Damage Dealt",
|
"CMPBrowser.dmgDealt": "Damage Dealt",
|
||||||
"CMPBrowser.size": "Size",
|
"CMPBrowser.size": "Size"
|
||||||
"CMPBrowser.cmpBrowser": "Compendium Browser"
|
|
||||||
}
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"CMPBrowser.compendiumBrowser":"辞典ブラウザ",
|
||||||
"CMPBrowser.sortBy":"並び替え",
|
"CMPBrowser.sortBy":"並び替え",
|
||||||
"CMPBrowser.cr":"難易度",
|
"CMPBrowser.cr":"難易度",
|
||||||
"CMPBrowser.generalSettings":"一般設定",
|
"CMPBrowser.generalSettings":"一般設定",
|
||||||
|
@ -51,7 +52,5 @@
|
||||||
"CMPBrowser.abilities": "能力値",
|
"CMPBrowser.abilities": "能力値",
|
||||||
"CMPBrowser.dmgInteraction": "ダメージ関連",
|
"CMPBrowser.dmgInteraction": "ダメージ関連",
|
||||||
"CMPBrowser.dmgDealt": "与えるダメージ種別",
|
"CMPBrowser.dmgDealt": "与えるダメージ種別",
|
||||||
"CMPBrowser.size": "サイズ",
|
"CMPBrowser.size": "サイズ"
|
||||||
"CMPBrowser.cmpBrowser": "辞典ブラウザ"
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "compendium-browser",
|
"name": "compendium-browser",
|
||||||
"title": "Compendium Browser",
|
"title": "Compendium Browser",
|
||||||
"description": "A module to easily browse and filter spells as well as npcs loaded from compendie.",
|
"description": "A module to easily browse and filter spells as well as npcs loaded from compendie.",
|
||||||
"version": "0.1.3",
|
"version": "0.1.5",
|
||||||
"author": "Felix#6196",
|
"author": "Felix#6196",
|
||||||
"systems": ["dnd5e"],
|
"systems": ["dnd5e"],
|
||||||
"scripts": ["./compendium-browser.js"],
|
"scripts": ["./compendium-browser.js"],
|
||||||
|
|
Loading…
Reference in New Issue