Amélioration dialogue achat
This commit is contained in:
parent
4a6786f220
commit
f225c071ac
@ -29,7 +29,7 @@ export class DialogItemAchat extends Dialog {
|
|||||||
|
|
||||||
constructor(html, vendeur, acheteur, venteData, chatMessageIdVente) {
|
constructor(html, vendeur, acheteur, venteData, chatMessageIdVente) {
|
||||||
const isConsommable = venteData.item.type == 'nourritureboisson';
|
const isConsommable = venteData.item.type == 'nourritureboisson';
|
||||||
let options = { classes: ["dialogachat"], width: 400, height: isConsommable ? 450 : 300, 'z-index': 99999 };
|
let options = { classes: ["dialogachat"], width: 400, height: isConsommable ? 450 : 350, 'z-index': 99999 };
|
||||||
|
|
||||||
const actionAchat = venteData.prixLot > 0 ? "Acheter" : "Prendre";
|
const actionAchat = venteData.prixLot > 0 ? "Acheter" : "Prendre";
|
||||||
const buttons = {};
|
const buttons = {};
|
||||||
@ -39,7 +39,7 @@ export class DialogItemAchat extends Dialog {
|
|||||||
buttons[actionAchat] = { label: actionAchat, callback: it => { this.onAchat(); } };
|
buttons[actionAchat] = { label: actionAchat, callback: it => { this.onAchat(); } };
|
||||||
buttons["decliner"] = { label: "Décliner", callback: it => { } };
|
buttons["decliner"] = { label: "Décliner", callback: it => { } };
|
||||||
let conf = {
|
let conf = {
|
||||||
title: actionAchat,
|
title: venteData.acheteur? venteData.acheteur.name + " - " + actionAchat : actionAchat,
|
||||||
content: html,
|
content: html,
|
||||||
default: actionAchat,
|
default: actionAchat,
|
||||||
buttons: buttons
|
buttons: buttons
|
||||||
|
BIN
styles/img/ui/icon_echoppe.webp
Normal file
BIN
styles/img/ui/icon_echoppe.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
@ -1,14 +1,24 @@
|
|||||||
<form class="rdddialog">
|
<form class="rdddialog">
|
||||||
<div>
|
<div>
|
||||||
{{#if vendeur}}
|
<div class="flexrow flex-center">
|
||||||
<img class="chat-icon" src="{{vendeur.img}}" title="{{vendeur.name}}" alt="{{vendeur.name}}" />
|
<div>
|
||||||
{{/if}}
|
{{#if vendeur}}
|
||||||
<img class="chat-icon" src="{{item.img}}" title="{{item.name}}" alt="{{item.name}}" />
|
<img class="chat-icon" src="{{vendeur.img}}" title="{{vendeur.name}}" alt="{{vendeur.name}}" />
|
||||||
{{!--
|
{{else}}
|
||||||
{{#if acheteur}}
|
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon_echoppe.webp" title="Un commerçant" alt="Vendeur MJ" />
|
||||||
<img class="chat-icon" src="{{acheteur.img}}" title="{{acheteur.name}}" alt="{{acheteur.name}}" />
|
{{/if}}
|
||||||
{{/if}}
|
</div>
|
||||||
--}}
|
<div><i class="fas fa-sign-out-alt"></i></div>
|
||||||
|
<div><img class="chat-icon" src="{{item.img}}" title="{{item.name}}" alt="{{item.name}}" /></div>
|
||||||
|
<div><i class="fas fa-sign-in-alt"></i></div>
|
||||||
|
<div>
|
||||||
|
{{#if acheteur}}
|
||||||
|
<img class="chat-icon" src="{{acheteur.img}}" title="{{acheteur.name}}" alt="{{acheteur.name}}" />
|
||||||
|
{{else}}
|
||||||
|
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon_echoppe.webp" title="Un acheteur" alt="Acheteur MJ" />
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<h4>
|
<h4>
|
||||||
{{#if isVente}}Acheter{{else}}Prendre{{/if}}
|
{{#if isVente}}Acheter{{else}}Prendre{{/if}}
|
||||||
{{#if vendeur}}à {{vendeur.name}}{{/if}}:
|
{{#if vendeur}}à {{vendeur.name}}{{/if}}:
|
||||||
|
Loading…
Reference in New Issue
Block a user