move app object

This commit is contained in:
gorojack 2024-07-19 11:32:15 +08:00
parent 48588d6dc1
commit 76534820e9
2 changed files with 36 additions and 35 deletions

40
dist/0.0.1_beta.json vendored

@ -2,9 +2,25 @@
"key": -1,
"name": "Test Subscription",
"version": "0.0.1_beta",
"apps": {
"hhjapp": {
"hhjapp": {
"global": {
"name": "全局测试",
"rules": [
{
"key": 0,
"selector": "[text='记账']",
"action": "click",
"actionDelay": 50
}
],
"apps": [
{
"id": "tech.cqxqg.hhjapp",
"enable": true
}
]
},
"apps": [
{
"packageName": "tech.cqxqg.hhjapp",
"name": "小新记账",
"version": "1.0.0",
@ -33,23 +49,5 @@
}
]
}
}
},
"global": {
"name": "全局测试",
"rules": [
{
"key": 0,
"selector": "[text='记账']",
"action": "click",
"actionDelay": 50
}
],
"apps": [
{
"id": "tech.cqxqg.hhjapp",
"enable": true
}
]
}
}

@ -10,12 +10,15 @@ version = "0.0.1_beta"
def get_subscription():
apps_folder = "apps"
apps = get_global_vars_from_apps(apps_folder)
apps_arr = []
for app_name in apps:
apps_arr.append(apps[app_name][app_name])
return {
"key": key,
"name": name,
"version": version,
"apps": apps,
"global": global_rules,
"apps": apps_arr,
}