V13 update pt2

This commit is contained in:
Litasa
2025-06-30 17:16:09 +00:00
committed by Vlyan
parent a9748bdf03
commit 1bc01d0741
12 changed files with 211 additions and 58 deletions

View File

@@ -79,6 +79,7 @@
} }
}, },
"l5r5e": { "l5r5e": {
"title": "Legend of the Five Rings",
"global": { "global": {
"edge_translation_disclaimer": "", "edge_translation_disclaimer": "",
"add": "Add", "add": "Add",
@@ -103,16 +104,6 @@
"others": "Others" "others": "Others"
} }
}, },
"settings": {
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
}
},
"logo": { "logo": {
"title": "Need help?", "title": "Need help?",
"src": "systems/l5r5e/assets/l5r-logo.webp", "src": "systems/l5r5e/assets/l5r-logo.webp",
@@ -132,6 +123,22 @@
"title": "FoundryVTT Official Discord", "title": "FoundryVTT Official Discord",
"info": "Your browser will open on the official Foundry discord", "info": "Your browser will open on the official Foundry discord",
"link": "https://discordapp.com/invite/DDBZUDf" "link": "https://discordapp.com/invite/DDBZUDf"
},
"notes": {
"title": "Changelog",
"link": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md"
},
"issues": {
"title": "Issues",
"link": "https://gitlab.com/teaml5r/l5r5e/-/issues"
},
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
} }
}, },
"rings": { "rings": {

View File

@@ -79,6 +79,7 @@
} }
}, },
"l5r5e": { "l5r5e": {
"title": "Legend of the five Rings",
"global": { "global": {
"edge_translation_disclaimer": "Edge Studio nos da su permiso para ofrecer este módulo a la comunidad, pero tanto los textos así como los códigos que lo constituyen no tienen su aprobación explícita.", "edge_translation_disclaimer": "Edge Studio nos da su permiso para ofrecer este módulo a la comunidad, pero tanto los textos así como los códigos que lo constituyen no tienen su aprobación explícita.",
"add": "Añadir", "add": "Añadir",
@@ -103,16 +104,6 @@
"others": "Others" "others": "Others"
} }
}, },
"settings": {
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
}
},
"logo": { "logo": {
"títle": "¿Necesitas ayuda?", "títle": "¿Necesitas ayuda?",
"src": "systems/l5r5e/assets/l5r-logo.webp", "src": "systems/l5r5e/assets/l5r-logo.webp",
@@ -132,6 +123,22 @@
"title": "Discord oficial de FoundryVTT", "title": "Discord oficial de FoundryVTT",
"info": "Su navegador se abrirá el discord oficial de Foundry", "info": "Su navegador se abrirá el discord oficial de Foundry",
"link": "https://discordapp.com/invite/DDBZUDf" "link": "https://discordapp.com/invite/DDBZUDf"
},
"notes": {
"title": "Changelog",
"link": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md"
},
"issues": {
"title": "Issues",
"link": "https://gitlab.com/teaml5r/l5r5e/-/issues"
},
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
} }
}, },
"rings": { "rings": {

View File

@@ -79,6 +79,7 @@
} }
}, },
"l5r5e": { "l5r5e": {
"title": "Legend of the five Rings",
"global": { "global": {
"edge_translation_disclaimer": "", "edge_translation_disclaimer": "",
"add": "Ajouter", "add": "Ajouter",
@@ -103,16 +104,6 @@
"others": "Autres" "others": "Autres"
} }
}, },
"settings": {
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
}
},
"logo": { "logo": {
"title": "Besoin d'aide ?", "title": "Besoin d'aide ?",
"src": "systems/l5r5e/assets/l5r-logo.webp", "src": "systems/l5r5e/assets/l5r-logo.webp",
@@ -132,6 +123,22 @@
"title": "Rejoignez le Discord Francophone", "title": "Rejoignez le Discord Francophone",
"info": "Votre navigateur va ouvrir le discord francophone de foundry.", "info": "Votre navigateur va ouvrir le discord francophone de foundry.",
"link": "https://discord.gg/pPSDNJk" "link": "https://discord.gg/pPSDNJk"
},
"notes": {
"title": "Changelog",
"link": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md"
},
"issues": {
"title": "Issues",
"link": "https://gitlab.com/teaml5r/l5r5e/-/issues"
},
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
} }
}, },
"rings": { "rings": {

View File

@@ -79,6 +79,7 @@
} }
}, },
"l5r5e": { "l5r5e": {
"title": "Legend of the five Rings",
"global": { "global": {
"edge_translation_disclaimer": "", "edge_translation_disclaimer": "",
"add": "Aggiungi", "add": "Aggiungi",
@@ -103,16 +104,6 @@
"others": "Others" "others": "Others"
} }
}, },
"settings": {
"wiki": {
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
}
},
"logo": { "logo": {
"title": "Bisogno di aiuto?", "title": "Bisogno di aiuto?",
"src": "systems/l5r5e/assets/l5r-logo.webp", "src": "systems/l5r5e/assets/l5r-logo.webp",
@@ -132,6 +123,22 @@
"title": "Discord Ufficiale di FoundryVTT", "title": "Discord Ufficiale di FoundryVTT",
"info": "Il tuo browser aprirà il Discord ufficiale di Foundry", "info": "Il tuo browser aprirà il Discord ufficiale di Foundry",
"link": "https://discordapp.com/invite/DDBZUDf" "link": "https://discordapp.com/invite/DDBZUDf"
},
"notes": {
"title": "Changelog",
"link": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md"
},
"issues": {
"title": "Issues",
"link": "https://gitlab.com/teaml5r/l5r5e/-/issues"
},
"custom-compendiums": {
"title": "Compendiums",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/users/custom-compendiums.md"
},
"wiki": {
"title": "Wiki",
"link": "https://gitlab.com/teaml5r/l5r5e/-/wikis/home"
} }
}, },
"rings": { "rings": {

View File

@@ -90,7 +90,7 @@ export class GmToolbox extends HandlebarsApplicationMixin(ApplicationV2) {
* @override ApplicationV2 * @override ApplicationV2
*/ */
async close(options) { async close(options) {
return; return Promise.resolve(this);
} }
/** /**

View File

@@ -116,17 +116,22 @@ export default class HooksL5r5e {
// Add title on button dice icon // Add title on button dice icon
html.find(".chat-control-icon")[0].title = game.i18n.localize("l5r5e.dice.dicepicker.title"); html.find(".chat-control-icon")[0].title = game.i18n.localize("l5r5e.dice.dicepicker.title");
break; break;
}
}
case "settings": static async activateSettings(app) {
// Add Changelog link const html = app.element
html.find("#game-details .system").append( const pip = html.querySelector(".info .system .notification-pip");
`<span><a href="${game.system.changelog}" target="_blank">Changelog</a>` html.querySelector(".info.system.l5r5e")?.remove();
+ ` <a href="${game.i18n.localize("l5r5e.settings.wiki.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.wiki.title")}</a>`
+ ` <a href="${game.i18n.localize("l5r5e.settings.custom-compendiums.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.custom-compendiums.title")}</a>` const section = document.createElement("section");
+ `</span>` section.className = "info system l5r5e";
); const tpl = await foundry.applications.handlebars.renderTemplate(`${CONFIG.l5r5e.paths.templates}settings/logo.html`, {
break; SystemVersion: game.system.version
} });
section.append(foundry.utils.parseHTML(tpl));
if ( pip ) section.querySelector(".system-info").insertAdjacentElement("beforeend", pip);
html.querySelector(".info").insertAdjacentElement("afterend", section);
} }
/** /**

View File

@@ -260,6 +260,7 @@ Hooks.once("diceSoNiceReady", (dice3d) => HooksL5r5e.diceSoNiceReady(dice3d));
/* Hooks On */ /* Hooks On */
/* ------------------------------------ */ /* ------------------------------------ */
Hooks.on("renderSidebarTab", (app, html, data) => HooksL5r5e.renderSidebarTab(app, html, data)); Hooks.on("renderSidebarTab", (app, html, data) => HooksL5r5e.renderSidebarTab(app, html, data));
Hooks.on("activateSettings", async (app)=> HooksL5r5e.activateSettings(app));
Hooks.on("renderChatMessageHTML", (message, html, data) => HooksL5r5e.renderChatMessage(message, html, data)); Hooks.on("renderChatMessageHTML", (message, html, data) => HooksL5r5e.renderChatMessage(message, html, data));
Hooks.on("renderCombatTracker", (app, html, data) => HooksL5r5e.renderCombatTracker(app, html, data)); Hooks.on("renderCombatTracker", (app, html, data) => HooksL5r5e.renderCombatTracker(app, html, data));
Hooks.on("renderCompendium", async (app, html, data) => HooksL5r5e.renderCompendium(app, html, data)); Hooks.on("renderCompendium", async (app, html, data) => HooksL5r5e.renderCompendium(app, html, data));

File diff suppressed because one or more lines are too long

View File

@@ -52,7 +52,7 @@
gap: 4px; // halve the distance between menu icons gap: 4px; // halve the distance between menu icons
} }
#sidebar-content { #sidebar-content.expanded {
background: url("../assets/ui/bgSidebar.webp") no-repeat; background: url("../assets/ui/bgSidebar.webp") no-repeat;
border-image: url("../assets/ui/macro-button.webp") 10 repeat; border-image: url("../assets/ui/macro-button.webp") 10 repeat;
border-style: solid; border-style: solid;
@@ -90,3 +90,13 @@
} }
} }
} }
#menu.active {
transition: max-height 150ms ease-in;
}
#menu {
// Foundry listens to transitionend and then close the menu so need something here.
// otherwise using ESC will result in a long wait and missed trigger events
transition: max-height 10ms ease-out;
}

