feat: 턴 선택기에 복합 커맨드 선택 적용 #199
@@ -245,11 +245,6 @@ div.bar_out div.bar_in {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.commandBasic {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.compensatePositive {
|
||||
color: skyblue;
|
||||
}
|
||||
@@ -258,10 +253,6 @@ div.bar_out div.bar_in {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.compensateNeutral {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.commandBasic.commandImpossible {
|
||||
background-color: red;
|
||||
color: white;
|
||||
|
||||
+4
-2
@@ -475,10 +475,12 @@ function getCommandTable(General $general){
|
||||
if (!$commandObj->canDisplay()) {
|
||||
continue;
|
||||
}
|
||||
$subList[Util::getClassNameFromObj($commandObj)] = [
|
||||
'compansation'=>$commandObj->getCompensationStyle(),
|
||||
$subList[] = [
|
||||
'value'=>Util::getClassNameFromObj($commandObj),
|
||||
'compensation'=>$commandObj->getCompensationStyle(),
|
||||
'possible'=>$commandObj->hasMinConditionMet(),
|
||||
'title'=>$commandObj->getCommandDetailTitle(),
|
||||
'simpleName'=>$commandObj->getName(),
|
||||
'reqArg'=>$commandObj::$reqArg,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ use sammo\MustNotBeReachedException;
|
||||
|
||||
class che_랜덤임관 extends Command\GeneralCommand
|
||||
{
|
||||
static protected $actionName = '랜덤임관';
|
||||
static protected $actionName = '무작위 국가로 임관';
|
||||
|
||||
protected function argTest(): bool
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ use sammo\CityConst;
|
||||
|
||||
|
||||
class che_장수대상임관 extends Command\GeneralCommand{
|
||||
static protected $actionName = '따라 임관';
|
||||
static protected $actionName = '장수를 따라 임관';
|
||||
static public $reqArg = true;
|
||||
|
||||
protected function argTest():bool{
|
||||
|
||||
Vendored
+2
-1
@@ -11,4 +11,5 @@ $input-color: #303030;
|
||||
@import "./bootswatch_custom_variables.scss";
|
||||
@import "../../node_modules/bootstrap5/scss/bootstrap.scss";
|
||||
@import "./bootswatch_custom.scss";
|
||||
@import "./bootstrap_sammo.scss";
|
||||
@import "./bootstrap_sammo.scss";
|
||||
@import "./vue-multiselect.scss";
|
||||
@@ -1,10 +1,9 @@
|
||||
$container-max-widths: (
|
||||
sm: 500px,
|
||||
md: 500px,
|
||||
lg: 1020px,
|
||||
xl: 1140px,
|
||||
xxl: 1320px
|
||||
) !default;
|
||||
);
|
||||
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
|
||||
+12
-12
@@ -247,26 +247,26 @@ div.bar_out div.bar_in {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.commandBasic {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.compensatePositive {
|
||||
color: skyblue;
|
||||
color: $cyan;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNegative {
|
||||
color: orange;
|
||||
color: $red;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNeutral {
|
||||
color: white;
|
||||
.compensateNeutral{
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.commandBasic.commandImpossible {
|
||||
background-color: red;
|
||||
color: white;
|
||||
.commandImpossible {
|
||||
color: $red;
|
||||
text-decoration: line-through $red;
|
||||
}
|
||||
|
||||
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
|
||||
|
||||
@@ -3,15 +3,13 @@ $base2color: #00582c;
|
||||
$base3color: #704615;
|
||||
$base4color: #70153b;
|
||||
|
||||
$sammoColors: (
|
||||
'base1': $base1color,
|
||||
$sammoColors: ('base1': $base1color,
|
||||
'base2': $base2color,
|
||||
'base3': $base3color,
|
||||
'base4': $base4color,
|
||||
);
|
||||
|
||||
$nationColors: (
|
||||
"000000": #000000,
|
||||
$nationColors: ("000000": #000000,
|
||||
"FF0000": #FF0000,
|
||||
"800000": #800000,
|
||||
"A0522D": #A0522D,
|
||||
|
||||
@@ -0,0 +1,555 @@
|
||||
@use "sass:math";
|
||||
$vue-multiselect-disabled-bg: $gray-400;
|
||||
|
||||
$vue-multiselect-padding-x: $form-select-padding-x !default;
|
||||
$vue-multiselect-padding-y: $form-select-padding-y !default;
|
||||
$vue-multiselect-min-height: $input-height !default;
|
||||
$vue-multiselect-border-radius: $border-radius !default;
|
||||
$vue-multiselect-border-color: $form-select-border-color !default;
|
||||
$vue-multiselect-border-width: 1px !default;
|
||||
$vue-multiselect-disabled-opacity: $btn-disabled-opacity !default;
|
||||
$vue-multiselect-placeholder-color: $text-muted !default;
|
||||
$vue-multiselect-bg: $form-select-bg !default;
|
||||
$vue-multiselect-color: $form-select-color !default;
|
||||
$vue-multiselect-disabled-bg: $form-select-disabled-bg !default;
|
||||
$vue-multiselect-disabled-color: $form-select-disabled-color !default;
|
||||
|
||||
$vue-multiselect-option-selected-bg: $dark !default;
|
||||
$vue-multiselect-option-selected-color: $body-color !default;
|
||||
$vue-multiselect-option-highlight-color: #fff !default;
|
||||
$vue-multiselect-option-highlight-bg: $primary !default;
|
||||
$vue-multiselect-option-selected-highlight-color: #fff !default;
|
||||
$vue-multiselect-option-selected-highlight-bg: $secondary !default;
|
||||
|
||||
$vue-multiselect-tag-color: $dark !default;
|
||||
$vue-multiselect-tag-bg: $light !default;
|
||||
$vue-multiselect-tag-font-size: $badge-font-size !default;
|
||||
$vue-multiselect-tag-font-weight: normal !default;
|
||||
$vue-multiselect-tag-icon-size: 1.7rem !default;
|
||||
$vue-multiselect-tag-icon-color: $vue-multiselect-tag-color !default;
|
||||
$vue-multiselect-tag-icon-color-hover: white !default;
|
||||
$vue-multiselect-tag-icon-bg-hover: $danger !default;
|
||||
$vue-multiselect-tag-padding-x: .4rem !default;
|
||||
$vue-multiselect-tag-padding-y: .25rem !default;
|
||||
$vue-multiselect-tag-border-radius: $badge-border-radius !default;
|
||||
|
||||
$vue-multiselect-arrow-color: $form-select-color !default;
|
||||
$vue-multiselect-arrow-size: 5px !default;
|
||||
$vue-multiselect-arrow-padding: 8px !default;
|
||||
|
||||
$vue-multiselect-spinner-size: 16px !default;
|
||||
$vue-multiselect-spinner-thickness: 2px !default;
|
||||
$vue-multiselect-spinner-margin: math.div(-$vue-multiselect-spinner-size, 2) !default;
|
||||
$vue-multiselect-spinner-color: $dark !default;
|
||||
|
||||
// --------------------------------
|
||||
// Select field
|
||||
//--
|
||||
|
||||
fieldset[disabled] .multiselect {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect,
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.multiselect {
|
||||
box-sizing: content-box;
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
text-align: left;
|
||||
color: $vue-multiselect-color;
|
||||
|
||||
& * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
pointer-events: none;
|
||||
opacity: $vue-multiselect-disabled-opacity;
|
||||
}
|
||||
|
||||
.multiselect--active {
|
||||
z-index: 50;
|
||||
|
||||
&:not(.multiselect--above) .multiselect__current,
|
||||
&:not(.multiselect--above) .multiselect__input,
|
||||
&:not(.multiselect--above) .multiselect__tags {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
& .multiselect__select {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--above.multiselect--active .multiselect__current,
|
||||
.multiselect--above.multiselect--active .multiselect__input,
|
||||
.multiselect--above.multiselect--active .multiselect__tags {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
min-height: $vue-multiselect-min-height / 2;
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
border: none;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
background: $vue-multiselect-bg;
|
||||
padding: 0 0 0 $vue-multiselect-padding-x;
|
||||
width: calc(100%);
|
||||
transition: border 0.1s ease;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect__input::placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
}
|
||||
|
||||
.multiselect__tag ~ .multiselect__input,
|
||||
.multiselect__tag ~ .multiselect__single {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.multiselect__input:hover,
|
||||
.multiselect__single:hover {
|
||||
border-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.multiselect__input:focus,
|
||||
.multiselect__single:focus {
|
||||
border-color: #a8a8a8;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.multiselect__single {
|
||||
padding-left: $vue-multiselect-padding-x;
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
}
|
||||
|
||||
.multiselect__tags-wrap {
|
||||
display: inline
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
min-height: $vue-multiselect-min-height;
|
||||
display: block;
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-min-height 0 $vue-multiselect-padding-y;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
border: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
background: $vue-multiselect-bg;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.multiselect__tag {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: $vue-multiselect-tag-padding-y ($vue-multiselect-tag-icon-size + $vue-multiselect-tag-padding-x) $vue-multiselect-tag-padding-y $vue-multiselect-tag-padding-x;
|
||||
border-radius: $vue-multiselect-tag-border-radius;
|
||||
margin-right: $vue-multiselect-tag-padding-x;
|
||||
color: $vue-multiselect-tag-color;
|
||||
background: $vue-multiselect-tag-bg;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
font-size: $vue-multiselect-tag-font-size;
|
||||
font-weight: $vue-multiselect-tag-font-weight;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon {
|
||||
cursor: pointer;
|
||||
margin-left: $vue-multiselect-tag-padding-y;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
font-style: initial;
|
||||
width: $vue-multiselect-tag-icon-size;
|
||||
text-align: center;
|
||||
line-height: $vue-multiselect-tag-icon-size;
|
||||
transition: all 0.2s ease;
|
||||
font-size: $vue-multiselect-tag-font-size;
|
||||
font-weight: $vue-multiselect-tag-font-weight;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:after {
|
||||
content: "×";
|
||||
color: $vue-multiselect-tag-icon-color;
|
||||
font-size: 220%;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:focus,
|
||||
.multiselect__tag-icon:hover {
|
||||
background: $vue-multiselect-tag-icon-bg-hover;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:focus:after,
|
||||
.multiselect__tag-icon:hover:after {
|
||||
color: $vue-multiselect-tag-icon-color-hover;
|
||||
}
|
||||
|
||||
.multiselect__current {
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 8px 30px 0 12px;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
border: 1px solid $vue-multiselect-border-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.multiselect__select {
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
display: block;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
width: $vue-multiselect-min-height;
|
||||
height: $vue-multiselect-min-height;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: ($vue-multiselect-arrow-padding) $vue-multiselect-arrow-padding;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.multiselect__select:before {
|
||||
position: relative;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
color: $vue-multiselect-arrow-color;
|
||||
border-style: solid;
|
||||
border-width: $vue-multiselect-arrow-size $vue-multiselect-arrow-size 0 $vue-multiselect-arrow-size;
|
||||
border-color: $vue-multiselect-arrow-color transparent transparent transparent;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.multiselect__placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.multiselect--active .multiselect__placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__content-wrapper {
|
||||
position: absolute;
|
||||
display: block;
|
||||
background: $vue-multiselect-bg;
|
||||
width: 100%;
|
||||
max-height: 240px;
|
||||
overflow: auto;
|
||||
border: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
border-top: none;
|
||||
border-bottom-left-radius: $vue-multiselect-border-radius;
|
||||
border-bottom-right-radius: $vue-multiselect-border-radius;
|
||||
z-index: 50;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.multiselect__content {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect--above .multiselect__content-wrapper {
|
||||
bottom: 100%;
|
||||
border-radius: $vue-multiselect-border-radius $vue-multiselect-border-radius 0 0;
|
||||
border-bottom: none;
|
||||
border-top: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
}
|
||||
|
||||
.multiselect__content::webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__element {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multiselect__option {
|
||||
display: block;
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-padding-x;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.multiselect__option:after {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
line-height: $vue-multiselect-min-height;
|
||||
padding-right: 12px;
|
||||
padding-left: 20px;
|
||||
font-family: inherit;
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
|
||||
.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-highlight-bg;
|
||||
outline: none;
|
||||
color: $vue-multiselect-option-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--highlight:after {
|
||||
content: attr(data-select);
|
||||
background: $vue-multiselect-option-highlight-bg;
|
||||
color: $vue-multiselect-option-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--selected {
|
||||
background: $vue-multiselect-option-selected-bg;
|
||||
color: $vue-multiselect-option-selected-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.multiselect__option--selected:after {
|
||||
content: attr(data-selected);
|
||||
color: silver;
|
||||
}
|
||||
|
||||
.multiselect__option--selected.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--selected.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
content: attr(data-deselect);
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect--disabled .multiselect__current,
|
||||
.multiselect--disabled .multiselect__select {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
}
|
||||
|
||||
.multiselect__option--disabled {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
cursor: text;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect__option--group {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
|
||||
&.multiselect__option--highlight {
|
||||
background: $vue-multiselect-disabled-color;
|
||||
color: $vue-multiselect-disabled-bg;
|
||||
}
|
||||
|
||||
&.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--disabled.multiselect__option--highlight {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
content: attr(data-deselect);
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect-enter-active,
|
||||
.multiselect-leave-active {
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.multiselect-enter,
|
||||
.multiselect-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect__strong {
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
line-height: $vue-multiselect-min-height/2;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// Spinner
|
||||
//--
|
||||
|
||||
.multiselect__spinner {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: $vue-multiselect-min-height;
|
||||
height: $vue-multiselect-min-height;
|
||||
display: block;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: $vue-multiselect-spinner-margin 0 0 $vue-multiselect-spinner-margin;
|
||||
width: $vue-multiselect-spinner-size;
|
||||
height: $vue-multiselect-spinner-size;
|
||||
border-radius: 100%;
|
||||
border: $vue-multiselect-spinner-thickness solid transparent;
|
||||
border-top-color: $vue-multiselect-spinner-color;
|
||||
box-shadow: 0 0 0 1px transparent;
|
||||
background: $vue-multiselect-bg;
|
||||
}
|
||||
|
||||
&:before {
|
||||
animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
&:after {
|
||||
animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinning {
|
||||
from {
|
||||
transform: rotate(0)
|
||||
}
|
||||
to {
|
||||
transform: rotate(2turn)
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// Loading state
|
||||
//--
|
||||
|
||||
.multiselect__loading-enter-active,
|
||||
.multiselect__loading-leave-active {
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.multiselect__loading-enter,
|
||||
.multiselect__loading-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// RTL adjustments
|
||||
//--
|
||||
|
||||
*[dir="rtl"] {
|
||||
.multiselect {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.multiselect__select {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-padding-y 0 $vue-multiselect-min-height;
|
||||
}
|
||||
|
||||
.multiselect__content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.multiselect__option:after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.multiselect__clear {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.multiselect__spinner {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
// @see https://github.com/shentao/vue-multiselect/issues/718#issuecomment-471195859
|
||||
|
||||
.multiselect__placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
padding-top: 0;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
// is-valid / is-invalid state handling
|
||||
// @see node_modules/bootstrap/scss/_forms.scss:262
|
||||
@each $state, $data in $form-validation-states {
|
||||
$color: map-get($data, color);
|
||||
$icon: map-get($data, icon);
|
||||
.form-group.is-#{$state} .multiselect__tags {
|
||||
border-color: $color;
|
||||
|
||||
@if $enable-validation-icons {
|
||||
padding-right: $form-select-feedback-icon-padding-end;
|
||||
background: escape-svg($icon) $form-select-bg no-repeat $form-select-feedback-icon-position / $form-select-feedback-icon-size;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: $color;
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
declare module 'vue-multiselect' {
|
||||
// Type definitions for Vue-Multislect 2.1.0
|
||||
// Definitions by: Akshay Jat https://github.com/akki-jat
|
||||
|
||||
import { VueConstructor } from 'vue';
|
||||
|
||||
|
||||
declare class Multiselect extends VueConstructor { }
|
||||
declare class multiselectMixin extends VueConstructor { }
|
||||
declare class pointerMixin extends VueConstructor { }
|
||||
|
||||
export default Multiselect;
|
||||
export { Multiselect, multiselectMixin, pointerMixin };
|
||||
}
|
||||
+108
-32
@@ -75,7 +75,7 @@
|
||||
'white-space': 'nowrap',
|
||||
'font-size': `${Math.min(
|
||||
14,
|
||||
(70 / (`${turnObj.year ?? 1}`.length + 8)) * 1.8
|
||||
(75 / (`${turnObj.year ?? 1}`.length + 8)) * 1.8
|
||||
)}px`,
|
||||
overflow: 'hidden',
|
||||
}"
|
||||
@@ -128,21 +128,56 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row gx-0">
|
||||
<div class="col-9 d-grid">
|
||||
<b-form-select v-model="selectedCommand"
|
||||
><b-form-select-option-group
|
||||
v-for="cgroup in commandList"
|
||||
:key="cgroup['category']"
|
||||
:label="cgroup['category']"
|
||||
><b-form-select-option
|
||||
v-for="(citem, ckey) in cgroup['values']"
|
||||
:value="ckey"
|
||||
:key="ckey"
|
||||
>{{ citem.title
|
||||
}}{{ citem.possible ? "" : "(불가)" }}</b-form-select-option
|
||||
>
|
||||
</b-form-select-option-group></b-form-select
|
||||
<div class="col-9">
|
||||
<v-multiselect
|
||||
v-model="selectedCommand"
|
||||
:allow-empty="false"
|
||||
:options="commandList"
|
||||
:group-select="false"
|
||||
group-values="values"
|
||||
group-label="category"
|
||||
label="searchText"
|
||||
track-by="value"
|
||||
open-direction="top"
|
||||
:show-labels="false"
|
||||
selectLabel="선택(엔터)"
|
||||
selectGroupLabel=""
|
||||
selectedLabel="선택됨"
|
||||
deselectLabel="해제(엔터)"
|
||||
deselectGroupLabel=""
|
||||
placeholder="턴 선택"
|
||||
:maxHeight="400"
|
||||
>
|
||||
<template v-slot:noResult>검색 결과가 없습니다.</template>
|
||||
<template v-slot:option="props"
|
||||
><!--FIXME: 카테고리-->
|
||||
<template v-if="props.option.title">
|
||||
<span
|
||||
class="compensatePositive"
|
||||
v-if="props.option.compensation > 0"
|
||||
>▲</span
|
||||
>
|
||||
<span
|
||||
class="compensateNegative"
|
||||
v-else-if="props.option.compensation < 0"
|
||||
>▼</span
|
||||
>
|
||||
<span class="compensateNeutral" v-else></span>
|
||||
<span :class="[
|
||||
props.option.possible?'':'commandImpossible',
|
||||
]">
|
||||
{{ props.option.title }}
|
||||
</span>
|
||||
|
||||
</template>
|
||||
<template v-else-if="props.option.category">
|
||||
{{ props.option.category }}
|
||||
</template>
|
||||
</template>
|
||||
<template v-slot:singleLabel="props">
|
||||
{{ props.option.simpleName }}
|
||||
</template>
|
||||
</v-multiselect>
|
||||
</div>
|
||||
<div class="col-3 d-grid">
|
||||
<b-button @click="reserveCommand()" variant="primary">실행</b-button>
|
||||
@@ -159,22 +194,27 @@ import { stringifyUrl } from "query-string";
|
||||
import { defineComponent } from "vue";
|
||||
import { formatTime } from "./util/formatTime";
|
||||
import { joinYearMonth } from "./util/joinYearMonth";
|
||||
import { mb_strwidth } from "./util/mb_strwidth";
|
||||
import { parseTime } from "./util/parseTime";
|
||||
import { parseYearMonth } from "./util/parseYearMonth";
|
||||
import { sammoAPI } from "./util/sammoAPI";
|
||||
import { unwrap_any } from "./util/unwrap_any";
|
||||
import { filter초성 } from "./util/filter초성";
|
||||
|
||||
type commandItem = {
|
||||
value: string;
|
||||
title: string;
|
||||
compensation: number;
|
||||
simpleName: string;
|
||||
possible: boolean;
|
||||
reqArg: boolean;
|
||||
searchText?: string;
|
||||
};
|
||||
|
||||
declare const maxTurn: number;
|
||||
declare const maxPushTurn: number;
|
||||
declare const commandList: {
|
||||
category: string;
|
||||
values: Record<string, commandItem>;
|
||||
values: commandItem[];
|
||||
}[];
|
||||
declare const serverNow: string;
|
||||
|
||||
@@ -208,13 +248,11 @@ for (const commandCategories of commandList) {
|
||||
if (!commandCategories.values) {
|
||||
continue;
|
||||
}
|
||||
for (const [commandName, commandObj] of Object.entries(
|
||||
commandCategories.values
|
||||
)) {
|
||||
for (const commandObj of commandCategories.values) {
|
||||
if (!commandObj.reqArg) {
|
||||
continue;
|
||||
}
|
||||
listReqArgCommand.add(commandName);
|
||||
listReqArgCommand.add(commandObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +282,7 @@ export default defineComponent({
|
||||
this.serverNow = formatTime(serverNow, "HH:mm:ss");
|
||||
setTimeout(() => {
|
||||
this.updateNow();
|
||||
}, 250);
|
||||
}, 1000 - serverNow.getMilliseconds());
|
||||
},
|
||||
toggleTurn(turnIdx: number) {
|
||||
this.pressed[turnIdx] = !this.pressed[turnIdx];
|
||||
@@ -345,14 +383,22 @@ export default defineComponent({
|
||||
|
||||
for (const obj of result.turn) {
|
||||
const [year, month] = parseYearMonth(yearMonth);
|
||||
let tooltip: string | undefined = undefined;
|
||||
let tooltip: string[] = [];
|
||||
let style: Record<string, unknown> = {};
|
||||
|
||||
const brief = obj.brief;
|
||||
|
||||
if (yearMonth <= autorunLimitYearMonth) {
|
||||
if (obj.brief == "휴식") {
|
||||
obj.brief = "휴식<small>(자율 행동)</small>";
|
||||
}
|
||||
style.color = "#aaffff";
|
||||
tooltip = `자율 행동 기간: ${autorunLimitYear}년 ${autorunLimitMonth}월까지`;
|
||||
|
||||
tooltip.push(`자율 행동 기간: ${autorunLimitYear}년 ${autorunLimitMonth}월까지`);
|
||||
}
|
||||
|
||||
if(mb_strwidth(brief) > 22){
|
||||
tooltip.push(brief);
|
||||
}
|
||||
|
||||
reservedCommandList.push({
|
||||
@@ -360,7 +406,7 @@ export default defineComponent({
|
||||
year,
|
||||
month,
|
||||
time: formatTime(nextTurnTime, "HH:mm"),
|
||||
tooltip,
|
||||
tooltip: tooltip.length==0?undefined:tooltip.join("\n"),
|
||||
style,
|
||||
});
|
||||
|
||||
@@ -383,11 +429,13 @@ export default defineComponent({
|
||||
turnList.push(turnIdx);
|
||||
}
|
||||
|
||||
if (listReqArgCommand.has(this.selectedCommand)) {
|
||||
const commandName = this.selectedCommand.value;
|
||||
|
||||
if (listReqArgCommand.has(commandName)) {
|
||||
document.location.href = stringifyUrl({
|
||||
url: "b_processing.php",
|
||||
query: {
|
||||
command: unwrap_any<string>(this.selectedCommand),
|
||||
command: commandName,
|
||||
turnList: turnList.join("_"),
|
||||
},
|
||||
});
|
||||
@@ -397,7 +445,7 @@ export default defineComponent({
|
||||
try {
|
||||
await sammoAPI("Command/ReserveCommand", {
|
||||
turnList,
|
||||
action: this.selectedCommand,
|
||||
action: commandName,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@@ -414,12 +462,21 @@ export default defineComponent({
|
||||
|
||||
setTimeout(() => {
|
||||
this.updateNow();
|
||||
}, 250);
|
||||
}, 1000 - serverNowObj.getMilliseconds());
|
||||
|
||||
const pressed = Array.from<boolean>({ length: maxTurn }).fill(false);
|
||||
pressed[0] = true;
|
||||
|
||||
const selectedCommand = "휴식";
|
||||
const selectedCommand = commandList[0].values[0];
|
||||
for(const subCategory of commandList){
|
||||
for(const command of subCategory.values){
|
||||
if(command.searchText){
|
||||
continue;
|
||||
}
|
||||
const filteredText = filter초성(command.simpleName).replace(/\s+/g, '');
|
||||
command.searchText = `${command.simpleName} ${filteredText}`
|
||||
}
|
||||
}
|
||||
|
||||
const emptyTurn: TurnObjWithTime[] = Array.from<TurnObjWithTime>({
|
||||
length: maxTurn,
|
||||
@@ -464,13 +521,29 @@ export default defineComponent({
|
||||
.commandTable {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(30px, 1fr) minmax(70px, 2.5fr) minmax(40px, 1fr) 5fr;
|
||||
grid-template-columns: minmax(30px, 1fr) minmax(75px, 2.5fr) minmax(40px, 1fr) 5fr;
|
||||
//30, 70, 37.65, 160
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.commandPad {
|
||||
margin-left: 10px;
|
||||
|
||||
.turn_pad {
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.multiselect__content-wrapper {
|
||||
width: 133.3%;
|
||||
}
|
||||
|
||||
.multiselect__single {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,7 +564,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
.month_pad:hover{
|
||||
.month_pad:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -512,5 +585,8 @@ export default defineComponent({
|
||||
|
||||
.turn_pad .turn_text {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,17 @@
|
||||
export function filter초성(text: string): string {
|
||||
const 초성 = [
|
||||
"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ",
|
||||
"ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"
|
||||
];
|
||||
const result: string[] = [];
|
||||
for (const char of text) {
|
||||
const code = (char.codePointAt(0) ?? 0) - 44032;
|
||||
if (0 <= code && code < 11172) {
|
||||
result.push(초성[~~(code / 588)]);
|
||||
}
|
||||
else {
|
||||
result.push(char);
|
||||
}
|
||||
}
|
||||
return result.join('');
|
||||
}
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { createApp } from 'vue'
|
||||
import ReservedCommand from './ReservedCommand.vue';
|
||||
import BootstrapVue3 from 'bootstrap-vue-3'
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
|
||||
import Multiselect from 'vue-multiselect';
|
||||
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
createApp(ReservedCommand).use(BootstrapVue3).mount('#reservedCommandList')
|
||||
createApp(ReservedCommand).use(BootstrapVue3).component('v-multiselect', Multiselect).mount('#reservedCommandList')
|
||||
@@ -39,7 +39,6 @@
|
||||
"summernote": "^0.8.18",
|
||||
"vue": "^3.2.2",
|
||||
"vue-multiselect": "^3.0.0-alpha.2",
|
||||
"vue-select": "^4.0.0-beta.1",
|
||||
"vue-types": "^4.1.0",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user