diff --git a/hwe/css/common.css b/hwe/css/common.css index 0dfca57d..60be225d 100644 --- a/hwe/css/common.css +++ b/hwe/css/common.css @@ -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; diff --git a/hwe/func.php b/hwe/func.php index c734626e..f65e3cf2 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -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, ]; } diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index 6343735e..84761596 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -25,7 +25,7 @@ use sammo\MustNotBeReachedException; class che_랜덤임관 extends Command\GeneralCommand { - static protected $actionName = '랜덤임관'; + static protected $actionName = '무작위 국가로 임관'; protected function argTest(): bool { diff --git a/hwe/sammo/Command/General/che_장수대상임관.php b/hwe/sammo/Command/General/che_장수대상임관.php index 8977fc79..939e40f1 100644 --- a/hwe/sammo/Command/General/che_장수대상임관.php +++ b/hwe/sammo/Command/General/che_장수대상임관.php @@ -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{ diff --git a/hwe/scss/bootstrap5.scss b/hwe/scss/bootstrap5.scss index eaf644ee..0bce301e 100644 --- a/hwe/scss/bootstrap5.scss +++ b/hwe/scss/bootstrap5.scss @@ -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"; \ No newline at end of file +@import "./bootstrap_sammo.scss"; +@import "./vue-multiselect.scss"; \ No newline at end of file diff --git a/hwe/scss/break_500px.scss b/hwe/scss/break_500px.scss index abcbe6e7..5279b63a 100644 --- a/hwe/scss/break_500px.scss +++ b/hwe/scss/break_500px.scss @@ -1,10 +1,9 @@ $container-max-widths: ( - sm: 500px, md: 500px, lg: 1020px, xl: 1140px, xxl: 1320px - ) !default; + ); $grid-breakpoints: ( xs: 0, diff --git a/hwe/scss/common_legacy.scss b/hwe/scss/common_legacy.scss index 9520d2af..7fd1ee0a 100644 --- a/hwe/scss/common_legacy.scss +++ b/hwe/scss/common_legacy.scss @@ -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 { diff --git a/hwe/scss/variables.scss b/hwe/scss/variables.scss index cb85a787..8dcb1cb3 100644 --- a/hwe/scss/variables.scss +++ b/hwe/scss/variables.scss @@ -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, diff --git a/hwe/scss/vue-multiselect.scss b/hwe/scss/vue-multiselect.scss new file mode 100644 index 00000000..acbe7415 --- /dev/null +++ b/hwe/scss/vue-multiselect.scss @@ -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); + } + } +} \ No newline at end of file diff --git a/hwe/ts/@types/vue-multiselect.d.ts b/hwe/ts/@types/vue-multiselect.d.ts new file mode 100644 index 00000000..82271a5a --- /dev/null +++ b/hwe/ts/@types/vue-multiselect.d.ts @@ -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 }; +} diff --git a/hwe/ts/ReservedCommand.vue b/hwe/ts/ReservedCommand.vue index dfb3272e..5ca6a61b 100644 --- a/hwe/ts/ReservedCommand.vue +++ b/hwe/ts/ReservedCommand.vue @@ -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 @@