Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Sep 6, 2024
1 parent b3ea669 commit 1ea4cb5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
1 change: 1 addition & 0 deletions arknights_mower/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from datetime import datetime, timedelta

from arknights_mower.solvers.base_schedule import BaseSchedulerSolver
from arknights_mower.solvers.reclamation_algorithm import ReclamationAlgorithm
from arknights_mower.solvers.secret_front import SecretFront
Expand Down
6 changes: 3 additions & 3 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from arknights_mower.utils.datetime import format_time, get_server_weekday
from arknights_mower.utils.device.device import Device
from arknights_mower.utils.digit_reader import DigitReader
from arknights_mower.utils.email import send_message, maa_template
from arknights_mower.utils.email import maa_template, send_message
from arknights_mower.utils.graph import SceneGraphSolver
from arknights_mower.utils.image import cropimg, loadres, thres2
from arknights_mower.utils.log import logger
Expand Down Expand Up @@ -3253,7 +3253,7 @@ def maa_plan_solver(self, tasks="All", one_time=False):
global stage_drop
stage_drop = {"details": [], "summary": {}}

logger.info(f"MAA 启动")
logger.info("MAA 启动")
hard_stop = False
while self.MAA.running():
# 单次任务默认5分钟
Expand All @@ -3278,7 +3278,7 @@ def maa_plan_solver(self, tasks="All", one_time=False):
if self.device.check_current_focus():
self.recog.update()
elif not one_time:
logger.info(f"记录MAA 本次执行时间")
logger.info("记录MAA 本次执行时间")
self.last_execution["maa"] = datetime.now()
logger.info(self.last_execution["maa"])
if "Mall" in tasks and self.credit_fight is None:
Expand Down
1 change: 0 additions & 1 deletion arknights_mower/solvers/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import cv2

from arknights_mower.models import navigation
from arknights_mower.utils import hot_update
from arknights_mower.utils.graph import SceneGraphSolver
from arknights_mower.utils.image import thres2
from arknights_mower.utils.log import logger
Expand Down
27 changes: 21 additions & 6 deletions ui/src/pages/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function start(value) {
running.value = true
log_lines.value = []
if (value == undefined) {
value = "0"
value = '0'
}
axios.get(`${import.meta.env.VITE_HTTP_URL}/start/${value}`)
get_tasks()
Expand Down Expand Up @@ -101,7 +101,6 @@ const start_options = [
key: '2'
}
]
</script>
<template>
Expand Down Expand Up @@ -136,7 +135,12 @@ const start_options = [
</template>
</tbody>
</n-table>
<n-log class="log" :log="mobile ? log_mobile : log" language="mower" style="user-select: text" />
<n-log
class="log"
:log="mobile ? log_mobile : log"
language="mower"
style="user-select: text"
/>
<div class="action-container">
<drop-down v-if="running" :select="stop_maa" :options="stop_options" type="error" :up="true">
<n-button type="error" @click="stop" :loading="waiting" :disabled="waiting">
Expand All @@ -149,7 +153,13 @@ const start_options = [
</n-button>
</drop-down>
<drop-down v-if="!running" :select="start" :options="start_options" type="primary" :up="true">
<n-button v-if="!running" type="primary" @click="start" :loading="waiting" :disabled="waiting">
<n-button
v-if="!running"
type="primary"
@click="start"
:loading="waiting"
:disabled="waiting"
>
<template #icon>
<n-icon>
<play-icon />
Expand Down Expand Up @@ -183,8 +193,13 @@ const start_options = [
<span class="scroll-label" v-if="!mobile">自动滚动</span>
</div>
</div>
<n-button class="toggle-table-collapse-btn" size="small" @click="show_task_table = !show_task_table"
:focusable="false" v-if="mobile">
<n-button
class="toggle-table-collapse-btn"
size="small"
@click="show_task_table = !show_task_table"
:focusable="false"
v-if="mobile"
>
<template #icon>
<n-icon>
<collapse-icon v-if="show_task_table" />
Expand Down

0 comments on commit 1ea4cb5

Please sign in to comment.