mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { globals } from '../config/globals.js';
|
||||
import { HTMLFragments } from './HTMLFragments.js';
|
||||
import {toast} from "./Toast";
|
||||
import { toast } from './Toast';
|
||||
|
||||
export class DeckStateManager {
|
||||
constructor () {
|
||||
@@ -40,7 +40,7 @@ export class DeckStateManager {
|
||||
);
|
||||
}
|
||||
|
||||
getQuantityOfRole(role) {
|
||||
getQuantityOfRole (role) {
|
||||
return this.deck.find(
|
||||
(card) => card.role.toLowerCase().trim() === role.toLowerCase().trim()
|
||||
)?.quantity;
|
||||
@@ -88,8 +88,8 @@ export class DeckStateManager {
|
||||
if (e.type === 'click' || e.code === 'Enter') {
|
||||
e.preventDefault();
|
||||
toast(
|
||||
`<span class='toast-minus-one'>-1</span>`
|
||||
+ sortedDeck[i].role + ' (<span class="toast-minus-role-quantity">' + (sortedDeck[i].quantity - 1).toString() + '</span>)',
|
||||
'<span class=\'toast-minus-one\'>-1</span>' +
|
||||
sortedDeck[i].role + ' (<span class="toast-minus-role-quantity">' + (sortedDeck[i].quantity - 1).toString() + '</span>)',
|
||||
'neutral',
|
||||
true,
|
||||
true,
|
||||
|
||||
@@ -200,8 +200,8 @@ export class RoleBox {
|
||||
this.deckManager.addCopyOfCard(name);
|
||||
}
|
||||
toast(
|
||||
'<span class="toast-plus-one">+1 </span>'
|
||||
+ name + ' (<span class="toast-plus-role-quantity">' + this.deckManager.getQuantityOfRole(name) + '</span>)',
|
||||
'<span class="toast-plus-one">+1 </span>' +
|
||||
name + ' (<span class="toast-plus-role-quantity">' + this.deckManager.getQuantityOfRole(name) + '</span>)',
|
||||
'neutral',
|
||||
true,
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user