diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index bad7bd1..f2ddba0 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -13,8 +13,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} - name: Prettify uses: creyD/prettier_action@v4.2 with: - ref: ${{ github.head_ref }} prettier_options: --write **/*.{js,html,css,md} diff --git a/css/index.css b/css/index.css index 4db5e50..9f6329a 100644 --- a/css/index.css +++ b/css/index.css @@ -1,6 +1,12 @@ * { font-size: 100%; font-family: Arial, Helvetica, sans-serif; + user-select: none; +} + +input, +textarea { + user-select: auto; } /* Body is stuck with no scroll */ @@ -136,7 +142,7 @@ body { color: #fff; } -#models { +.wideSelect { width: 100%; text-overflow: ellipsis; } @@ -146,59 +152,83 @@ body { position: relative; display: flex; - align-items: center; + align-items: stretch; justify-content: space-between; width: 100%; - height: fit-content; } .host-field-wrapper input { + flex-shrink: 0; + width: calc(100% - 15px); + display: block; + + border: 0; } .host-field-wrapper .connection-status { width: 15px; - height: 15px; + + position: absolute; + left: calc(100% - 15px); + + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; box-sizing: inherit; - border-radius: 50%; - margin: 5px; - cursor: pointer; - aspect-ratio: 1; + transition-duration: 50ms; + + padding-top: 1px; + padding-bottom: 1px; + + overflow: hidden; } - +.host-field-wrapper .connection-status:active, .host-field-wrapper .connection-status:hover { - width: 19px; - height: 19px; + width: fit-content; + padding-left: 5px; + padding-right: 6px; - margin: 3px; + filter: brightness(110%); } .host-field-wrapper .connection-status:active { - width: 17px; - height: 17px; + filter: brightness(80%); +} - margin: 4px; +.host-field-wrapper .connection-status > #connection-status-indicator-text { + opacity: 0%; + transition-duration: 20ms; +} + +.host-field-wrapper + .connection-status:hover + > #connection-status-indicator-text { + opacity: 100%; } .host-field-wrapper .connection-status.online { background-color: #49dd49; + color: #1f3f1f; } .host-field-wrapper .connection-status.offline { background-color: #dd4949; + color: #3f1f1f; } .host-field-wrapper .connection-status.cors-issue { background-color: #dddd49; + color: #3f3f1f; } .host-field-wrapper .connection-status.before { background-color: #777; + color: #1f1f1f; } input#host { @@ -222,6 +252,19 @@ div.prompt-wrapper > textarea:focus { width: 700px; } +/* Style Field */ +select > .style-select-option { + cursor: pointer; +} + +select > .style-select-option:hover { + background-color: #999; +} + +select > .style-select-option:active { + background-color: #aaa; +} + /* Tool buttons */ .button-array { display: flex; diff --git a/css/ui/generic.css b/css/ui/generic.css index deed60d..dd97f48 100644 --- a/css/ui/generic.css +++ b/css/ui/generic.css @@ -90,8 +90,26 @@ div.slider-wrapper > input.text { appearance: textfield; border: 0px; - padding-top: 5px; - height: 15px; + height: 100%; text-align: center; background-color: transparent; } + +/* Select Input */ +select > option:checked::after { + content: ""; + + position: absolute; + right: 5px; + top: 0; + + height: 100%; + aspect-ratio: 1; + + background-color: darkgreen; + + -webkit-mask-image: url("/res/icons/check.svg"); + -webkit-mask-size: contain; + mask-image: url("/res/icons/check.svg"); + mask-size: contain; +} diff --git a/css/ui/tool/stamp.css b/css/ui/tool/stamp.css index 2dc9a2d..a685abb 100644 --- a/css/ui/tool/stamp.css +++ b/css/ui/tool/stamp.css @@ -38,14 +38,69 @@ } .resource-manager > .resource-list > * { + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; - overflow: hidden; - text-overflow: ellipsis; white-space: nowrap; } +.resource-manager > .resource-list > * > .resource-title { + overflow: hidden; + margin: 5px; + text-overflow: ellipsis; +} + +.resource-manager > .resource-list > * > .actions { + display: flex; + align-items: center; +} + +.resource-manager .actions > button { + display: flex; + align-items: stretch; + + padding: 0; + + width: 30px; + aspect-ratio: 1; + + background-color: transparent; + border: 0; + cursor: pointer; +} + +.resource-manager .actions > button:hover { + background-color: rgba(255, 255, 255, 0.5); +} + +.resource-manager .actions > button:active { + background-color: rgba(255, 255, 255, 0.7); +} + +.resource-manager .actions > button > *:first-child { + flex: 1; + margin: 3px; + + -webkit-mask-size: contain; + mask-size: contain; + background-color: var(--c-primary); +} + +.resource-manager .actions > .rename-btn > *:first-child { + -webkit-mask-image: url("/res/icons/edit.svg"); + mask-image: url("/res/icons/edit.svg"); +} + +.resource-manager .actions > .delete-btn > *:first-child { + -webkit-mask-image: url("/res/icons/trash.svg"); + mask-image: url("/res/icons/trash.svg"); +} + +.resource-manager > .resource-list > .selected:hover, .resource-manager > .resource-list > *:hover { - background-color: #ffff; + background-color: #fff8; } .resource-manager > .resource-list > .selected { background-color: #fff6; diff --git a/css/ui/toolbar.css b/css/ui/toolbar.css index 39c9341..52bd9bb 100644 --- a/css/ui/toolbar.css +++ b/css/ui/toolbar.css @@ -43,8 +43,6 @@ padding: 0; - background-color: var(--c-text); - right: 2px; top: 10px; @@ -78,6 +76,8 @@ border-radius: 5px; cursor: pointer; + + transition-duration: 50ms; } #ui-toolbar .tool.using { @@ -87,3 +87,8 @@ #ui-toolbar .tool:hover { background-color: var(--c-hover); } + +#ui-toolbar .tool:active { + background-color: var(--c-hover); + filter: brightness(120%); +} diff --git a/index.html b/index.html index 3e07789..317521b 100644 --- a/index.html +++ b/index.html @@ -36,7 +36,9 @@
+ class="connection-status before"> + Waiting + @@ -51,6 +53,12 @@