Compare commits

...

4 Commits

Author SHA1 Message Date
87e314ef3f
Merge pull request #474 from wess09/dev
Dev
2026-05-13 22:33:18 +08:00
wess09
72d3c60a45 Merge remote-tracking branch 'origin/master' into dev 2026-05-13 22:31:57 +08:00
wess09
d2cb4a2bc1 fix 2026-05-13 22:28:45 +08:00
wess09
3290999261 移动端优化 2026-05-13 19:48:54 +08:00
3 changed files with 56 additions and 12 deletions

View File

@ -126,12 +126,20 @@
#pywebio-scope-commission_income .btn {
width: 100% !important;
min-width: 0 !important;
white-space: normal !important;
word-break: break-word;
line-height: 1.35 !important;
height: auto !important;
padding: .7rem .8rem !important;
padding: .45rem .6rem !important;
text-align: center !important;
font-size: .8rem !important;
}
#pywebio-scope-ap_chart .btn-group .btn {
padding: 6px 12px !important;
font-size: 12px !important;
white-space: nowrap !important;
width: auto !important;
flex: 0 0 auto !important;
}
#pywebio-scope-opsi_stats table,

View File

@ -13,6 +13,7 @@ from module.config.utils import get_server_next_update
from module.logger import logger
from module.map.map_grids import SelectedGrids
from module.ocr.ocr import Digit
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_2, GET_SHIP
from module.os_shop.assets import OS_SHOP_CHECK, OS_SHOP_PURPLE_COINS, SHOP_PURPLE_COINS, SHOP_YELLOW_COINS
from module.ui.ui import UI
from module.log_res.log_res import LogRes
@ -91,6 +92,16 @@ class OSStatus(UI):
for _ in self.loop():
# End
if self.appear_then_click(GET_ITEMS_1, offset=True, interval=1):
timeout.reset()
continue
if self.appear_then_click(GET_ITEMS_2, offset=True, interval=1):
timeout.reset()
continue
if self.appear_then_click(GET_SHIP, interval=1):
timeout.reset()
continue
current_value = OCR_SHOP_YELLOW_COINS.ocr(self.device.image)
logger.info(f'[Debug] OCR_SHOP_YELLOW_COINS: {current_value}')
if not os.path.exists('debug_img'):
@ -108,9 +119,10 @@ class OSStatus(UI):
logger.warning('Get yellow coins timeout')
break
if current_value < 100:
# OCR may get 0 or 1 when amount is not immediately loaded
logger.info(f'Yellow coins less than 100 ({current_value}), assuming it is an ocr error')
if current_value == 0:
# OCR may get 0 when amount is not immediately loaded
# Or when popups are obscuring the top bar
logger.info(f'Yellow coins is 0, assuming it is an ocr error or UI not loaded')
continue
else:
# 验证识别稳定性:连续两次识别相同才确认

View File

@ -838,17 +838,41 @@ class AlasGUI(Frame):
}}
@media (max-width: 720px) {{
[style*="--ap-chart-md3-toolbar-{chart_id}"] {{
grid-template-columns: 1fr !important;
row-gap: 8px !important;
grid-template-columns: 1fr auto !important;
column-gap: 6px !important;
padding: 6px 8px !important;
}}
[style*="--ap-chart-md3-toolbar-{chart_id}"] > :first-child {{
display: none !important;
}}
[style*="--ap-chart-md3-segment-{chart_id}"] {{
max-width: none !important;
width: 100% !important;
overflow-x: auto !important;
-webkit-overflow-scrolling: touch !important;
}}
[style*="--ap-chart-md3-segment-{chart_id}"] .btn-group {{
width: 100% !important;
width: max-content !important;
flex-wrap: nowrap !important;
overflow: visible !important;
}}
[style*="--ap-chart-md3-segment-{chart_id}"] .btn {{
min-width: 0 !important;
flex: 1 1 0 !important;
padding-left: 8px !important;
padding-right: 8px !important;
flex: 0 0 auto !important;
padding: 6px 12px !important;
font-size: 12px !important;
white-space: nowrap !important;
}}
[style*="--ap-chart-md3-segment-{chart_id}"]::-webkit-scrollbar {{
height: 3px !important;
}}
[style*="--ap-chart-md3-segment-{chart_id}"]::-webkit-scrollbar-thumb {{
background: {md3_colors["segment_border"]} !important;
border-radius: 2px !important;
}}
[style*="--ap-chart-md3-refresh-{chart_id}"] .btn {{
padding: 6px 12px !important;
font-size: 12px !important;
white-space: nowrap !important;
}}
}}
</style>