Css fixes and add the ability to have a different name on the custom-compendium
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
"CustomTechniques": {
|
||||
"Title": "Use custom techniques",
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
},
|
||||
"CustomCompendiumName": {
|
||||
"Title": "Custom Compendium Name",
|
||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"CustomTechniques": {
|
||||
"Title": "Use custom techniques",
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
},
|
||||
"CustomCompendiumName": {
|
||||
"Title": "Custom Compendium Name",
|
||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"CustomTechniques": {
|
||||
"Title": "Utiliser les techniques personnalisées",
|
||||
"Hint": "Ajoute un type de technique 'Particularités' pour servir de fourre-tout."
|
||||
},
|
||||
"CustomCompendiumName": {
|
||||
"Title": "Nom du CustomCompendium",
|
||||
"Hint": "Pour les utilisateurs avancés qui souhaitent modifier le nom du compendium personnalisé (utilisé pour désactiver ceux intégrés).",
|
||||
"Notification": "Impossible de définir le compendium personnalisé : '{name}'. Est-il activé et enregistré auprès de Babele ?"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"CustomTechniques": {
|
||||
"Title": "Usa tecniche custom",
|
||||
"Hint": "Aggiunge il tipo 'Speciale' come termine generale."
|
||||
},
|
||||
"CustomCompendiumName": {
|
||||
"Title": "Custom Compendium Name",
|
||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
@@ -6,7 +6,7 @@ export default class HooksL5r5e {
|
||||
// Enable embed Babele compendiums only if custom compendium is not found or disabled
|
||||
if (
|
||||
typeof Babele !== "undefined" &&
|
||||
Babele.get().modules.every((module) => module.module !== game.settings.get(CONFIG.l5r5e.namespace, "babele-custom-compendium-name"))
|
||||
Babele.get().modules.every((module) => module.module !== game.settings.get(CONFIG.l5r5e.namespace, "custom-compendium-name"))
|
||||
) {
|
||||
Babele.get().setSystemTranslationsDir("babele"); // Since Babele v2.0.7
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* Custom system settings register
|
||||
*/
|
||||
export const RegisterSettings = function () {
|
||||
const isBabeleRegistered = (typeof Babele !== "undefined");
|
||||
|
||||
/* ------------------------------------ */
|
||||
/* User settings */
|
||||
/* ------------------------------------ */
|
||||
@@ -36,6 +38,20 @@ export const RegisterSettings = function () {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "custom-compendium-name", {
|
||||
name: "SETTINGS.CustomCompendiumName.Title",
|
||||
hint: "SETTINGS.CustomCompendiumName.Hint",
|
||||
scope: "world",
|
||||
config: isBabeleRegistered,
|
||||
requiresReload: true,
|
||||
type: String,
|
||||
default: "l5r5e-custom-compendiums",
|
||||
onChange: (name) => {
|
||||
if (!Babele.get().modules.find((module) => module.module === name)) {
|
||||
ui.notifications.warn(game.i18n.format("SETTINGS.CustomCompendiumName.Notification", { name }), { permanent: true });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* ------------------------------------ */
|
||||
/* Update */
|
||||
@@ -125,24 +141,4 @@ export const RegisterSettings = function () {
|
||||
default: [],
|
||||
onChange: () => game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor"),
|
||||
});
|
||||
|
||||
/* ------------------------------------ */
|
||||
/* Babele */
|
||||
/* ------------------------------------ */
|
||||
const showCustomCompendiumSetting = (typeof Babele !== "undefined");
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "babele-custom-compendium-name", {
|
||||
name: "Custom Compendium Name",
|
||||
hint: "For advanced users that want to change the name of custom compendiums",
|
||||
scope: "world",
|
||||
config: showCustomCompendiumSetting,
|
||||
requiresReload: true,
|
||||
type: String,
|
||||
default: "l5r5e-custom-compendiums",
|
||||
onChange: (value) => {
|
||||
if(!Babele.get().modules.find((module) => module.module === value))
|
||||
{
|
||||
ui.notifications.warn("Unable set Custom Compendium: \"" + value + "\". Is it activated and registered with Babele?", {permanent: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,13 @@
|
||||
/** Sheets **/
|
||||
&.sheet {
|
||||
min-width: 600px;
|
||||
min-width: 37rem;
|
||||
|
||||
label {
|
||||
&:hover {
|
||||
text-shadow: 0 0 2px $red;
|
||||
}
|
||||
}
|
||||
|
||||
.l5r-buttons-bar {
|
||||
display: flex;
|
||||
flex: 0 0 100%;
|
||||
@@ -21,6 +23,7 @@
|
||||
margin: 0 0 0 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&.actor {
|
||||
.sheet-header {
|
||||
h1 {
|
||||
@@ -44,11 +47,13 @@
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.sheet-body {
|
||||
flex: 0 0 100%;
|
||||
align-items: flex-start;
|
||||
@@ -84,6 +89,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section,
|
||||
article {
|
||||
&.tab[data-tab] {
|
||||
@@ -93,6 +99,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sheet-header {
|
||||
flex: 0 0 100%;
|
||||
align-items: flex-start;
|
||||
@@ -575,6 +582,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
background: $l5r5e-white-light;
|
||||
padding: 0.5rem;
|
||||
@@ -740,6 +748,7 @@
|
||||
flex: 0 0 calc(50% - 0.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
.xp,
|
||||
.money-wrapper {
|
||||
flex: 100%;
|
||||
@@ -758,6 +767,7 @@
|
||||
line-height: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 0.85rem;
|
||||
color: $black-light;
|
||||
@@ -824,6 +834,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.inventory {
|
||||
.items-wrapper {
|
||||
h3 {
|
||||
@@ -918,6 +929,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
&.sheet-tabs {
|
||||
flex: 100%;
|
||||
|
||||
@@ -32,8 +32,7 @@ button {
|
||||
overflow: initial;
|
||||
height: calc(100% - 1.1rem);
|
||||
top: 0.2rem;
|
||||
width: 320px;
|
||||
min-width: 40px;
|
||||
min-width: 20rem;
|
||||
letter-spacing: 0.1rem;
|
||||
position: relative;
|
||||
margin-right: 0.5rem;
|
||||
@@ -172,6 +171,9 @@ button {
|
||||
}
|
||||
}
|
||||
&.collapsed {
|
||||
min-width: 0;
|
||||
width: 3rem !important;
|
||||
|
||||
#sidebar-tabs {
|
||||
> .item {
|
||||
&.active {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.10.0/raw/l5r5e.zip?job=build",
|
||||
"version": "1.10.0",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.10.1/raw/l5r5e.zip?job=build",
|
||||
"version": "1.10.1",
|
||||
"compatibility": {
|
||||
"minimum": 11,
|
||||
"verified": "11.301"
|
||||
"verified": "11.307"
|
||||
},
|
||||
"manifestPlusVersion": "1.2.0",
|
||||
"socket": true,
|
||||
|
||||
Reference in New Issue
Block a user