fix npc drop

All NPCs are dragging onto the table as a blank character sheet, not their NPC sheet. This is a fix for this issue.
This commit is contained in:
Miguel Peres
2026-03-06 08:13:38 -03:00
parent 8e7f39ac41
commit 5eb5a2bb99
2 changed files with 984 additions and 461 deletions
+260 -107
View File
@@ -1,111 +1,4 @@
@import url("https://fonts.googleapis.com/css?family=Material+Icons|Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200|Material+Icons+Outlined|El+Messiri|IM+Fell+Double+Pica&display=swap");
.tabs__container:not(.k-active-tab) {
display: none !important;
}
.tabs__nav-item {
list-style: none;
}
.tabs__nav-list {
display: flex;
}
.ui-dialog .tab-content .charsheet {
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.ui-dialog .tab-content .charsheet .kmodal__button {
all: initial;
display: flex;
margin: 0;
padding: 0;
cursor: pointer;
}
.ui-dialog .tab-content .charsheet .kmodal__checkbox {
display: none;
}
.ui-dialog .tab-content .charsheet .kmodal__outer {
opacity: 0;
visibility: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: left;
background: var(--kmodal-overlay-background);
transition: opacity 0.25s ease;
z-index: 999;
}
.ui-dialog .tab-content .charsheet .kmodal__background {
all: initial;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: pointer;
}
.ui-dialog .tab-content .charsheet .kmodal__inner {
position: fixed;
width: var(--kmodal-width);
height: var(--kmodal-height);
inset: 0;
margin: auto;
overflow: auto;
background: var(--kmodal-dialog-background);
border-radius: 5px;
padding: var(--kmodal-close-height) calc(var(--kmodal-close-width) * 3) var(--kmodal-close-height) calc(var(--kmodal-close-width) * 2);
max-width: var(--kmodal-max-width);
max-height: var(--kmodal-max-height);
transition: opacity 0.25s ease;
box-shadow: var(--kmodal-box-shadow);
}
.ui-dialog .tab-content .charsheet .kmodal__close {
position: absolute;
right: var(--kmodal-close-width);
top: var(--kmodal-close-height);
width: var(--kmodal-close-width);
height: var(--kmodal-close-height);
cursor: pointer;
}
.ui-dialog .tab-content .charsheet .kmodal__close:after,
.ui-dialog .tab-content .charsheet .kmodal__close:before {
content: "";
position: absolute;
width: var(--kmodal-close-line-thickness);
height: var(--kmodal-close-line-length);
background: var(--kmodal-close-color);
display: block;
transform: rotate(45deg);
left: 50%;
margin: -3px 0 0 -1px;
top: 0;
}
.ui-dialog .tab-content .charsheet .kmodal__close:hover:after,
.ui-dialog .tab-content .charsheet .kmodal__close:hover:before {
background: var(--kmodal-close-hover-color);
}
.ui-dialog .tab-content .charsheet .kmodal__close:before {
transform: rotate(-45deg);
}
.ui-dialog .tab-content .charsheet .kmodal__checkbox:not(:checked) + .kmodal__outer {
display: none;
}
.ui-dialog .tab-content .charsheet .kmodal__checkbox:checked + .kmodal__outer {
opacity: 1;
visibility: visible;
}
.ui-dialog .tab-content .charsheet .kmodal__checkbox:checked + .kmodal__outer .kmodal__inner {
top: 0;
}
.sheet-rolltemplate-dcc {
--font1:var(--topHeadFont);
--font2:var(--topHeadFont);
@@ -299,6 +192,11 @@
--error-red: var(--lm-error-red);
color: var(--fontColor);
font-family: var(--contentHeadFont);
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.sheet-rolltemplate-dcc:not(:first-child) {
margin-top: 10px;
@@ -1195,6 +1093,113 @@
font-size: 12px;
content: "add";
}
.sheet-rolltemplate-dcc .kmodal__button {
all: initial;
display: flex;
margin: 0;
padding: 0;
cursor: pointer;
}
.sheet-rolltemplate-dcc .kmodal__checkbox[type=checkbox] {
display: none;
}
.sheet-rolltemplate-dcc .kmodal__outer {
opacity: 0;
visibility: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: left;
background: var(--kmodal-overlay-background);
transition: opacity 0.25s ease;
z-index: 999;
}
.sheet-rolltemplate-dcc .kmodal__background {
all: initial;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: pointer;
}
.sheet-rolltemplate-dcc .kmodal__inner {
position: fixed;
width: var(--kmodal-width);
height: var(--kmodal-height);
inset: 0;
margin: auto;
overflow: auto;
background: var(--kmodal-dialog-background);
border-radius: 5px;
padding: var(--kmodal-close-height) calc(var(--kmodal-close-width) * 3) var(--kmodal-close-height) calc(var(--kmodal-close-width) * 2);
max-width: var(--kmodal-max-width);
max-height: var(--kmodal-max-height);
transition: opacity 0.25s ease;
box-shadow: var(--kmodal-box-shadow);
}
.sheet-rolltemplate-dcc .kmodal__close {
position: absolute;
right: var(--kmodal-close-width);
top: var(--kmodal-close-height);
width: var(--kmodal-close-width);
height: var(--kmodal-close-height);
cursor: pointer;
}
.sheet-rolltemplate-dcc .kmodal__close:after,
.sheet-rolltemplate-dcc .kmodal__close:before {
content: "";
position: absolute;
width: var(--kmodal-close-line-thickness);
height: var(--kmodal-close-line-length);
background: var(--kmodal-close-color);
display: block;
transform: rotate(45deg);
left: 50%;
margin: -3px 0 0 -1px;
top: 0;
}
.sheet-rolltemplate-dcc .kmodal__close:hover:after,
.sheet-rolltemplate-dcc .kmodal__close:hover:before {
background: var(--kmodal-close-hover-color);
}
.sheet-rolltemplate-dcc .kmodal__close:before {
transform: rotate(-45deg);
}
.sheet-rolltemplate-dcc .kmodal__checkbox:not(:checked) + .kmodal__outer {
display: none;
}
.sheet-rolltemplate-dcc .kmodal__checkbox:checked + .kmodal__outer {
opacity: 1;
visibility: visible;
}
.sheet-rolltemplate-dcc .kmodal__checkbox:checked + .kmodal__outer .kmodal__inner {
top: 0;
}
.sheet-rolltemplate-dcc .tabs__container:not(.k-active-tab) {
display: none !important;
}
.sheet-rolltemplate-dcc .tabs__nav-item {
list-style: none;
}
.sheet-rolltemplate-dcc .tabs__nav-list {
display: flex;
}
.sheet-rolltemplate-dcc a:not([href^="~"]):not([href^="!"]) {
color: inherit;
}
.sheet-rolltemplate-dcc a:is([href^="~"], [href^="!"]) {
padding: 0;
border: 0 solid transparent;
background-color: transparent;
color: inherit;
font-weight: 700;
font-size: 1.2em;
}
.sheet-rolltemplate-dcc .userscript-roll {
position: relative;
}
@@ -1550,6 +1555,11 @@ body .ui-dialog .nav-tabs a {
font-family: var(--font3);
}
body .ui-dialog .tab-content .charsheet {
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 2px;
--_margin: 1rem;
margin: 0;
@@ -2419,6 +2429,102 @@ body .ui-dialog .tab-content .charsheet .repcontrol-button--add::before {
font-size: 12px;
content: "add";
}
body .ui-dialog .tab-content .charsheet .kmodal__button {
all: initial;
display: flex;
margin: 0;
padding: 0;
cursor: pointer;
}
body .ui-dialog .tab-content .charsheet .kmodal__checkbox[type=checkbox] {
display: none;
}
body .ui-dialog .tab-content .charsheet .kmodal__outer {
opacity: 0;
visibility: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: left;
background: var(--kmodal-overlay-background);
transition: opacity 0.25s ease;
z-index: 999;
}
body .ui-dialog .tab-content .charsheet .kmodal__background {
all: initial;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: pointer;
}
body .ui-dialog .tab-content .charsheet .kmodal__inner {
position: fixed;
width: var(--kmodal-width);
height: var(--kmodal-height);
inset: 0;
margin: auto;
overflow: auto;
background: var(--kmodal-dialog-background);
border-radius: 5px;
padding: var(--kmodal-close-height) calc(var(--kmodal-close-width) * 3) var(--kmodal-close-height) calc(var(--kmodal-close-width) * 2);
max-width: var(--kmodal-max-width);
max-height: var(--kmodal-max-height);
transition: opacity 0.25s ease;
box-shadow: var(--kmodal-box-shadow);
}
body .ui-dialog .tab-content .charsheet .kmodal__close {
position: absolute;
right: var(--kmodal-close-width);
top: var(--kmodal-close-height);
width: var(--kmodal-close-width);
height: var(--kmodal-close-height);
cursor: pointer;
}
body .ui-dialog .tab-content .charsheet .kmodal__close:after,
body .ui-dialog .tab-content .charsheet .kmodal__close:before {
content: "";
position: absolute;
width: var(--kmodal-close-line-thickness);
height: var(--kmodal-close-line-length);
background: var(--kmodal-close-color);
display: block;
transform: rotate(45deg);
left: 50%;
margin: -3px 0 0 -1px;
top: 0;
}
body .ui-dialog .tab-content .charsheet .kmodal__close:hover:after,
body .ui-dialog .tab-content .charsheet .kmodal__close:hover:before {
background: var(--kmodal-close-hover-color);
}
body .ui-dialog .tab-content .charsheet .kmodal__close:before {
transform: rotate(-45deg);
}
body .ui-dialog .tab-content .charsheet .kmodal__checkbox:not(:checked) + .kmodal__outer {
display: none;
}
body .ui-dialog .tab-content .charsheet .kmodal__checkbox:checked + .kmodal__outer {
opacity: 1;
visibility: visible;
}
body .ui-dialog .tab-content .charsheet .kmodal__checkbox:checked + .kmodal__outer .kmodal__inner {
top: 0;
}
body .ui-dialog .tab-content .charsheet .tabs__container:not(.k-active-tab) {
display: none !important;
}
body .ui-dialog .tab-content .charsheet .tabs__nav-item {
list-style: none;
}
body .ui-dialog .tab-content .charsheet .tabs__nav-list {
display: flex;
}
body .ui-dialog .tab-content .charsheet .display-control--inverted:checked + .controlled-display, body .ui-dialog .tab-content .charsheet .display-control:not(:checked) + .controlled-display {
display: none;
}
@@ -3253,6 +3359,53 @@ body .ui-dialog .tab-content .charsheet .mancer-create .modal-button--thick {
body .ui-dialog .tab-content .charsheet .modal-button--content {
place-self: center start;
}
body .ui-dialog .tab-content .charsheet .progress-spinner {
position: absolute;
z-index: 1000;
inset: 0;
background-color: color-mix(in lch, black, transparent 30%);
display: grid;
place-items: center;
}
body .ui-dialog .tab-content .charsheet .progress-spinner.inactive {
display: none;
}
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader, body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:before, body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:after {
border-radius: 50%;
width: 2.5em;
height: 2.5em;
animation-fill-mode: both;
animation: bblFadInOut 1.8s infinite ease-in-out;
}
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader {
color: var(--primary-color);
font-size: 7px;
position: relative;
text-indent: -9999em;
transform: translateZ(0);
animation-delay: -0.16s;
}
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:before,
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:after {
content: "";
position: absolute;
top: 0;
}
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:before {
left: -3.5em;
animation-delay: -0.32s;
}
body .ui-dialog .tab-content .charsheet .progress-spinner:not(.inactive) .loader:after {
left: 3.5em;
}
@keyframes bblFadInOut {
0%, 80%, 100% {
box-shadow: 0 2.5em 0 -1.3em;
}
40% {
box-shadow: 0 2.5em 0 0;
}
}
body .ui-dialog .tab-content .charsheet .mancer-nav-container {
pointer-events: none;
}
+724 -354
View File
File diff suppressed because one or more lines are too long