Skip to content

Commit 19e4549

Browse files
committed
8.1.0 Sorter UI Enhancements
1 parent f474d87 commit 19e4549

9 files changed

Lines changed: 69 additions & 12 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sbg-enhanced",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "<h1 align=\"center\"><img src=\"https://github.com/egorantonov/sbg-enhanced/raw/master/assets/script/64.png\" width=\"32px\" /> SBG Enhanced UI</h1>",
55
"private": true,
66
"scripts": {

src/colorScheme/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ClientData, CUI, EUI, Elements, Events, GetLocale, IsPrivate, Modifiers, Nodes, Proposed, SBG, Themes, t, Translations as i18n } from '../constants'
1+
import { ClientData, CUI, EUI, Elements, Events, GetLocale, Modifiers, Nodes, Proposed, SBG, Themes, t, Translations as i18n } from '../constants'
22
import monoStyles from './styles/mono.min.css'
33
import ingressStyles from './styles/ingress.min.css'
44
import primeStyles from './styles/prime.min.css'
@@ -219,7 +219,7 @@ export default function AddColorScheme() {
219219
const cuiRefsOnMap = Nodes.GetSelector('button.sbgcui_show_viewer')
220220
if (cuiRefsOnMap) {
221221
cuiRefsOnMap.innerText = '🌍'
222-
cuiRefsOnMap.style.minWidth = '40px'
222+
cuiRefsOnMap.style.minWidth = '45px'
223223
}
224224

225225
const cuiSortOrder = document.querySelector('button.sbgcui_refs-sort-button')

src/colorScheme/styles/eui.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,54 @@ button.inventory__ic-repair {
583583
color: var(--sbgcui-branding-color, var(--selection));
584584
}
585585

586+
.inventory__sorter {
587+
justify-content: flex-end;
588+
backdrop-filter: blur(10px);
589+
}
590+
591+
.inventory__sorter .popup-buttons {
592+
margin: 10px 0 0;
593+
border-radius: var(--radius10);
594+
overflow: hidden;
595+
gap: 0.1em;
596+
}
597+
598+
.inventory__sorter .popup-buttons button {
599+
min-height: 45px;
600+
}
601+
602+
.inventory__sorter fieldset {
603+
border-radius: var(--radius10);
604+
gap: 10px;
605+
}
606+
607+
.inventory__sorter fieldset legend {
608+
margin: 0 auto;
609+
}
610+
611+
.inventory__sorter fieldset label {
612+
padding: 10px 0 10px 10px;
613+
background-color: #7773;
614+
border-radius: var(--radius5);
615+
border: 1px solid var(--border-transp);
616+
}
617+
618+
.inventory__sorter fieldset label input {
619+
margin: 0 6px 0 0;
620+
}
621+
622+
.inventory__sorter fieldset label span[data-i18n="inventory.sorter.direction.asc"]::before {
623+
content: '↗ ';
624+
}
625+
626+
.inventory__sorter fieldset label span[data-i18n="inventory.sorter.direction.desc"]::before {
627+
content: '↘ '
628+
}
629+
630+
.team-g, .team-b, .team-r, .team-n {
631+
font-weight: bold;
632+
}
633+
586634
/* SETTINGS */
587635
.settings-section__item input[type="checkbox"],
588636
.sbgcui_settings input[type="checkbox"] { /* CUI compatibility */

src/colorScheme/styles/eui.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/colorScheme/styles/mono.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ input[type='range']::-webkit-slider-thumb {
434434
color: var(--i-btn-color);
435435
}
436436

437+
.inventory__sorter .popup-buttons button {
438+
color: var(--text) !important;
439+
}
440+
437441
#settings-telegram>span {
438442
color: var(--text) !important;
439443
}

src/colorScheme/styles/mono.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/constants/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const Backend = {
1515
export const SBG = {
1616
OutboundLinksLimit: 30,
1717
DefaultCloseButtonText: '[x]',
18-
CompatibleVersion: '0.5.3',
18+
CompatibleVersion: '0.6.0',
1919
Settings: 'settings',
2020
DefaultLang: 'en',
2121
GooglePhoto: 'https://lh3.googleusercontent.com/',

src/styles/styles.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,24 +1140,29 @@ input[type="range"][name^="mapFilters_"]::after {
11401140
font-weight: bolder;
11411141
}
11421142

1143-
.inventory__sorter input[type="radio"] {
1143+
.inventory__sorter input[type="radio"]:checked {
11441144
accent-color: var(--sbgcui-branding-color, var(--selection));
1145+
filter: drop-shadow(0 0 6px var(--sbgcui-branding-color, var(--selection)));
11451146
}
11461147

1147-
input[type="checkbox"][name="t"][value="0"] {
1148+
input[type="checkbox"][name="t"][value="0"]:checked:not(:disabled) {
11481149
accent-color: var(--team-0);
1150+
filter: drop-shadow(0 0 6px var(--team-0));
11491151
}
11501152

1151-
input[type="checkbox"][name="t"][value="1"] {
1153+
input[type="checkbox"][name="t"][value="1"]:checked:not(:disabled) {
11521154
accent-color: var(--team-1);
1155+
filter: drop-shadow(0 0 6px var(--team-1));
11531156
}
11541157

1155-
input[type="checkbox"][name="t"][value="2"] {
1158+
input[type="checkbox"][name="t"][value="2"]:checked:not(:disabled) {
11561159
accent-color: var(--team-2);
1160+
filter: drop-shadow(0 0 6px var(--team-2));
11571161
}
11581162

1159-
input[type="checkbox"][name="t"][value="3"] {
1163+
input[type="checkbox"][name="t"][value="3"]:checked:not(:disabled) {
11601164
accent-color: var(--team-3);
1165+
filter: drop-shadow(0 0 6px var(--team-3));
11611166
}
11621167

11631168
/* Animation */

src/styles/styles.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)