1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-25 01:20:10 +08:00

Merge pull request #2531 from LmeSzinc/dev

Bug fix
This commit is contained in:
LmeSzinc
2023-04-28 01:14:11 +08:00
committed by GitHub
13 changed files with 346 additions and 339 deletions

View File

@@ -52,13 +52,15 @@ class CampaignBase(CampaignBase_):
else: else:
raise CampaignNameError raise CampaignNameError
def campaign_set_chapter_sp(self, chapter, mode='normal'): def campaign_set_chapter_event(self, chapter, mode='normal'):
if chapter == 'sp': self.ui_goto_event()
self.ui_goto_event() self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(index=chapter) return True
return True
else: def campaign_get_entrance(self, name):
return False if name == 'sp':
name = 'vsp'
return super().campaign_get_entrance(name)
def is_event_animation(self): def is_event_animation(self):
""" """

View File

@@ -773,53 +773,6 @@
"Storage": {} "Storage": {}
} }
}, },
"CoalitionSp": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "CoalitionSp",
"SuccessInterval": 30,
"FailureInterval": 30,
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "sp",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": true
},
"Coalition": {
"Fleet": "single"
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"StageIncrease": false,
"GetNewShip": false,
"ReachLevel": 0
},
"Emotion": {
"Mode": "calculate",
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"Storage": {
"Storage": {}
}
},
"EventA": { "EventA": {
"Scheduler": { "Scheduler": {
"Enable": false, "Enable": false,
@@ -1253,6 +1206,53 @@
"Storage": {} "Storage": {}
} }
}, },
"CoalitionSp": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "CoalitionSp",
"SuccessInterval": 30,
"FailureInterval": 30,
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "sp",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": true
},
"Coalition": {
"Fleet": "single"
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"StageIncrease": false,
"GetNewShip": false,
"ReachLevel": 0
},
"Emotion": {
"Mode": "calculate",
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"Storage": {
"Storage": {}
}
},
"Commission": { "Commission": {
"Scheduler": { "Scheduler": {
"Enable": true, "Enable": true,
@@ -1861,7 +1861,7 @@
"Command": "OpsiHazard1Leveling", "Command": "OpsiHazard1Leveling",
"SuccessInterval": 30, "SuccessInterval": 30,
"FailureInterval": 60, "FailureInterval": 60,
"ServerUpdate": "00:00" "ServerUpdate": "00:00, 12:00"
}, },
"OpsiHazard1Leveling": { "OpsiHazard1Leveling": {
"TargetZone": 0 "TargetZone": 0

View File

@@ -4041,227 +4041,6 @@
} }
} }
}, },
"CoalitionSp": {
"Scheduler": {
"Enable": {
"type": "checkbox",
"value": false
},
"NextRun": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Command": {
"type": "input",
"value": "CoalitionSp",
"display": "hide"
},
"SuccessInterval": {
"type": "input",
"value": 30,
"display": "hide"
},
"FailureInterval": {
"type": "input",
"value": 30,
"display": "hide"
},
"ServerUpdate": {
"type": "input",
"value": "00:00",
"display": "hide"
}
},
"Campaign": {
"Name": {
"type": "input",
"value": "sp",
"display": "hide"
},
"Event": {
"type": "select",
"value": "campaign_main",
"option": [
"coalition_20230323"
],
"display": "disabled",
"cn": "coalition_20230323",
"en": "coalition_20230323",
"jp": "coalition_20230323"
},
"Mode": {
"type": "select",
"value": "normal",
"option": [
"normal",
"hard"
],
"display": "hide"
},
"UseClearMode": {
"type": "checkbox",
"value": true,
"display": "hide"
},
"UseFleetLock": {
"type": "checkbox",
"value": true,
"display": "hide"
},
"UseAutoSearch": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"Use2xBook": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"AmbushEvade": {
"type": "checkbox",
"value": true,
"display": "hide"
}
},
"Coalition": {
"Fleet": {
"type": "select",
"value": "single",
"option": [
"single",
"multi"
]
}
},
"StopCondition": {
"RunCount": {
"type": "input",
"value": 0
},
"OilLimit": {
"type": "input",
"value": 1000
},
"MapAchievement": {
"type": "select",
"value": "non_stop",
"option": [
"non_stop",
"100_percent_clear",
"map_3_stars",
"threat_safe",
"threat_safe_without_3_stars"
],
"display": "hide"
},
"StageIncrease": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"GetNewShip": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"ReachLevel": {
"type": "input",
"value": 0,
"display": "hide"
}
},
"Emotion": {
"Mode": {
"type": "select",
"value": "calculate",
"option": [
"calculate",
"ignore",
"calculate_ignore"
]
},
"Fleet1Value": {
"type": "input",
"value": 119
},
"Fleet1Record": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime",
"display": "disabled"
},
"Fleet1Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet1Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet1Oath": {
"type": "checkbox",
"value": false
},
"Fleet2Value": {
"type": "input",
"value": 119,
"display": "hide"
},
"Fleet2Record": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime",
"display": "hide"
},
"Fleet2Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
],
"display": "hide"
},
"Fleet2Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
],
"display": "hide"
},
"Fleet2Oath": {
"type": "checkbox",
"value": false,
"display": "hide"
}
},
"Storage": {
"Storage": {
"type": "storage",
"value": {},
"valuetype": "ignore",
"display": "disabled"
}
}
},
"EventA": { "EventA": {
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
@@ -6727,6 +6506,227 @@
} }
} }
}, },
"CoalitionSp": {
"Scheduler": {
"Enable": {
"type": "checkbox",
"value": false
},
"NextRun": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Command": {
"type": "input",
"value": "CoalitionSp",
"display": "hide"
},
"SuccessInterval": {
"type": "input",
"value": 30,
"display": "hide"
},
"FailureInterval": {
"type": "input",
"value": 30,
"display": "hide"
},
"ServerUpdate": {
"type": "input",
"value": "00:00",
"display": "hide"
}
},
"Campaign": {
"Name": {
"type": "input",
"value": "sp",
"display": "hide"
},
"Event": {
"type": "select",
"value": "campaign_main",
"option": [
"coalition_20230323"
],
"display": "disabled",
"cn": "coalition_20230323",
"en": "coalition_20230323",
"jp": "coalition_20230323"
},
"Mode": {
"type": "select",
"value": "normal",
"option": [
"normal",
"hard"
],
"display": "hide"
},
"UseClearMode": {
"type": "checkbox",
"value": true,
"display": "hide"
},
"UseFleetLock": {
"type": "checkbox",
"value": true,
"display": "hide"
},
"UseAutoSearch": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"Use2xBook": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"AmbushEvade": {
"type": "checkbox",
"value": true,
"display": "hide"
}
},
"Coalition": {
"Fleet": {
"type": "select",
"value": "single",
"option": [
"single",
"multi"
]
}
},
"StopCondition": {
"RunCount": {
"type": "input",
"value": 0
},
"OilLimit": {
"type": "input",
"value": 1000
},
"MapAchievement": {
"type": "select",
"value": "non_stop",
"option": [
"non_stop",
"100_percent_clear",
"map_3_stars",
"threat_safe",
"threat_safe_without_3_stars"
],
"display": "hide"
},
"StageIncrease": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"GetNewShip": {
"type": "checkbox",
"value": false,
"display": "hide"
},
"ReachLevel": {
"type": "input",
"value": 0,
"display": "hide"
}
},
"Emotion": {
"Mode": {
"type": "select",
"value": "calculate",
"option": [
"calculate",
"ignore",
"calculate_ignore"
]
},
"Fleet1Value": {
"type": "input",
"value": 119
},
"Fleet1Record": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime",
"display": "disabled"
},
"Fleet1Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet1Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet1Oath": {
"type": "checkbox",
"value": false
},
"Fleet2Value": {
"type": "input",
"value": 119,
"display": "hide"
},
"Fleet2Record": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime",
"display": "hide"
},
"Fleet2Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
],
"display": "hide"
},
"Fleet2Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
],
"display": "hide"
},
"Fleet2Oath": {
"type": "checkbox",
"value": false,
"display": "hide"
}
},
"Storage": {
"Storage": {
"type": "storage",
"value": {},
"valuetype": "ignore",
"display": "disabled"
}
}
},
"Commission": { "Commission": {
"Scheduler": { "Scheduler": {
"Enable": { "Enable": {
@@ -8964,7 +8964,7 @@
}, },
"ServerUpdate": { "ServerUpdate": {
"type": "input", "type": "input",
"value": "00:00", "value": "00:00, 12:00",
"display": "hide" "display": "hide"
} }
}, },

View File

@@ -3,6 +3,7 @@
Aside: Aside:
Install: Install:
Home:
Develop: Develop:
Performance: Performance:
Setting: Setting:

View File

@@ -22,13 +22,13 @@
"WarArchives" "WarArchives"
], ],
"EventDaily": [ "EventDaily": [
"CoalitionSp",
"EventA", "EventA",
"EventB", "EventB",
"EventC", "EventC",
"EventD", "EventD",
"EventSp", "EventSp",
"RaidDaily" "RaidDaily",
"CoalitionSp"
], ],
"Reward": [ "Reward": [
"Commission", "Commission",

View File

@@ -438,6 +438,6 @@ OpsiHazard1Leveling:
Scheduler: Scheduler:
SuccessInterval: 30 SuccessInterval: 30
FailureInterval: 60 FailureInterval: 60
ServerUpdate: 00:00 ServerUpdate: 00:00, 12:00
OpsiFleet: OpsiFleet:
Submarine: false Submarine: false

View File

@@ -115,12 +115,6 @@ WarArchives:
# ==================== EventDaily ==================== # ==================== EventDaily ====================
CoalitionSp:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
EventA: EventA:
- Scheduler - Scheduler
- EventDaily - EventDaily
@@ -176,6 +170,12 @@ RaidDaily:
- Campaign - Campaign
- StopCondition - StopCondition
- Emotion - Emotion
CoalitionSp:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
# ==================== Reward ==================== # ==================== Reward ====================

View File

@@ -98,10 +98,6 @@
"name": "War Archives", "name": "War Archives",
"help": "Due to the lack of maintenance of war archives, continuous clear may not work normally, if Alas runs abnormally, Please manually finish clearing and use auto search" "help": "Due to the lack of maintenance of war archives, continuous clear may not work normally, if Alas runs abnormally, Please manually finish clearing and use auto search"
}, },
"CoalitionSp": {
"name": "Frostfall Daily SP",
"help": ""
},
"EventA": { "EventA": {
"name": "Event Daily A", "name": "Event Daily A",
"help": "" "help": ""
@@ -126,6 +122,10 @@
"name": "Raid Daily", "name": "Raid Daily",
"help": "" "help": ""
}, },
"CoalitionSp": {
"name": "Frostfall Daily SP",
"help": ""
},
"Commission": { "Commission": {
"name": "Commission", "name": "Commission",
"help": "" "help": ""
@@ -355,7 +355,7 @@
"cn_android-20": "[国服] 水星行动", "cn_android-20": "[国服] 水星行动",
"cn_android-21": "[国服] 莱茵河卫兵", "cn_android-21": "[国服] 莱茵河卫兵",
"cn_android-22": "[国服] 北极光计划", "cn_android-22": "[国服] 北极光计划",
"cn_android-23": "[国服] 长戟计划", "cn_android-23": "[国服] 长戟计划",
"cn_ios-0": "[国服] 夏威夷", "cn_ios-0": "[国服] 夏威夷",
"cn_ios-1": "[国服] 珊瑚海", "cn_ios-1": "[国服] 珊瑚海",
"cn_ios-2": "[国服] 中途岛", "cn_ios-2": "[国服] 中途岛",
@@ -2402,6 +2402,7 @@
"Gui": { "Gui": {
"Aside": { "Aside": {
"Install": "Install", "Install": "Install",
"Home": "Home",
"Develop": "Develop", "Develop": "Develop",
"Performance": "Perf.", "Performance": "Perf.",
"Setting": "Settings", "Setting": "Settings",
@@ -2423,7 +2424,7 @@
"DisableTranslateMode": "Click here to disable translate mode", "DisableTranslateMode": "Click here to disable translate mode",
"ConfigSaved": "Config saved", "ConfigSaved": "Config saved",
"AlasIsRunning": "Scheduler is already running", "AlasIsRunning": "Scheduler is already running",
"ClickToUpdate": "New update avaliable, click here to update" "ClickToUpdate": "New update available, click here to update"
}, },
"Status": { "Status": {
"Running": "Running", "Running": "Running",

View File

@@ -98,10 +98,6 @@
"name": "作戦履歴", "name": "作戦履歴",
"help": "" "help": ""
}, },
"CoalitionSp": {
"name": "Task.CoalitionSp.name",
"help": "Task.CoalitionSp.help"
},
"EventA": { "EventA": {
"name": "毎日イベント海域A", "name": "毎日イベント海域A",
"help": "" "help": ""
@@ -126,6 +122,10 @@
"name": "Raid Daily", "name": "Raid Daily",
"help": "" "help": ""
}, },
"CoalitionSp": {
"name": "Task.CoalitionSp.name",
"help": "Task.CoalitionSp.help"
},
"Commission": { "Commission": {
"name": "委託", "name": "委託",
"help": "" "help": ""
@@ -355,7 +355,7 @@
"cn_android-20": "[国服] 水星行动", "cn_android-20": "[国服] 水星行动",
"cn_android-21": "[国服] 莱茵河卫兵", "cn_android-21": "[国服] 莱茵河卫兵",
"cn_android-22": "[国服] 北极光计划", "cn_android-22": "[国服] 北极光计划",
"cn_android-23": "[国服] 长戟计划", "cn_android-23": "[国服] 长戟计划",
"cn_ios-0": "[国服] 夏威夷", "cn_ios-0": "[国服] 夏威夷",
"cn_ios-1": "[国服] 珊瑚海", "cn_ios-1": "[国服] 珊瑚海",
"cn_ios-2": "[国服] 中途岛", "cn_ios-2": "[国服] 中途岛",
@@ -2402,6 +2402,7 @@
"Gui": { "Gui": {
"Aside": { "Aside": {
"Install": "インストール", "Install": "インストール",
"Home": "Gui.Aside.Home",
"Develop": "開発", "Develop": "開発",
"Performance": "機能", "Performance": "機能",
"Setting": "設定", "Setting": "設定",

View File

@@ -98,10 +98,6 @@
"name": "作战档案", "name": "作战档案",
"help": "由于作战档案缺少维护开荒功能不一定能正常使用如果发现Alas运行异常请手动完成开荒后使用自律寻敌功能" "help": "由于作战档案缺少维护开荒功能不一定能正常使用如果发现Alas运行异常请手动完成开荒后使用自律寻敌功能"
}, },
"CoalitionSp": {
"name": "极地风暴每日SP",
"help": ""
},
"EventA": { "EventA": {
"name": "活动每日A图", "name": "活动每日A图",
"help": "" "help": ""
@@ -126,6 +122,10 @@
"name": "共斗活动每日", "name": "共斗活动每日",
"help": "" "help": ""
}, },
"CoalitionSp": {
"name": "极地风暴每日SP",
"help": ""
},
"Commission": { "Commission": {
"name": "委托", "name": "委托",
"help": "" "help": ""
@@ -355,7 +355,7 @@
"cn_android-20": "[国服] 水星行动", "cn_android-20": "[国服] 水星行动",
"cn_android-21": "[国服] 莱茵河卫兵", "cn_android-21": "[国服] 莱茵河卫兵",
"cn_android-22": "[国服] 北极光计划", "cn_android-22": "[国服] 北极光计划",
"cn_android-23": "[国服] 长戟计划", "cn_android-23": "[国服] 长戟计划",
"cn_ios-0": "[国服] 夏威夷", "cn_ios-0": "[国服] 夏威夷",
"cn_ios-1": "[国服] 珊瑚海", "cn_ios-1": "[国服] 珊瑚海",
"cn_ios-2": "[国服] 中途岛", "cn_ios-2": "[国服] 中途岛",
@@ -2402,6 +2402,7 @@
"Gui": { "Gui": {
"Aside": { "Aside": {
"Install": "安装", "Install": "安装",
"Home": "主页",
"Develop": "开发", "Develop": "开发",
"Performance": "性能", "Performance": "性能",
"Setting": "设置", "Setting": "设置",

View File

@@ -98,10 +98,6 @@
"name": "作戰檔案", "name": "作戰檔案",
"help": "由於作戰檔案缺少維護開荒功能不一定能正常使用如果發現Alas運行异常請手動完成開荒後使用自律尋敵功能" "help": "由於作戰檔案缺少維護開荒功能不一定能正常使用如果發現Alas運行异常請手動完成開荒後使用自律尋敵功能"
}, },
"CoalitionSp": {
"name": "極地風暴每日SP",
"help": ""
},
"EventA": { "EventA": {
"name": "活動每日A圖", "name": "活動每日A圖",
"help": "" "help": ""
@@ -126,6 +122,10 @@
"name": "共鬥活動每日", "name": "共鬥活動每日",
"help": "" "help": ""
}, },
"CoalitionSp": {
"name": "極地風暴每日SP",
"help": ""
},
"Commission": { "Commission": {
"name": "委託", "name": "委託",
"help": "" "help": ""
@@ -355,7 +355,7 @@
"cn_android-20": "[国服] 水星行动", "cn_android-20": "[国服] 水星行动",
"cn_android-21": "[国服] 莱茵河卫兵", "cn_android-21": "[国服] 莱茵河卫兵",
"cn_android-22": "[国服] 北极光计划", "cn_android-22": "[国服] 北极光计划",
"cn_android-23": "[国服] 长戟计划", "cn_android-23": "[国服] 长戟计划",
"cn_ios-0": "[国服] 夏威夷", "cn_ios-0": "[国服] 夏威夷",
"cn_ios-1": "[国服] 珊瑚海", "cn_ios-1": "[国服] 珊瑚海",
"cn_ios-2": "[国服] 中途岛", "cn_ios-2": "[国服] 中途岛",
@@ -2402,6 +2402,7 @@
"Gui": { "Gui": {
"Aside": { "Aside": {
"Install": "安裝", "Install": "安裝",
"Home": "主頁",
"Develop": "開發", "Develop": "開發",
"Performance": "性能", "Performance": "性能",
"Setting": "設定", "Setting": "設定",

View File

@@ -40,7 +40,7 @@ VALID_SERVER_LIST = {
'杜立特空袭', '地狱犬行动', '开罗宣言', '奥林匹克行动', '杜立特空袭', '地狱犬行动', '开罗宣言', '奥林匹克行动',
'小王冠行动', '波茨坦公告', '白色方案', '瓦尔基里行动', '小王冠行动', '波茨坦公告', '白色方案', '瓦尔基里行动',
'曼哈顿计划', '八月风暴', '秋季旅行', '水星行动', '莱茵河卫兵', '曼哈顿计划', '八月风暴', '秋季旅行', '水星行动', '莱茵河卫兵',
'北极光计划', ' 长戟计划' '北极光计划', '长戟计划'
], ],
'cn_ios': [ 'cn_ios': [
'夏威夷', '珊瑚海', '中途岛', '铁底湾', '所罗门', '马里亚纳', '夏威夷', '珊瑚海', '中途岛', '铁底湾', '所罗门', '马里亚纳',

View File

@@ -6,6 +6,32 @@ from datetime import datetime
from functools import partial from functools import partial
from typing import Dict, List, Optional from typing import Dict, List, Optional
from pywebio import config as webconfig
from pywebio.output import (
Output,
clear,
close_popup,
popup,
put_button,
put_buttons,
put_collapse,
put_column,
put_error,
put_html,
put_link,
put_loading,
put_markdown,
put_row,
put_scope,
put_table,
put_text,
put_warning,
toast,
use_scope,
)
from pywebio.pin import pin, pin_on_change
from pywebio.session import go_app, info, local, register_thread, run_js, set_env
import module.webui.lang as lang import module.webui.lang as lang
from module.config.config import AzurLaneConfig, Function from module.config.config import AzurLaneConfig, Function
from module.config.utils import ( from module.config.utils import (
@@ -31,7 +57,6 @@ from module.webui.pin import put_input, put_select
from module.webui.process_manager import ProcessManager from module.webui.process_manager import ProcessManager
from module.webui.remote_access import RemoteAccess from module.webui.remote_access import RemoteAccess
from module.webui.setting import State from module.webui.setting import State
from module.webui.translate import translate
from module.webui.updater import updater from module.webui.updater import updater
from module.webui.utils import ( from module.webui.utils import (
Icon, Icon,
@@ -56,31 +81,6 @@ from module.webui.widgets import (
put_none, put_none,
put_output, put_output,
) )
from pywebio import config as webconfig
from pywebio.output import (
Output,
clear,
close_popup,
popup,
put_button,
put_buttons,
put_collapse,
put_column,
put_error,
put_html,
put_link,
put_loading,
put_markdown,
put_row,
put_scope,
put_table,
put_text,
put_warning,
toast,
use_scope,
)
from pywebio.pin import pin, pin_on_change
from pywebio.session import go_app, info, local, register_thread, run_js, set_env
task_handler = TaskHandler() task_handler = TaskHandler()
@@ -111,7 +111,7 @@ class AlasGUI(Frame):
put_icon_buttons( put_icon_buttons(
Icon.DEVELOP, Icon.DEVELOP,
buttons=[ buttons=[
{"label": t("Gui.Aside.Develop"), "value": "Develop", "color": "aside"} {"label": t("Gui.Aside.Home"), "value": "Home", "color": "aside"}
], ],
onclick=[self.ui_develop], onclick=[self.ui_develop],
), ),
@@ -921,8 +921,8 @@ class AlasGUI(Frame):
if not self.is_mobile: if not self.is_mobile:
self.show() self.show()
return return
self.init_aside(name="Develop") self.init_aside(name="Home")
self.set_title(t("Gui.Aside.Develop")) self.set_title(t("Gui.Aside.Home"))
self.dev_set_menu() self.dev_set_menu()
self.alas_name = "" self.alas_name = ""
if hasattr(self, "alas"): if hasattr(self, "alas"):
@@ -996,7 +996,7 @@ class AlasGUI(Frame):
def show(self) -> None: def show(self) -> None:
self._show() self._show()
self.set_aside() self.set_aside()
self.init_aside(name="Develop") self.init_aside(name="Home")
self.dev_set_menu() self.dev_set_menu()
self.init_menu(name="HomePage") self.init_menu(name="HomePage")
self.alas_name = "" self.alas_name = ""
@@ -1147,7 +1147,7 @@ class AlasGUI(Frame):
self.task_handler.start() self.task_handler.start()
# Return to previous page # Return to previous page
if aside not in ["Develop", None]: if aside not in ["Home", None]:
self.ui_alas(aside) self.ui_alas(aside)