Feat: Decks page.
This commit is contained in:
235
static/dist/css/main.bundle.css
vendored
235
static/dist/css/main.bundle.css
vendored
@@ -38,14 +38,13 @@ html {
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--colour-page-background);
|
||||
color: var(--colour-text);
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
font-family: var(--font-family-base);
|
||||
font-family: Arial;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
background: linear-gradient(to bottom right, var(--colour-page-background-1), var(--colour-page-background-2)); /* var(--c_purple); */
|
||||
height: 100vh;
|
||||
/* max-height: 100vh;
|
||||
overflow-y: clip; */
|
||||
@@ -53,6 +52,7 @@ body {
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
script, link {
|
||||
@@ -88,7 +88,7 @@ script, link {
|
||||
width: 100%;
|
||||
align-self: center;
|
||||
font-size: 1rem;
|
||||
color: var(--colour-text);
|
||||
color: var(--text-color);
|
||||
}
|
||||
#pageBody > * > * {
|
||||
align-self: center;
|
||||
@@ -104,7 +104,6 @@ script, link {
|
||||
|
||||
/* Add a card effect for articles */
|
||||
.card {
|
||||
background-color: var(--colour-text-background);
|
||||
padding: 1vh 2.5vw;
|
||||
margin: 1vh 1vw;
|
||||
display: flex;
|
||||
@@ -182,7 +181,7 @@ script, link {
|
||||
|
||||
.container-input > input,
|
||||
.container-input > textarea {
|
||||
border: 2px solid var(--colour-accent);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 0.5vh;
|
||||
padding: 1vh 1vw;
|
||||
}
|
||||
@@ -205,10 +204,10 @@ li {
|
||||
|
||||
|
||||
:not(input,textarea,select,button).dirty {
|
||||
background-color: var(--colour-accent);
|
||||
background-color: var(--border-color);
|
||||
}
|
||||
input.dirty, textarea.dirty, select.dirty {
|
||||
border-color: var(--colour-primary);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.is-collapsed {
|
||||
@@ -234,8 +233,8 @@ input.dirty, textarea.dirty, select.dirty {
|
||||
|
||||
.button-primary {
|
||||
background: var(--colour-accent);
|
||||
color: var(--colour-primary);
|
||||
border: 2px solid var(--colour-primary);
|
||||
color: var(--primary-color);
|
||||
border: 2px solid var(--primary-color);
|
||||
}
|
||||
|
||||
.button-primary:hover {
|
||||
@@ -245,7 +244,7 @@ input.dirty, textarea.dirty, select.dirty {
|
||||
|
||||
.button-light {
|
||||
background: white;
|
||||
color: var(--colour-primary);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.button-light:hover {
|
||||
@@ -267,7 +266,7 @@ input.dirty, textarea.dirty, select.dirty {
|
||||
|
||||
select {
|
||||
border: 1px solid var(--colour-accent);
|
||||
background-color: var(--colour-page-background-1);
|
||||
background-color: var(--background-color-1);
|
||||
}
|
||||
|
||||
img, video {
|
||||
@@ -321,7 +320,7 @@ h5 {
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
/* height: 50%; */
|
||||
background: var(--colour-page-background);
|
||||
background: var(--background-color);
|
||||
justify-content: right;
|
||||
align-items: right;
|
||||
align-self: right;
|
||||
@@ -386,11 +385,11 @@ h5 {
|
||||
border-bottom-right-radius: 12px;
|
||||
}
|
||||
#overlayHamburger > :hover {
|
||||
color: var(--colour-page-background);
|
||||
background-color: var(--colour-primary);
|
||||
color: var(--background-color);
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
#overlayHamburger .container {
|
||||
background-color: var(--colour-page-background);
|
||||
background-color: var(--tcg-accent-purple);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
@@ -406,8 +405,8 @@ h5 {
|
||||
height: fit-content;
|
||||
}
|
||||
#overlayHamburger .container:hover {
|
||||
color: var(--colour-page-background);
|
||||
background-color: var(--colour-primary);
|
||||
color: var(--background-color);
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
#overlayHamburger > .container {
|
||||
/*
|
||||
@@ -418,13 +417,13 @@ h5 {
|
||||
#overlayHamburger .container a {
|
||||
width: 100%;
|
||||
padding: 4.5px 0;
|
||||
color: var(--colour-text);
|
||||
color: var(--tcg-text-primary);
|
||||
text-decoration: none;
|
||||
line-height: initial;
|
||||
}
|
||||
#overlayHamburger .container a:hover {
|
||||
color: var(--colour-page-background);
|
||||
background-color: var(--colour-primary);
|
||||
color: var(--background-color);
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px) {
|
||||
@@ -497,7 +496,7 @@ th.is_collapsed, td.is_collapsed {
|
||||
display: table-cell !important;
|
||||
}
|
||||
td.dirty {
|
||||
background-color: var(--colour-primary);
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
td:not(.dirty) {
|
||||
background-color: transparent;
|
||||
@@ -517,7 +516,7 @@ table button {
|
||||
}
|
||||
|
||||
table button.active {
|
||||
background-color: var(--colour-page-background);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
tr.delete, tr.delete > td {
|
||||
@@ -560,7 +559,7 @@ table div {
|
||||
color: var(--colour-text-link-visited);
|
||||
}
|
||||
.topnav a:hover {
|
||||
background-color: var(--colour-page-background);
|
||||
background-color: var(--background-color);
|
||||
color: var(--colour-text)
|
||||
}
|
||||
.topnav > .container {
|
||||
@@ -678,10 +677,10 @@ table div {
|
||||
#formFilters button {
|
||||
padding: 0.5vh 0.75vh;
|
||||
background-color: var(--colour-accent);
|
||||
color: var(--colour-primary);
|
||||
color: var(--primary-color);
|
||||
font-weight: bold;
|
||||
border-radius: 0.75vh;
|
||||
border: 2px solid var(--colour-primary);
|
||||
border: 2px solid var(--primary-color);
|
||||
}
|
||||
|
||||
#formFilters button.is_collapsed {
|
||||
@@ -725,45 +724,62 @@ form.filter button.save, form.filter button.button-cancel {
|
||||
padding-right: 30vw;
|
||||
}
|
||||
}
|
||||
|
||||
/* In sections */
|
||||
.tcg.footer {
|
||||
display: flex;
|
||||
}
|
||||
.tcg.footer > .container {
|
||||
/* display: flex; */
|
||||
}
|
||||
.footer-content {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.footer-section {
|
||||
/* display: flex; */
|
||||
margin: auto auto;
|
||||
}
|
||||
|
||||
|
||||
#formFilters {
|
||||
padding: 0.5vh 1vw;
|
||||
margin-top: 1vh;
|
||||
}
|
||||
|
||||
table.table-main {
|
||||
.table-main {
|
||||
overflow-x: auto;
|
||||
padding: 1vh 1vw;
|
||||
max-width: 88vw; /* min(calc(1vh * 80), calc(1vw * 90)); */
|
||||
padding: 0; /*1vh 1vw;*/
|
||||
max-width: 80vw; /* min(calc(1vh * 80), calc(1vw * 90)); */
|
||||
width: min-content;
|
||||
align-items: normal;
|
||||
justify-content: normal;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
table.table-main * {
|
||||
.table-main * {
|
||||
padding: 0.25vh 0.5vh;
|
||||
}
|
||||
|
||||
table.table-main thead {
|
||||
.table-main thead {
|
||||
max-height: 4vh;
|
||||
overflow-y: visible;
|
||||
background-color: var(--colour-text-background);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
table.table-main tbody {
|
||||
.table-main tbody {
|
||||
max-height: 75vh;
|
||||
overflow-y: auto;
|
||||
min-width: fit-content;
|
||||
max-width: fit-content;
|
||||
overflow-x: visible;
|
||||
}
|
||||
table.table-main tbody.is_collapsed {
|
||||
.table-main tbody.is_collapsed {
|
||||
display: block;
|
||||
}
|
||||
table.table-main:has(tbody > div) tbody {
|
||||
.table-main:has(tbody > div) tbody {
|
||||
}
|
||||
table.table-main tbody > div {
|
||||
.table-main tbody > div {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
@@ -778,72 +794,72 @@ table.table-main tbody > div {
|
||||
width: 100%; /* min(calc(90vh), calc(70vw)); */
|
||||
}
|
||||
|
||||
table.table-main select,
|
||||
table.table-main input:not([type="checkbox"]),
|
||||
table.table-main textarea,
|
||||
table.table-main div {
|
||||
.table-main select,
|
||||
.table-main input:not([type="checkbox"]),
|
||||
.table-main textarea,
|
||||
.table-main div {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid var(--colour-accent);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.5vh;
|
||||
text-align: center;
|
||||
background-color: var(--colour-text-background);
|
||||
background-color: var(--background-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
table.table-main thead tr th,
|
||||
table.table-main tbody tr td {
|
||||
.table-main thead tr th,
|
||||
.table-main tbody tr td {
|
||||
max-width: 20vh;
|
||||
min-width: 20vh;
|
||||
padding: 0 0.5vh;
|
||||
}
|
||||
table.table-main tbody tr td {
|
||||
.table-main tbody tr td {
|
||||
height: 3vh;
|
||||
/* padding-top: 0.5vh; */
|
||||
}
|
||||
table.table-main thead tr th.notes,
|
||||
table.table-main tbody tr td.notes {
|
||||
.table-main thead tr th.notes,
|
||||
.table-main tbody tr td.notes {
|
||||
max-width: fit-content;
|
||||
}
|
||||
table.table-main tbody tr td:has(.dirty) {
|
||||
background-color: var(--colour-primary);
|
||||
.table-main tbody tr td:has(.dirty) {
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
table.table-main tbody tr td:has(.dirty) table tr:not(:has(.dirty)) {
|
||||
.table-main tbody tr td:has(.dirty) table tr:not(:has(.dirty)) {
|
||||
background-color: var(--colour-text-background);
|
||||
}
|
||||
table.table-main tbody tr:not(:last-of-type) td {
|
||||
.table-main tbody tr:not(:last-of-type) td {
|
||||
padding-bottom: 0.25vh;
|
||||
}
|
||||
table.table-main tbody tr td.ddl-preview div {
|
||||
.table-main tbody tr td.ddl-preview div {
|
||||
cursor: pointer;
|
||||
}
|
||||
table.table-main tbody tr td.ddl-preview div,
|
||||
table.table-main tbody tr td.ddl-preview select {
|
||||
.table-main tbody tr td.ddl-preview div,
|
||||
.table-main tbody tr td.ddl-preview select {
|
||||
padding-left: 2vh;
|
||||
padding-right: 2vh;
|
||||
}
|
||||
table.table-main thead tr th.active,
|
||||
table.table-main tbody tr td.active {
|
||||
.table-main thead tr th.active,
|
||||
.table-main tbody tr td.active {
|
||||
max-width: 6vh;
|
||||
min-width: 6vh;
|
||||
}
|
||||
table.table-main thead tr th.active svg.active.add {
|
||||
fill: var(--colour-primary);
|
||||
background-color: var(--colour-accent);
|
||||
border: 2px solid var(--colour-accent);
|
||||
.table-main thead tr th.active svg.active.add {
|
||||
fill: var(--primary-color);
|
||||
background-color: var(--background-color);
|
||||
border: 2px solid var(--border-color);
|
||||
padding: 0;
|
||||
border-radius: 1vh;
|
||||
}
|
||||
table.table-main tbody tr td.active svg.active.add {
|
||||
fill: var(--colour-primary);
|
||||
.table-main tbody tr td.active svg.active.add {
|
||||
fill: var(--primary-color);
|
||||
}
|
||||
table.table-main tbody tr td.active svg.active.delete {
|
||||
fill: var(--colour-error);
|
||||
.table-main tbody tr td.active svg.active.delete {
|
||||
fill: var(--tcg-accent-red);
|
||||
}
|
||||
table.table-main tbody tr td.display_order,
|
||||
table.table-main thead tr th.display_order {
|
||||
.table-main tbody tr td.display_order,
|
||||
.table-main thead tr th.display_order {
|
||||
max-width: 5vh;
|
||||
min-width: 5vh;
|
||||
}
|
||||
@@ -869,13 +885,13 @@ table.table-main thead tr th.display_order {
|
||||
.company-name {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
table.table-main {
|
||||
.table-main {
|
||||
max-height: 61vh;
|
||||
}
|
||||
table.table-main thead {
|
||||
.table-main thead {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
table.table-main tbody {
|
||||
.table-main tbody {
|
||||
max-height: 53vh;
|
||||
}
|
||||
}
|
||||
@@ -883,44 +899,53 @@ table.table-main thead tr th.display_order {
|
||||
|
||||
|
||||
|
||||
/* Default */
|
||||
|
||||
:root {
|
||||
/* Claude dark blue / grey theme */
|
||||
--colour-accent: #C77DFF;
|
||||
--colour-error: red;
|
||||
--colour-error-accent: #fc8181;
|
||||
--colour-error-highlight: #fff5f5;
|
||||
--colour-error-title: #c53030;
|
||||
--colour-page-background: #E0AAFF;
|
||||
--colour-page-background-1: #F5ECFE;
|
||||
--colour-page-background-2: #FAE0E2;
|
||||
--colour-primary: #240046;
|
||||
--colour-secondary: #3C096C;
|
||||
--colour-success: #38a169;
|
||||
--colour-success-highlight: #f0fff4;
|
||||
--colour-success-title: #16a34a;
|
||||
--colour-text: #10002B;
|
||||
--colour-text-background: white;
|
||||
--colour-text-link-unvisited: #0000EE;
|
||||
--colour-text-link-visited: #551A8B;
|
||||
--background-color: #121212;
|
||||
--text-color: #e0e0e0;
|
||||
--primary-color: #bb86fc;
|
||||
--secondary-color: #03dac6;
|
||||
--success-color: #00c853;
|
||||
--danger-color: #cf6679;
|
||||
--warning-color: #ffab00;
|
||||
--info-color: #2196f3;
|
||||
--light-color: #2c2c2c;
|
||||
--dark-color: #1f1f1f;
|
||||
--border-color: #333333;
|
||||
--shadow-color: rgba(255, 255, 255, 0.1);
|
||||
|
||||
/* Header * /
|
||||
--header-bg: #1f1f1f;
|
||||
--header-text: #e0e0e0;
|
||||
|
||||
/* Footer * /
|
||||
--footer-bg: #1f1f1f;
|
||||
--footer-text: #a0a0a0;
|
||||
|
||||
/* Navigation * /
|
||||
--nav-bg: #1f1f1f;
|
||||
--nav-text: #e0e0e0;
|
||||
--nav-hover-bg: #2c2c2c;
|
||||
--nav-hover-text: #bb86fc;
|
||||
|
||||
/* Buttons * /
|
||||
--Button-primary-bg: #bb86fc;
|
||||
--Button-primary-text: #121212;
|
||||
--Button-secondary-bg: #03dac6;
|
||||
--Button-secondary-text: #121212;
|
||||
|
||||
/* Forms * /
|
||||
--input-bg: #2c2c2c;
|
||||
--input-border: #454545;
|
||||
--input-text: #e0e0e0;
|
||||
--input-focus-border: #bb86fc;
|
||||
|
||||
/* Cards * /
|
||||
--card-bg: #1f1f1f;
|
||||
--card-border: #333333;
|
||||
--card-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.05);
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
--c_purple_darker: #310055;
|
||||
--c_purple_dark: #4A0A77;
|
||||
--c_purple: #6818A5;
|
||||
--c_purple_light: #CBAFFE;
|
||||
--c_purple_lighter: #F5ECFE;
|
||||
|
||||
--c_blue: #0044FF;
|
||||
--c_blue_pastel: #B8E0FF;
|
||||
--c_blue_light: #73E8FF;
|
||||
--c_blue_dark: #003ADB;
|
||||
/* --c_red: * /
|
||||
--c-red: #FF0000;
|
||||
--c_red_pastel: #FAE0E2;
|
||||
--c_red_lighter: #FAE0E2;
|
||||
}
|
||||
*/
|
||||
|
||||
/*# sourceMappingURL=main.bundle.css.map*/
|
||||
2
static/dist/css/main.bundle.css.map
vendored
2
static/dist/css/main.bundle.css.map
vendored
File diff suppressed because one or more lines are too long
106
static/dist/css/tcg_decks.bundle.css
vendored
Normal file
106
static/dist/css/tcg_decks.bundle.css
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
|
||||
.container-input > input {
|
||||
padding: 0vh 1vh;
|
||||
border-radius: 0.5vh;
|
||||
max-width: 7vh;
|
||||
}
|
||||
|
||||
|
||||
/* Right column */
|
||||
.rightcolumn {
|
||||
min-width: fit-content;
|
||||
}
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: absolute;
|
||||
width: 90vw;
|
||||
color: var(--colour-text);
|
||||
}
|
||||
|
||||
|
||||
/* Footer */
|
||||
.footer {
|
||||
padding: 1vh 1vw;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
max-height: 5vh;
|
||||
overflow-y: auto;
|
||||
background-color: var(--colour-accent);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 98vw;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px) {
|
||||
.footer {
|
||||
max-height: 8vh;
|
||||
padding: 0.75vh 2vw;
|
||||
font-size: 10px;
|
||||
width: 96vw;
|
||||
max-width: 96vw;
|
||||
}
|
||||
.footer > h4 {
|
||||
font-size: 10px;
|
||||
}
|
||||
.footer > h5 {
|
||||
font-size: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
.footer > h4, h5 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.tcg-card {
|
||||
margin-top: 1vh;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
table.table-main tbody {
|
||||
max-height: 30vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
table.statistics {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.statistics thead {
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
table.statistics tbody {
|
||||
max-height: 30vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
table.statistics thead tr th.deck,
|
||||
table.statistics tbody tr td.deck_id {
|
||||
min-width: 20vh;
|
||||
max-width: 20vh;
|
||||
}
|
||||
table.statistics thead tr th.name,
|
||||
table.statistics tbody tr td.name {
|
||||
min-width: 40vh;
|
||||
max-width: 40vh;
|
||||
}
|
||||
table.statistics thead tr th.value,
|
||||
table.statistics tbody tr td.value {
|
||||
min-width: 10vh;
|
||||
max-width: 10vh;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=tcg_decks.bundle.css.map*/
|
||||
1
static/dist/css/tcg_decks.bundle.css.map
vendored
Normal file
1
static/dist/css/tcg_decks.bundle.css.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css/tcg_decks.bundle.css","mappings":";;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C;;;AC/DA;IACI,eAAe;IACf,gBAAgB;AACpB;;;AAGA;IACI,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,aAAa;AACjB;AACA;IACI,yCAAyC;AAC7C;AACA;IACI,gBAAgB;IAChB,gBAAgB;AACpB;AACA;;IAEI,eAAe;IACf,eAAe;AACnB;AACA;;IAEI,eAAe;IACf,eAAe;AACnB;AACA;;IAEI,eAAe;IACf,eAAe;AACnB,C","sources":["webpack://app/./static/css/sections/tcg.css","webpack://app/./static/css/pages/tcg/decks.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 82vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}","\n\n.tcg-card {\n margin-top: 1vh;\n margin-bottom: 0;\n}\n\n\ntable.table-main tbody {\n max-height: 30vh;\n overflow-y: auto;\n}\n\ntable.statistics {\n margin-top: 0;\n}\ntable.statistics thead {\n background-color: var(--background-color);\n}\ntable.statistics tbody {\n max-height: 30vh;\n overflow-y: auto;\n}\ntable.statistics thead tr th.deck,\ntable.statistics tbody tr td.deck_id {\n min-width: 20vh;\n max-width: 20vh;\n}\ntable.statistics thead tr th.name,\ntable.statistics tbody tr td.name {\n min-width: 40vh;\n max-width: 40vh;\n}\ntable.statistics thead tr th.value,\ntable.statistics tbody tr td.value {\n min-width: 10vh;\n max-width: 10vh;\n}"],"names":[],"sourceRoot":""}
|
||||
44
static/dist/css/tcg_game.bundle.css
vendored
44
static/dist/css/tcg_game.bundle.css
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 77vh;
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
@@ -213,6 +213,9 @@
|
||||
}
|
||||
|
||||
/* Game Section */
|
||||
#gameSection {
|
||||
margin: 0 auto;
|
||||
}
|
||||
#gameSection .row.round {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -413,13 +416,16 @@
|
||||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.life-controls {
|
||||
.life-gain-controls,
|
||||
.life-loss-controls {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
margin-bottom: 1vh;
|
||||
}
|
||||
|
||||
.life-btn {
|
||||
.life-gain-btn,
|
||||
.life-loss-btn {
|
||||
background: var(--tcg-bg-card);
|
||||
border: 2px solid var(--tcg-border-color);
|
||||
color: var(--tcg-text-primary);
|
||||
@@ -436,17 +442,31 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.life-btn:hover {
|
||||
border-color: var(--tcg-accent-purple);
|
||||
background: var(--tcg-accent-purple);
|
||||
.life-gain-btn:hover,
|
||||
.life-loss-btn:hover {
|
||||
border-color: green; /*var(--tcg-accent-purple);*/
|
||||
background: green; /*var(--tcg-accent-purple);*/
|
||||
color: var(--tcg-bg-primary);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.life-btn:active {
|
||||
.life-loss-btn:hover {
|
||||
border-color: red;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.life-gain-btn:active,
|
||||
.life-loss-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.life-total label {
|
||||
color: var(--tcg-text-primary);
|
||||
width: 100%;
|
||||
margin-bottom: 1vh;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Commander Damage Section */
|
||||
.commander-damage-section {
|
||||
border-top: 1px solid var(--tcg-border-color);
|
||||
@@ -486,6 +506,7 @@
|
||||
.damage-source {
|
||||
font-size: 1rem;
|
||||
color: var(--tcg-text-secondary);
|
||||
padding-right: 1vh;
|
||||
}
|
||||
|
||||
.damage-controls {
|
||||
@@ -544,8 +565,10 @@
|
||||
.damage-log.container table tbody tr td.received_from_commander_player_id {
|
||||
width: 20vw;
|
||||
}
|
||||
.damage-log.container table thead tr th.health_change,
|
||||
.damage-log.container table tbody tr td.health_change {
|
||||
.damage-log.container table thead tr th.life_gain,
|
||||
.damage-log.container table tbody tr td.life_gain,
|
||||
.damage-log.container table thead tr th.life_loss,
|
||||
.damage-log.container table tbody tr td.life_loss {
|
||||
width: 7vw;
|
||||
}
|
||||
.damage-log.container table thead tr th.commander-deaths,
|
||||
@@ -649,7 +672,8 @@
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.life-btn {
|
||||
.life-gain-btn,
|
||||
.life-loss-btn {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
font-size: 1.5rem;
|
||||
|
||||
2
static/dist/css/tcg_game.bundle.css.map
vendored
2
static/dist/css/tcg_game.bundle.css.map
vendored
File diff suppressed because one or more lines are too long
59
static/dist/css/tcg_games.bundle.css
vendored
59
static/dist/css/tcg_games.bundle.css
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 77vh;
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
@@ -99,15 +99,18 @@
|
||||
position: relative;
|
||||
animation: tcg-fadeIn 0.8s ease-out 0.2s backwards;
|
||||
margin: 2vh auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Filters Form */
|
||||
@@ -154,8 +157,7 @@
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.games-table {
|
||||
width: 100%;
|
||||
#tableMain.games-table {
|
||||
border-collapse: collapse;
|
||||
font-size: 1rem;
|
||||
}
|
||||
@@ -164,7 +166,6 @@
|
||||
background: var(--tcg-bg-card);
|
||||
border-bottom: 2px solid var(--tcg-accent-purple);
|
||||
}
|
||||
|
||||
.games-table th {
|
||||
font-family: 'Cinzel', serif;
|
||||
font-size: 0.95rem;
|
||||
@@ -173,18 +174,22 @@
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 1rem;
|
||||
text-align: left;
|
||||
}
|
||||
.games-table thead tr {
|
||||
height: 4vh;
|
||||
}
|
||||
|
||||
#tableMain.games-table tbody {
|
||||
max-height: 59vh;
|
||||
}
|
||||
.games-table tbody tr {
|
||||
border-bottom: 1px solid var(--tcg-border-color);
|
||||
transition: all 0.3s ease;
|
||||
height: 4vh;
|
||||
}
|
||||
|
||||
.games-table tbody tr:hover {
|
||||
background: rgba(139, 92, 246, 0.1);
|
||||
}
|
||||
|
||||
.games-table tbody tr.inactive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -198,7 +203,38 @@
|
||||
color: white;
|
||||
}
|
||||
|
||||
.game-id {
|
||||
.games-table thead tr th.game_id,
|
||||
.games-table tbody tr td.game_id {
|
||||
min-width: 10vh;
|
||||
max-width: 10vh;
|
||||
}
|
||||
.games-table thead tr th.is_commander,
|
||||
.games-table tbody tr td.is_commander {
|
||||
min-width: 12vh;
|
||||
max-width: 12vh;
|
||||
}
|
||||
.games-table thead tr th.location_name,
|
||||
.games-table tbody tr td.location_name {
|
||||
min-width: 20vh;
|
||||
max-width: 20vh;
|
||||
}
|
||||
.games-table thead tr th.start_on,
|
||||
.games-table tbody tr td.start_on {
|
||||
min-width: 14vh;
|
||||
max-width: 14vh;
|
||||
}
|
||||
#tableMain.games-table thead tr th.active,
|
||||
#tableMain.games-table tbody tr td.active {
|
||||
min-width: 8vh;
|
||||
max-width: 8vh;
|
||||
}
|
||||
.games-table thead tr th.navMtgGame,
|
||||
.games-table tbody tr td.navMtgGame {
|
||||
min-width: 13vh;
|
||||
max-width: 13vh;
|
||||
}
|
||||
|
||||
.game_id {
|
||||
font-family: 'Cinzel', serif;
|
||||
font-weight: 600;
|
||||
color: var(--tcg-text-secondary);
|
||||
@@ -289,7 +325,7 @@
|
||||
|
||||
/* Join Button */
|
||||
.btn-join {
|
||||
padding: 0.5rem 1.25rem;
|
||||
padding: 0.5vh 1vw;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
@@ -331,7 +367,7 @@
|
||||
animation: tcg-fadeIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
.modal-overlay.hidden {
|
||||
.modal-overlay.is_collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -404,7 +440,6 @@
|
||||
}
|
||||
|
||||
.section-header {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
|
||||
2
static/dist/css/tcg_games.bundle.css.map
vendored
2
static/dist/css/tcg_games.bundle.css.map
vendored
File diff suppressed because one or more lines are too long
2
static/dist/css/tcg_home.bundle.css
vendored
2
static/dist/css/tcg_home.bundle.css
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 77vh;
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
2
static/dist/css/tcg_home.bundle.css.map
vendored
2
static/dist/css/tcg_home.bundle.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/tcg_home.bundle.css","mappings":";;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C;ACjEA;IACI,iBAAiB;AACrB;AACA;IACI,iBAAiB;IACjB,kBAAkB;AACtB,C","sources":["webpack://app/./static/css/sections/tcg.css","webpack://app/./static/css/pages/tcg/home.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 77vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}","#pageBody .column .row {\n margin-top: 0.5vh;\n}\n#pageBody .column .row .button {\n margin-left: auto;\n margin-right: auto;\n}"],"names":[],"sourceRoot":""}
|
||||
{"version":3,"file":"css/tcg_home.bundle.css","mappings":";;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C;ACjEA;IACI,iBAAiB;AACrB;AACA;IACI,iBAAiB;IACjB,kBAAkB;AACtB,C","sources":["webpack://app/./static/css/sections/tcg.css","webpack://app/./static/css/pages/tcg/home.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 82vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}","#pageBody .column .row {\n margin-top: 0.5vh;\n}\n#pageBody .column .row .button {\n margin-left: auto;\n margin-right: auto;\n}"],"names":[],"sourceRoot":""}
|
||||
6
static/dist/css/user_account.bundle.css
vendored
6
static/dist/css/user_account.bundle.css
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 77vh;
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
@@ -89,8 +89,8 @@ label {
|
||||
input.dirty,
|
||||
textarea.dirty,
|
||||
select.dirty {
|
||||
border-color: var(--colour-primary);
|
||||
background-color: var(--colour-page-background-2);
|
||||
border-color: var(--primary-color);
|
||||
background-color: var(--background-color-2);
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=user_account.bundle.css.map*/
|
||||
2
static/dist/css/user_account.bundle.css.map
vendored
2
static/dist/css/user_account.bundle.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/user_account.bundle.css","mappings":";;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C;;;AChEA;IACI,aAAa;AACjB;;AAEA;IACI,eAAe;IACf,SAAS;IACT,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;AACA;IACI,iBAAiB;AACrB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;IAGI,mCAAmC;IACnC,iDAAiD;AACrD,C","sources":["webpack://app/./static/css/sections/tcg.css","webpack://app/./static/css/pages/user/user.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 77vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}","\n#formFilters {\n display: none;\n}\n\n.container.save.button-cancel {\n position: fixed;\n top: 10vh;\n right: 10vh;\n}\n\n.container-input {\n margin: 0 auto;\n}\nlabel {\n font-weight: bold;\n}\n.container-input input {\n max-width: 250px;\n}\n\ninput.dirty, \ntextarea.dirty, \nselect.dirty {\n border-color: var(--colour-primary);\n background-color: var(--colour-page-background-2);\n}"],"names":[],"sourceRoot":""}
|
||||
{"version":3,"file":"css/user_account.bundle.css","mappings":";;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C;;;AChEA;IACI,aAAa;AACjB;;AAEA;IACI,eAAe;IACf,SAAS;IACT,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;AACA;IACI,iBAAiB;AACrB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;IAGI,kCAAkC;IAClC,2CAA2C;AAC/C,C","sources":["webpack://app/./static/css/sections/tcg.css","webpack://app/./static/css/pages/user/user.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 82vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}","\n#formFilters {\n display: none;\n}\n\n.container.save.button-cancel {\n position: fixed;\n top: 10vh;\n right: 10vh;\n}\n\n.container-input {\n margin: 0 auto;\n}\nlabel {\n font-weight: bold;\n}\n.container-input input {\n max-width: 250px;\n}\n\ninput.dirty, \ntextarea.dirty, \nselect.dirty {\n border-color: var(--primary-color);\n background-color: var(--background-color-2);\n}"],"names":[],"sourceRoot":""}
|
||||
2
static/dist/css/user_accounts.bundle.css
vendored
2
static/dist/css/user_accounts.bundle.css
vendored
@@ -15,7 +15,7 @@
|
||||
|
||||
/* Main Table */
|
||||
#pageBody {
|
||||
max-height: 77vh;
|
||||
max-height: 82vh;
|
||||
padding: 0 5vw;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
2
static/dist/css/user_accounts.bundle.css.map
vendored
2
static/dist/css/user_accounts.bundle.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/user_accounts.bundle.css","mappings":";;;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C","sources":["webpack://app/./static/css/sections/tcg.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 77vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}"],"names":[],"sourceRoot":""}
|
||||
{"version":3,"file":"css/user_accounts.bundle.css","mappings":";;;AAEA;IACI,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;AAClB;;;AAGA,iBAAiB;AACjB;IACI,sBAAsB;AAC1B;;AAEA,eAAe;AACf;IACI,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,qBAAqB;IACrB,2BAA2B;IAC3B,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,yBAAyB;AAC7B;;;AAGA,WAAW;AACX;IACI,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,sCAAsC;IACtC,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf;;AAEA;IACI;QACI,eAAe;QACf,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,eAAe;IACnB;IACA;QACI,eAAe;IACnB;IACA;QACI,cAAc;IAClB;AACJ;;AAEA;IACI,UAAU;IACV,SAAS;AACb,C","sources":["webpack://app/./static/css/sections/tcg.css"],"sourcesContent":["\n\n.container-input > input {\n padding: 0vh 1vh;\n border-radius: 0.5vh;\n max-width: 7vh;\n}\n\n\n/* Right column */\n.rightcolumn {\n min-width: fit-content;\n}\n\n/* Main Table */\n#pageBody {\n max-height: 82vh;\n padding: 0 5vw;\n margin: 0;\n border: 0;\n align-content: center;\n justify-content: flex-start;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n width: 90vw;\n color: var(--colour-text);\n}\n\n\n/* Footer */\n.footer {\n padding: 1vh 1vw;\n text-align: center;\n margin: 0;\n max-height: 5vh;\n overflow-y: auto;\n background-color: var(--colour-accent);\n position: absolute;\n bottom: 0;\n width: 98vw;\n}\n\n@media screen and (max-width: 400px) {\n .footer {\n max-height: 8vh;\n padding: 0.75vh 2vw;\n font-size: 10px; \n width: 96vw;\n max-width: 96vw;\n }\n .footer > h4 {\n font-size: 10px;\n }\n .footer > h5 {\n font-size: 9px;\n }\n}\n\n.footer > h4, h5 {\n padding: 0;\n margin: 0;\n}"],"names":[],"sourceRoot":""}
|
||||
302
static/dist/js/main.bundle.js
vendored
302
static/dist/js/main.bundle.js
vendored
@@ -746,6 +746,7 @@ class BasePage {
|
||||
// , buttonSave = null, buttonCancel = null
|
||||
if (Validation.isEmpty(buttonContainerSelector)) buttonContainerSelector = '.' + flagContainer + '.' + flagSave + '.' + flagCancel;
|
||||
let buttonSave = document.querySelector(buttonContainerSelector + ' ' + idButtonSave);
|
||||
if (buttonSave == null) return;
|
||||
let buttonCancel = document.querySelector(buttonContainerSelector + ' ' + idButtonCancel);
|
||||
utils_Utils.consoleLogIfNotProductionEnvironment({
|
||||
show,
|
||||
@@ -1116,6 +1117,7 @@ class TableBasePage extends BasePage {
|
||||
cacheRowBlank() {
|
||||
let selectorRowNew = idTableMain + ' tbody tr.' + flagRowNew;
|
||||
let rowBlankTemp = document.querySelector(selectorRowNew);
|
||||
if (rowBlankTemp == null) return;
|
||||
utils_Utils.consoleLogIfNotProductionEnvironment("row blank temp: ", rowBlankTemp);
|
||||
let countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
|
||||
_rowBlank = rowBlankTemp.cloneNode(true);
|
||||
@@ -1524,13 +1526,89 @@ class TableBasePage extends BasePage {
|
||||
DOM.toggleElementHasClassnameFlag(columnTh, isRequiredFlag, classnameFlag);
|
||||
}
|
||||
updateAndToggleShowButtonsSaveCancel() {
|
||||
let pageBody = document.querySelector(idPageBody);
|
||||
// let pageBody = document.querySelector(idPageBody);
|
||||
let isDirty = DOM.hasDirtyChildrenContainer(pageBody);
|
||||
let buttonContainerSelector = '.' + flagContainer + '.' + flagSave + '.' + flagCancel;
|
||||
let buttonSave = document.querySelector(buttonContainerSelector + ' ' + idButtonSave);
|
||||
let areVisibleSaveCancelButtons = !buttonSave.classList.contains(flagIsCollapsed);
|
||||
console.log({
|
||||
pageBody,
|
||||
isDirty
|
||||
isDirty,
|
||||
areVisibleSaveCancelButtons
|
||||
});
|
||||
this.toggleShowButtonsSaveCancel(isDirty);
|
||||
this.toggleShowButtonsSaveCancel(isDirty || areVisibleSaveCancelButtons);
|
||||
}
|
||||
}
|
||||
;// ./static/js/pages/tcg/mtg_decks.js
|
||||
|
||||
|
||||
|
||||
|
||||
class PageMtgDecks extends TableBasePage {
|
||||
static hash = hashPageMtgDecks;
|
||||
static attrIdRowObject = attrDeckId;
|
||||
callSaveTableContent = API.saveDeck;
|
||||
constructor(router) {
|
||||
super(router);
|
||||
}
|
||||
initialize() {
|
||||
this.sharedInitialize();
|
||||
}
|
||||
hookupFilters() {
|
||||
/*
|
||||
this.sharedHookupFilters();
|
||||
this.hookupFilterActive();
|
||||
*/
|
||||
}
|
||||
loadRowTable(rowJson) {
|
||||
if (rowJson == null) return;
|
||||
if (_verbose) {
|
||||
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
|
||||
}
|
||||
}
|
||||
getJsonRow(row) {
|
||||
return;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {}
|
||||
postInitialiseRowNewCallback(tbody) {
|
||||
let newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
||||
let newestRow = newRows[0];
|
||||
let clickableElementsSelector = ['td.' + attrCommanderBracketId + ' div.' + attrCommanderBracketId].join('');
|
||||
newestRow.querySelectorAll(clickableElementsSelector).forEach(clickableElement => {
|
||||
clickableElement.click();
|
||||
});
|
||||
}
|
||||
hookupTableMain() {
|
||||
super.hookupTableMain();
|
||||
this.hookupTableMainRows();
|
||||
this.hookupFieldsNameTable();
|
||||
this.hookupTableMainIsCommanderCheckboxes();
|
||||
this.hookupTableMainCommanderBracketPreviews();
|
||||
this.hookupFieldsActive();
|
||||
}
|
||||
hookupTableMainRows() {
|
||||
return;
|
||||
// removed by dead control flow
|
||||
|
||||
// removed by dead control flow
|
||||
|
||||
}
|
||||
static toggleShowDeckStatisticsSection(showSection) {
|
||||
let statisticsSectionTableBody = document.querySelector('table.' + flagStatistics + ' tbody');
|
||||
if (showSection) {
|
||||
statisticsSectionTableBody.classList.remove(flagIsCollapsed);
|
||||
} else {
|
||||
statisticsSectionTableBody.classList.add(flagIsCollapsed);
|
||||
}
|
||||
}
|
||||
hookupTableMainIsCommanderCheckboxes() {
|
||||
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagIsCommander + ' .' + flagIsCommander);
|
||||
}
|
||||
hookupTableMainCommanderBracketPreviews() {
|
||||
this.hookupTableCellDdlPreviews(attrCommanderBracketId, utils_Utils.getListFromDict(commanderBrackets));
|
||||
}
|
||||
leave() {
|
||||
super.leave();
|
||||
}
|
||||
}
|
||||
;// ./static/js/pages/tcg/mtg_game.js
|
||||
@@ -1698,28 +1776,16 @@ class PageMtgGame extends TableBasePage {
|
||||
const grid = document.getElementById('playersGrid');
|
||||
grid.innerHTML = '';
|
||||
|
||||
// Build a damage lookup: { playerId: { fromPlayerId: damageAmount } }
|
||||
/*
|
||||
const damageLookup = {};
|
||||
damageRecords.forEach(damage => {
|
||||
if (!damageLookup[damage.player_id]) {
|
||||
damageLookup[damage.player_id] = {};
|
||||
}
|
||||
if (damage.received_from_commander_player_id) {
|
||||
damageLookup[damage.player_id][damage.received_from_commander_player_id] = damage.health_change || 0;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
let activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
// let activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
const roundDisplayOrderLabel = PageMtgGame.getRoundDisplayOrderLabel();
|
||||
if (activeRoundId < 0) {
|
||||
const currentRoundDisplayOrder = Number(DOM.getElementValueCurrent(roundDisplayOrderLabel));
|
||||
rounds.push(PageMtgGame.makeDefaultGameRound(currentRoundDisplayOrder));
|
||||
activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
const currentRoundDisplayOrder = Number(DOM.getElementValueCurrent(roundDisplayOrderLabel));
|
||||
let activeRound = rounds.filter(round => round[flagDisplayOrder] == currentRoundDisplayOrder)[0];
|
||||
if (activeRound == null) {
|
||||
activeRound = PageMtgGame.makeDefaultGameRound(currentRoundDisplayOrder);
|
||||
rounds.push(activeRound);
|
||||
}
|
||||
const latestRound = rounds.filter(round => round[attrRoundId] == activeRoundId)[0];
|
||||
DOM.setElementValueCurrent(roundDisplayOrderLabel, latestRound[flagDisplayOrder]);
|
||||
DOM.setElementValueCurrent(roundDisplayOrderLabel, activeRound[flagDisplayOrder]);
|
||||
const previousRoundIds = rounds.filter(round => round[flagDisplayOrder] <= currentRoundDisplayOrder).map(round => round[attrRoundId]);
|
||||
players.forEach((player, index) => {
|
||||
// Build display name: prefer user_name + deck_name, fallback to player name
|
||||
const playerId = player[attrPlayerId];
|
||||
@@ -1730,17 +1796,26 @@ class PageMtgGame extends TableBasePage {
|
||||
let maxCommanderDamageReceived = 0;
|
||||
damagePlayerPairs.forEach(damagePlayerPair => {
|
||||
const sourceId = damagePlayerPair[attrPlayerId];
|
||||
const filteredPlayerDamages = damageRecords.filter(damage => damage[attrRoundId] == activeRoundId && damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId); //[playerId] || {};
|
||||
const filteredPlayerDamages = damageRecords.filter(damage => damage[attrRoundId] == activeRound[attrRoundId]
|
||||
// previousRoundIds.includes(damage[attrRoundId])
|
||||
&& damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId); //[playerId] || {};
|
||||
if (filteredPlayerDamages.length == 0) {
|
||||
damageRecords.push(PageMtgGame.makeDefaultGameRoundPlayerDamage(playerId, sourceId));
|
||||
}
|
||||
maxCommanderDamageReceived = Math.max(maxCommanderDamageReceived, damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId).map(damage => damage[flagHealthChange]).reduce((acc, curr) => acc + curr, 0));
|
||||
maxCommanderDamageReceived = Math.max(maxCommanderDamageReceived, damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId && damage[attrReceivedFromCommanderPlayerId] != null && previousRoundIds.includes(damage[attrRoundId])).map(damage => damage[flagLifeLoss]).reduce((a, b) => a + b, 0));
|
||||
});
|
||||
const totalDamage = damageRecords.filter(damage => damage[attrPlayerId] == playerId && previousRoundIds.includes(damage[attrRoundId])).map(damage => damage[flagLifeLoss] - damage[flagLifeGain]).reduce((a, b) => a + b, 0);
|
||||
let life = startingLife - totalDamage;
|
||||
let isEliminatedByForce = damageRecords.filter(damage => damage[attrPlayerId] == playerId && previousRoundIds.includes(damage[attrRoundId])).map(damage => damage[flagIsEliminated]).some(Boolean);
|
||||
console.log("renderPlayers");
|
||||
console.log({
|
||||
isEliminatedByForce,
|
||||
player,
|
||||
life,
|
||||
maxCommanderDamageReceived
|
||||
});
|
||||
const totalDamage = damageRecords.filter(damage => damage[attrPlayerId] == playerId).map(damage => damage[flagHealthChange]).reduce((acc, curr) => acc + curr, 0);
|
||||
let life = startingLife + totalDamage;
|
||||
let isEliminatedByForce = damageRecords.filter(damage => damage[attrPlayerId] == playerId).map(damage => damage[flagIsEliminated]).some(Boolean);
|
||||
const isEliminated = isEliminatedByForce || !player[flagActive] || life < 1 || maxCommanderDamageReceived >= 21;
|
||||
const playerOwnDamage = damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == null && damage[attrRoundId] == activeRoundId)[0];
|
||||
const totalCommanderDeaths = damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == null && damage[attrRoundId] == activeRound[attrRoundId]).map(damage => damage[flagCommanderDeaths]).reduce((a, b) => a + b, 0);
|
||||
const card = document.createElement('div');
|
||||
card.className = `player-card ${isEliminated ? 'eliminated' : ''}`;
|
||||
card.style.animationDelay = `${index * 0.1}s`;
|
||||
@@ -1755,7 +1830,7 @@ class PageMtgGame extends TableBasePage {
|
||||
<span>Commander Deaths:</span>
|
||||
<div class="death-counter">
|
||||
<button class="death-btn death-minus" data-player-id="${playerId}">−</button>
|
||||
<span class="death-display" data-player-id="${playerId}" ${attrValuePrevious}="${playerOwnDamage[flagCommanderDeaths]}">${playerOwnDamage[flagCommanderDeaths]}</span>
|
||||
<span class="death-display" data-player-id="${playerId}" ${attrValuePrevious}="${totalCommanderDeaths}">${totalCommanderDeaths}</span>
|
||||
<button class="death-btn death-plus" data-player-id="${playerId}">+</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1768,11 +1843,19 @@ class PageMtgGame extends TableBasePage {
|
||||
<div class="life-total">
|
||||
<input type="hidden" class="life-value" data-player-id="${playerId}" value="${life}">
|
||||
<div class="life-display" data-player-id="${playerId}" ${attrValuePrevious}="${life}">${life}</div>
|
||||
<div class="life-controls">
|
||||
<button class="life-btn" data-player-id="${playerId}" data-amount="-5">-5</button>
|
||||
<button class="life-btn" data-player-id="${playerId}" data-amount="-1">-1</button>
|
||||
<button class="life-btn" data-player-id="${playerId}" data-amount="1">+1</button>
|
||||
<button class="life-btn" data-player-id="${playerId}" data-amount="5">+5</button>
|
||||
<label>Gain</label>
|
||||
<div class="life-gain-controls">
|
||||
<button class="life-gain-btn" data-player-id="${playerId}" data-amount="-5">-5</button>
|
||||
<button class="life-gain-btn" data-player-id="${playerId}" data-amount="-1">-1</button>
|
||||
<button class="life-gain-btn" data-player-id="${playerId}" data-amount="1">+1</button>
|
||||
<button class="life-gain-btn" data-player-id="${playerId}" data-amount="5">+5</button>
|
||||
</div>
|
||||
<label>Loss</label>
|
||||
<div class="life-loss-controls">
|
||||
<button class="life-loss-btn" data-player-id="${playerId}" data-amount="-5">-5</button>
|
||||
<button class="life-loss-btn" data-player-id="${playerId}" data-amount="-1">-1</button>
|
||||
<button class="life-loss-btn" data-player-id="${playerId}" data-amount="1">+1</button>
|
||||
<button class="life-loss-btn" data-player-id="${playerId}" data-amount="5">+5</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1795,13 +1878,15 @@ class PageMtgGame extends TableBasePage {
|
||||
this.hookupPlayerCardEvents();
|
||||
}
|
||||
static renderCommanderDamageLog() {
|
||||
const roundDisplayOrderLabel = PageMtgGame.getRoundDisplayOrderLabel();
|
||||
const currentRoundDisplayOrder = Number(DOM.getElementValueCurrent(roundDisplayOrderLabel));
|
||||
const currentRoundDisplayOrder = PageMtgGame.getActiveRoundDisplayOrder();
|
||||
const damageTableBody = document.querySelector('.' + flagDamageLog + '.' + flagContainer + ' table tbody');
|
||||
damageTableBody.innerHTML = '';
|
||||
const previousRoundIds = rounds.filter(round => round[flagDisplayOrder] <= currentRoundDisplayOrder).map(round => round[attrRoundId]);
|
||||
let newTableBodyHtml = '';
|
||||
damageRecords.forEach(damage => {
|
||||
if (damage[flagActive] && (damage[flagCommanderDeaths] > 0 || damage[flagHealthChange] != 0 || damage[flagIsEliminated]) && rounds.filter(r => r[attrRoundId] == damage[attrRoundId])[0][flagDisplayOrder] <= currentRoundDisplayOrder) {
|
||||
if (damage[flagActive] && (damage[flagCommanderDeaths] > 0 || damage[flagLifeGain] != 0 || damage[flagLifeLoss] != 0 || damage[flagIsEliminated])
|
||||
// && rounds.filter(r => r[attrRoundId] == damage[attrRoundId])[0][flagDisplayOrder] <= currentRoundDisplayOrder
|
||||
&& previousRoundIds.includes(damage[attrRoundId])) {
|
||||
let round = rounds.filter(r => r[attrRoundId] == damage[attrRoundId])[0];
|
||||
let player = players.filter(p => p[attrPlayerId] == damage[attrPlayerId])[0];
|
||||
let receivedFromPlayer = damage[attrReceivedFromCommanderPlayerId] == null ? {
|
||||
@@ -1812,7 +1897,8 @@ class PageMtgGame extends TableBasePage {
|
||||
<td class="${attrRoundId}">${round[flagDisplayOrder]}</td>
|
||||
<td class="${attrPlayerId}">${player[flagName]}</td>
|
||||
<td class="${attrReceivedFromCommanderPlayerId}">${receivedFromPlayer[flagName]}</td>
|
||||
<td class="${flagHealthChange}">${damage[flagHealthChange]}</td>
|
||||
<td class="${flagLifeGain}">${damage[flagLifeGain]}</td>
|
||||
<td class="${flagLifeLoss}">${damage[flagLifeLoss]}</td>
|
||||
<td class="${flagCommanderDeaths}">${damage[flagCommanderDeaths]}</td>
|
||||
<td class="${flagIsEliminated}">${damage[flagIsEliminated]}</td>
|
||||
</tr>
|
||||
@@ -1828,8 +1914,10 @@ class PageMtgGame extends TableBasePage {
|
||||
[attrRoundId]: roundId,
|
||||
[attrPlayerId]: playerId,
|
||||
[attrReceivedFromCommanderPlayerId]: receivedFromCommanderPlayerId,
|
||||
[flagHealthChange]: 0,
|
||||
[flagLifeGain]: 0,
|
||||
[flagLifeLoss]: 0,
|
||||
[flagCommanderDeaths]: 0,
|
||||
[flagIsEliminated]: false,
|
||||
[flagActive]: true
|
||||
};
|
||||
}
|
||||
@@ -1852,10 +1940,13 @@ class PageMtgGame extends TableBasePage {
|
||||
}
|
||||
return roundId;
|
||||
}
|
||||
static getActiveRoundId() {
|
||||
static getActiveRoundDisplayOrder() {
|
||||
const roundDisplayOrderLabel = PageMtgGame.getRoundDisplayOrderLabel();
|
||||
const currentRoundDisplayOrder = Number(DOM.getElementValueCurrent(roundDisplayOrderLabel));
|
||||
let roundId = -1;
|
||||
return Number(DOM.getElementValueCurrent(roundDisplayOrderLabel));
|
||||
}
|
||||
static getActiveRoundId() {
|
||||
const currentRoundDisplayOrder = PageMtgGame.getActiveRoundDisplayOrder();
|
||||
let roundId = 0;
|
||||
if (rounds.length > 0) {
|
||||
let filteredRounds = rounds.filter(round => round[flagDisplayOrder] == currentRoundDisplayOrder);
|
||||
if (filteredRounds.length > 0) roundId = filteredRounds[0][attrRoundId];
|
||||
@@ -1878,11 +1969,14 @@ class PageMtgGame extends TableBasePage {
|
||||
return player[flagName] || `${user == null ? 'Error' : user[flagName]} - ${deck == null ? 'Error' : deck[flagName]}`;
|
||||
}
|
||||
static renderCommanderDamageRows(playerId) {
|
||||
// const roundId = PageMtgGame.getLatestRoundId();
|
||||
const activeRoundDisplayOrder = PageMtgGame.getActiveRoundDisplayOrder();
|
||||
const previousRoundIds = rounds.filter(round => round[flagDisplayOrder] <= activeRoundDisplayOrder).map(round => round[attrRoundId]);
|
||||
return players.filter(otherPlayer => otherPlayer[attrPlayerId] !== playerId).map(otherPlayer => {
|
||||
const sourceId = otherPlayer[attrPlayerId];
|
||||
let otherPlayerDisplayName = PageMtgGame.makePlayerDisplayName(sourceId);
|
||||
const totalDamage = damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId).map(damage => -damage[flagHealthChange]).reduce((acc, curr) => acc + curr, 0);
|
||||
const totalDamage = damageRecords.filter(damage => damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == sourceId
|
||||
// && damage[attrRoundId] == roundId
|
||||
&& previousRoundIds.includes(damage[attrRoundId])).map(damage => damage[flagLifeLoss]).reduce((acc, curr) => acc + curr, 0);
|
||||
const isLethal = totalDamage >= 21;
|
||||
return `
|
||||
<div class="damage-row" data-player-id="${playerId}" data-source-id="${sourceId}">
|
||||
@@ -1922,15 +2016,31 @@ class PageMtgGame extends TableBasePage {
|
||||
};
|
||||
}
|
||||
hookupPlayerCardEvents() {
|
||||
// Life buttons
|
||||
let lifeButtonSelector = '.life-btn';
|
||||
Events.hookupEventHandler("click", lifeButtonSelector, (event, button) => {
|
||||
// Life gain buttons
|
||||
let lifeGainButtonSelector = '.life-gain-btn';
|
||||
Events.hookupEventHandler("click", lifeGainButtonSelector, (event, button) => {
|
||||
const playerId = button.dataset.playerId;
|
||||
const amount = parseInt(button.dataset.amount);
|
||||
const activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
const damageIndex = damageRecords.findIndex(damage => damage[attrRoundId] == activeRoundId && damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == null);
|
||||
this.changeLife(playerId // playerId
|
||||
, amount // amount
|
||||
, true // isLifeGainNotLoss
|
||||
, true // updateDamage
|
||||
, damageIndex // damageIndex
|
||||
);
|
||||
});
|
||||
|
||||
// Life loss buttons
|
||||
let lifeLossButtonSelector = '.life-loss-btn';
|
||||
Events.hookupEventHandler("click", lifeLossButtonSelector, (event, button) => {
|
||||
const playerId = button.dataset.playerId;
|
||||
const amount = parseInt(button.dataset.amount);
|
||||
const activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
const damageIndex = damageRecords.findIndex(damage => damage[attrRoundId] == activeRoundId && damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] == null);
|
||||
this.changeLife(playerId // playerId
|
||||
, amount // amount
|
||||
, false // isLifeGainNotLoss
|
||||
, true // updateDamage
|
||||
, damageIndex // damageIndex
|
||||
);
|
||||
@@ -1962,19 +2072,21 @@ class PageMtgGame extends TableBasePage {
|
||||
this.toggleEliminate(playerId);
|
||||
});
|
||||
}
|
||||
changeLife(playerId, amount, updateDamage = false, damageIndex = null) {
|
||||
changeLife(playerId, amount, isLifeGainNotLoss = false, updateDamage = false, damageIndex = null) {
|
||||
const card = document.querySelector(`.player-card[data-player-id="${playerId}"]`);
|
||||
if (!card || card.classList.contains('eliminated')) return;
|
||||
// if (!card || card.classList.contains('eliminated')) return;
|
||||
|
||||
const lifeInput = card.querySelector(`.life-value[data-player-id="${playerId}"]`);
|
||||
const lifeDisplay = card.querySelector(`.life-display[data-player-id="${playerId}"]`);
|
||||
const currentLife = parseInt(lifeInput.value) || 0;
|
||||
const newLife = Math.max(0, currentLife + amount);
|
||||
const newLife = currentLife + amount * (isLifeGainNotLoss ? 1 : -1);
|
||||
DOM.setElementAttributeValueCurrent(lifeDisplay, newLife);
|
||||
DOM.isElementDirty(lifeDisplay);
|
||||
lifeInput.value = newLife;
|
||||
lifeDisplay.textContent = newLife;
|
||||
if (updateDamage) {
|
||||
damageRecords[damageIndex][flagHealthChange] += amount;
|
||||
let fieldFlag = isLifeGainNotLoss ? flagLifeGain : flagLifeLoss;
|
||||
damageRecords[damageIndex][fieldFlag] += amount;
|
||||
}
|
||||
PageMtgGame.renderCommanderDamageLog();
|
||||
|
||||
@@ -1983,7 +2095,8 @@ class PageMtgGame extends TableBasePage {
|
||||
}
|
||||
changeCommanderDamage(playerId, sourceId, amount) {
|
||||
const card = document.querySelector(`.player-card[data-player-id="${playerId}"]`);
|
||||
if (!card || card.classList.contains('eliminated')) return;
|
||||
// if (!card || card.classList.contains('eliminated')) return;
|
||||
|
||||
const damageInput = card.querySelector(`.damage-value[data-player-id="${playerId}"][data-source-id="${sourceId}"]`);
|
||||
const damageDisplay = card.querySelector(`.damage-display[data-player-id="${playerId}"][data-source-id="${sourceId}"]`);
|
||||
const currentDamage = parseInt(damageInput.value) || 0;
|
||||
@@ -2002,9 +2115,11 @@ class PageMtgGame extends TableBasePage {
|
||||
}
|
||||
const activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
const damageIndex = damageRecords.findIndex(damageRecord => damageRecord[attrRoundId] == activeRoundId && damageRecord[attrPlayerId] == playerId && damageRecord[attrReceivedFromCommanderPlayerId] == sourceId);
|
||||
damageRecords[damageIndex][flagHealthChange] -= amount;
|
||||
damageRecords[damageIndex][flagLifeLoss] += amount;
|
||||
let isLifeGainNotLoss = false;
|
||||
this.changeLife(playerId // playerId
|
||||
, -amount // amount
|
||||
, isLifeGainNotLoss // isLifeGainNotLoss
|
||||
, false // updateDamage
|
||||
, damageIndex // damageIndex
|
||||
);
|
||||
@@ -2012,7 +2127,8 @@ class PageMtgGame extends TableBasePage {
|
||||
}
|
||||
changeCommanderDeaths(playerId, amount) {
|
||||
const card = document.querySelector(`.player-card[data-player-id="${playerId}"]`);
|
||||
if (!card || card.classList.contains('eliminated')) return;
|
||||
// if (!card || card.classList.contains('eliminated')) return;
|
||||
|
||||
const deathDisplay = card.querySelector(`.death-display[data-player-id="${playerId}"]`);
|
||||
const currentDeaths = parseInt(deathDisplay.textContent) || 0;
|
||||
const newDeaths = Math.max(0, currentDeaths + amount);
|
||||
@@ -2064,14 +2180,14 @@ class PageMtgGame extends TableBasePage {
|
||||
[flagDisplayOrder]: index
|
||||
});
|
||||
});
|
||||
let activeRoundId = PageMtgGame.getActiveRoundId();
|
||||
let activeRoundDisplayOrder = PageMtgGame.getActiveRoundDisplayOrder();
|
||||
let newPlayerGridInnerHTML = '';
|
||||
let playerIdA, playerIdB, isEliminatedAsIntA, isEliminatedAsIntB, playerA, playerB, indexPlayerCard;
|
||||
playerCardMetas.sort((a, b) => {
|
||||
playerIdA = a[attrPlayerId];
|
||||
playerIdB = b[attrPlayerId];
|
||||
isEliminatedAsIntA = PageMtgGame.isPlayerEliminated(playerIdA, activeRoundId) ? 1 : 0;
|
||||
isEliminatedAsIntB = PageMtgGame.isPlayerEliminated(playerIdB, activeRoundId) ? 1 : 0;
|
||||
isEliminatedAsIntA = PageMtgGame.isPlayerEliminated(playerIdA, activeRoundDisplayOrder) ? 1 : 0;
|
||||
isEliminatedAsIntB = PageMtgGame.isPlayerEliminated(playerIdB, activeRoundDisplayOrder) ? 1 : 0;
|
||||
playerA = players.filter(p => p[attrPlayerId] == playerIdA)[0];
|
||||
playerB = players.filter(p => p[attrPlayerId] == playerIdB)[0];
|
||||
return players.length * isEliminatedAsIntA + playerA[flagDisplayOrder] - (players.length * isEliminatedAsIntB + playerB[flagDisplayOrder]);
|
||||
@@ -2085,18 +2201,31 @@ class PageMtgGame extends TableBasePage {
|
||||
});
|
||||
this.hookupPlayerCardEvents();
|
||||
}
|
||||
static isPlayerEliminated(playerId, roundId = null) {
|
||||
if (roundId == null) roundId = PageMtgGame.getActiveRoundId();
|
||||
let hasDamageWithIsEliminated = damageRecords.filter(damage => damage[attrRoundId] <= roundId && damage[attrPlayerId] == playerId && damage[flagIsEliminated]).length > 0;
|
||||
static isPlayerEliminated(playerId, roundDisplayOrder = null) {
|
||||
if (roundDisplayOrder == null) roundDisplayOrder = PageMtgGame.getActiveRoundDisplayOrder();
|
||||
const filteredRoundIds = rounds.filter(round => round[flagDisplayOrder] <= roundDisplayOrder).map(round => round[attrRoundId]);
|
||||
let hasDamageWithIsEliminated = damageRecords.filter(damage =>
|
||||
// damage[attrRoundId] <= roundDisplayOrder
|
||||
filteredRoundIds.includes(damage[attrRoundId]) && damage[attrPlayerId] == playerId && damage[flagIsEliminated]).length > 0;
|
||||
let damageFromOtherPlayers = {};
|
||||
let otherPlayerId;
|
||||
damageRecords.filter(damage => damage[attrRoundId] <= roundId && damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] != null).forEach(damage => {
|
||||
damageRecords.filter(damage =>
|
||||
// damage[attrRoundId] <= roundId
|
||||
filteredRoundIds.includes(damage[attrRoundId]) && damage[attrPlayerId] == playerId && damage[attrReceivedFromCommanderPlayerId] != null).forEach(damage => {
|
||||
otherPlayerId = damage[attrReceivedFromCommanderPlayerId];
|
||||
damageFromOtherPlayers[otherPlayerId] = damage[flagHealthChange] + (damageFromOtherPlayers[otherPlayerId] == null ? 0 : damageFromOtherPlayers[otherPlayerId]);
|
||||
damageFromOtherPlayers[otherPlayerId] = damage[flagLifeLoss] + (damageFromOtherPlayers[otherPlayerId] == null ? 0 : damageFromOtherPlayers[otherPlayerId]);
|
||||
});
|
||||
let maxDamageFromOtherCommander = Object.keys(damageFromOtherPlayers).map(playerId => damageFromOtherPlayers[playerId]).reduce((acc, cur) => Math.max(acc, cur), 0);
|
||||
let totalDamageTaken = damageRecords.filter(damage =>
|
||||
// damage[attrRoundId] <= roundId
|
||||
filteredRoundIds.includes(damage[attrRoundId]) && damage[attrPlayerId] == playerId).map(damage => damage[flagLifeLoss] - damage[flagLifeGain]).reduce((a, b) => a + b, 0);
|
||||
console.log({
|
||||
roundDisplayOrder,
|
||||
filteredRoundIds,
|
||||
hasDamageWithIsEliminated,
|
||||
maxDamageFromOtherCommander,
|
||||
totalDamageTaken
|
||||
});
|
||||
let maxDamageFromOtherCommander = Math.max(Object.keys(damageFromOtherPlayers).map(playerId => damageFromOtherPlayers[playerId]));
|
||||
// .reduce((acc, cur) => acc + cur, 0);
|
||||
let totalDamageTaken = damageRecords.filter(damage => damage[attrRoundId] <= roundId && damage[attrPlayerId] == playerId).map(damage => damage[flagHealthChange]).reduce((acc, cur) => acc + cur, 0);
|
||||
return hasDamageWithIsEliminated || maxDamageFromOtherCommander >= 21 || totalDamageTaken >= startingLife;
|
||||
}
|
||||
static updatePlayerSetup() {
|
||||
@@ -2156,7 +2285,8 @@ class PageMtgGame extends TableBasePage {
|
||||
nameInput = playerSetupWrapper.querySelector('.playerName input');
|
||||
userId = DOM.getElementValueCurrent(userDdl);
|
||||
deckId = DOM.getElementValueCurrent(deckDdl);
|
||||
name = nameInput ? nameInput.value.trim() || `Player ${i + 1}` : `Player ${i + 1}`;
|
||||
name = nameInput ? nameInput.value.trim() || null : null; // `Player ${i + 1}` : `Player ${i + 1}`;
|
||||
|
||||
playerId = playerSetupWrapper.getAttribute(attrPlayerId);
|
||||
player = players.filter(p => p[attrPlayerId] == playerId)[0];
|
||||
playersToSave.push({
|
||||
@@ -2272,12 +2402,32 @@ class PageMtgGames extends TableBasePage {
|
||||
}
|
||||
initialize() {
|
||||
this.sharedInitialize();
|
||||
}
|
||||
hookupFilters() {
|
||||
/*
|
||||
this.sharedHookupFilters();
|
||||
this.hookupFilterActive();
|
||||
*/
|
||||
}
|
||||
loadRowTable(rowJson) {
|
||||
if (rowJson == null) return;
|
||||
if (_verbose) {
|
||||
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
|
||||
}
|
||||
}
|
||||
getJsonRow(row) {
|
||||
return;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {}
|
||||
postInitialiseRowNewCallback(tbody) {}
|
||||
hookupTableMain() {
|
||||
super.hookupTableMain();
|
||||
// this.hookupTableMainRows();
|
||||
this.hookupTcgGames();
|
||||
// PageMtgGames.hideNewGameForm();
|
||||
}
|
||||
hookupTcgGames() {
|
||||
this.initGamesPage();
|
||||
}
|
||||
initGamesPage() {
|
||||
console.log("hookupTableMain PageMtgGames");
|
||||
// Initialize form submission
|
||||
const newGameForm = document.getElementById('newGameForm');
|
||||
if (newGameForm) {
|
||||
@@ -2322,7 +2472,7 @@ class PageMtgGames extends TableBasePage {
|
||||
static showNewGameForm() {
|
||||
const modal = document.getElementById('newGameModal');
|
||||
if (modal) {
|
||||
modal.classList.remove('hidden');
|
||||
modal.classList.remove(flagIsCollapsed);
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
||||
// Focus on first input
|
||||
@@ -2335,7 +2485,7 @@ class PageMtgGames extends TableBasePage {
|
||||
static hideNewGameForm() {
|
||||
const modal = document.getElementById('newGameModal');
|
||||
if (modal) {
|
||||
modal.classList.add('hidden');
|
||||
modal.classList.add(flagIsCollapsed);
|
||||
document.body.style.overflow = '';
|
||||
|
||||
// Reset form
|
||||
@@ -2425,7 +2575,7 @@ class PageMtgGames extends TableBasePage {
|
||||
if (errorLabel) {
|
||||
errorLabel.textContent = message;
|
||||
}
|
||||
errorOverlay.classList.remove('hidden');
|
||||
errorOverlay.classList.remove(flagIsCollapsed);
|
||||
errorOverlay.style.display = 'flex';
|
||||
} else {
|
||||
// Fallback to alert
|
||||
@@ -2754,6 +2904,7 @@ class PageUsers extends TableBasePage {
|
||||
|
||||
|
||||
|
||||
|
||||
// Legal
|
||||
|
||||
|
||||
@@ -2774,6 +2925,10 @@ class Router {
|
||||
this.pages = {};
|
||||
// Core
|
||||
// TCG
|
||||
this.pages[hashPageMtgDecks] = {
|
||||
name: 'PageMtgDecks',
|
||||
module: PageMtgDecks
|
||||
};
|
||||
this.pages[hashPageMtgGame] = {
|
||||
name: 'PageMtgGame',
|
||||
module: PageMtgGame
|
||||
@@ -2818,6 +2973,7 @@ class Router {
|
||||
this.routes = {};
|
||||
// Core
|
||||
// TCG
|
||||
this.routes[hashPageMtgDecks] = (isPopState = false) => this.navigateToHash(hashPageMtgDecks, isPopState);
|
||||
this.routes[hashPageMtgGame] = (isPopState = false) => this.navigateToHash(hashPageMtgGame, isPopState);
|
||||
this.routes[hashPageMtgGames] = (isPopState = false) => this.navigateToHash(hashPageMtgGames, isPopState);
|
||||
this.routes[hashPageMtgHome] = (isPopState = false) => this.navigateToHash(hashPageMtgHome, isPopState);
|
||||
|
||||
2
static/dist/js/main.bundle.js.map
vendored
2
static/dist/js/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
17
static/dist/js/tcg_decks.bundle.js
vendored
Normal file
17
static/dist/js/tcg_decks.bundle.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
||||
(() => {
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
})();
|
||||
|
||||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
||||
(() => {
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=tcg_decks.bundle.js.map
|
||||
1
static/dist/js/tcg_decks.bundle.js.map
vendored
Normal file
1
static/dist/js/tcg_decks.bundle.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"js/tcg_decks.bundle.js","mappings":";;;;AAAA;;;;;;ACAA","sources":["webpack://app/./static/css/sections/tcg.css?b213","webpack://app/./static/css/pages/tcg/decks.css?c1be"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};"],"names":[],"sourceRoot":""}
|
||||
Reference in New Issue
Block a user