View File

@@ -44,3 +44,65 @@ textarea {
input[type="number"] { input[type="number"] {
text-align: center; text-align: center;
} }
&.system-badge {
display: flex;
flex-direction: column;
align-items: center;
gap: .5rem;
padding: .25rem;
> img {
height: 128px;
border: none;
object-fit: contain;
}
.system-info {
position: relative;
font-size: var(--font-size-16);
i {
padding-inline-start: 2px;
font-size: var(--font-size-12);
}
}
}
&.sidebar-info {
margin-bottom: -.5rem;
.system-badge { margin-top: .5rem; }
.notification-pip {
color: var(--color-text-accent);
font-size: var(--font-size-12);
top: 4px;
right: -14px;
}
ul.unlist {
display: flex;
flex-wrap: wrap;
padding-left: 0;
list-style: none;
clip-path: inset(0 0 0 2ch); // remove separator if on new line
}
ul.links {
gap: 0;
margin-top: 6px;
margin-left: 10%; // just to center the link list a little
li {
padding-left: 1ch;
white-space: nowrap;
}
li::before {
content: "";
display: inline-block;
margin-right: 1ch;
width: 1ch;
text-align: center;
}
}
}

View File

@@ -585,12 +585,15 @@ l5r5e-multi-select:has( > button.gm) {
} }
} }
#client-settings:has( l5r5e-multi-select) { form#settings-config {
.form-fields:has(l5r5e-multi-select) {
order: 3; // Move the multiselect to be below the title and description for nicer ui div.form-group:has(l5r5e-multi-select) {
.form-fields {
order: 3; // Move the multiselect to be below the title and description for nicer ui
}
} }
[data-setting-id="l5r5e.compendium-unofficial-content-for-players"] { div.form-group:has(#settings-config-l5r5e\.compendium-unofficial-content-for-players) {
// Move the tags and input fields to a similar place as for the multiselect // Move the tags and input fields to a similar place as for the multiselect
.form-fields { .form-fields {
order: 3; order: 3;

View File

@@ -0,0 +1,44 @@
<section class="l5r5e sidebar-info">
<h4 class="divider">{{localize 'WORLD.FIELDS.system.label'}}</h4>
<div class="l5r5e system-badge">
<img src="systems/l5r5e/assets/l5r-logo.webp" data-tooltip="{{localize 'l5r5e.title'}}" alt="{{localize 'l5r5e.title'}}">
<span class="system-info">{{SystemVersion}}</span>
</div>
<ul class="unlist links">
<li>
<a href="{{localize 'l5r5e.logo.notes.link'}}" target="_blank">
{{localize 'l5r5e.logo.notes.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.issues.link'}}" target="_blank">
{{localize 'l5r5e.logo.issues.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.wiki.link'}}" target="_blank">
{{localize 'l5r5e.logo.wiki.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.custom-compendiums.link'}}" target="_blank">
{{localize 'l5r5e.logo.custom-compendiums.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.discord.link'}}" target="_blank" title="{{localize 'l5r5e.logo.discord.info'}}">
{{localize 'l5r5e.logo.discord.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.drivethrurpg.link'}}" target="_blank" title="{{localize 'l5r5e.logo.drivethrurpg.info"'}}">
{{localize 'l5r5e.logo.drivethrurpg.title'}}
</a>
</li>
<li>
<a href="{{localize 'l5r5e.logo.edge.link'}}" target="_blank" title="{{localize 'l5r5e.logo.edge.info'}}">
{{localize 'l5r5e.logo.edge.title'}}
</a>
</li>
</ul>
</section>