Format HJSON

This commit is contained in:
Bryan Ashby 2023-02-20 16:39:51 -07:00
parent 777df9f879
commit 40e07d7d84
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 161 additions and 223 deletions

View File

@ -1,264 +1,202 @@
{ {
"menus": { menus: {
"activityPubMenu": { activityPubMenu: {
"desc": "ActivityPub", desc: ActivityPub
"art": "activitypub_menu", art: activitypub_menu
"prompt": "menuCommand", prompt: menuCommand
"submit": [ submit: [
{ {
"value": { value: {command: "S"}
"command": "S" action: @menu:activityPubActorSearch
},
"action": "@menu:activityPubActorSearch"
},
{
"value": {
"command": "C"
},
"action": "@menu:activityPubUserConfig"
},
{
"value": {
"command": "M"
},
"action": "@menu:activityPubSocialManager"
},
{
"value": {
"command": "Q"
},
"action": "@menu:mainMenu"
},
]
},
"activityPubActorSearch": {
"desc": "Viewing ActivityPub",
"module": "activitypub/actor_search",
"config": {
"cls": true,
"art": {
"main": "activitypub_actor_search_main",
"view": "activitypub_actor_view"
} }
}, {
"form": { value: {command: "C"}
"0": { action: @menu:activityPubUserConfig
"mci": { }
"ET1": { {
"focus": true, value: {command: "M"}
"maxLength": 70, action: @menu:activityPubSocialManager
"argName": "searchQuery", }
"submit": true {
value: {command: "Q"}
action: @menu:mainMenu
}
]
}
activityPubActorSearch: {
desc: Viewing ActivityPub
module: activitypub/actor_search
config: {
cls: true
art: {
main: activitypub_actor_search_main
view: activitypub_actor_view
}
}
form: {
0: {
mci: {
ET1: {
focus: true
maxLength: 70
argName: searchQuery
submit: true
} }
}, }
"submit": { submit: {
"*": [ *: [
{ {
"value": { value: {searchQuery: null}
"searchQuery": null action: @method:search
},
"action": "@method:search"
} }
] ]
}, }
"actionKeys": [ actionKeys: [
{ {
"keys": [ keys: ["escape"]
"escape" action: @systemMethod:prevMenu
],
"action": "@systemMethod:prevMenu"
} }
] ]
}, }
"1": { 1: {
"mci": {}, mci: {}
"actionKeys": [ actionKeys: [
{ {
"keys": [ keys: ["escape", "q", "shift + q"]
"escape", action: @method:backKeyPressed
"q", }
"shift + q"
],
"action": "@method:backKeyPressed"
},
{ {
"keys": [ keys: ["space"]
"space" action: @method:toggleFollowKeyPressed
],
"action": "@method:toggleFollowKeyPressed"
} }
] ]
} }
} }
}, }
"activityPubUserConfig": { activityPubUserConfig: {
"desc": "ActivityPub Config", desc: ActivityPub Config
"module": "./activitypub/user_config", module: ./activitypub/user_config
"config": { config: {
"art": { art: {
"main": "activitypub_user_config_main", main: activitypub_user_config_main
"images": "activitypub_user_config_images" images: activitypub_user_config_images
} }
}, }
"form": { form: {
"0": { 0: {
"mci": { mci: {
"TM1": { TM1: {
"focus": true, focus: true
"items": [ items: ["yes", "no"]
"yes", argName: enabled
"no"
],
"argName": "enabled"
},
"TM2": {
"items": [
"yes",
"no"
],
"argName": "manuallyApproveFollowers"
},
"TM3": {
"items": [
"yes",
"no"
],
"argName": "hideSocialGraph"
},
"TM4": {
"items": [
"yes",
"no"
],
"argName": "showRealName"
},
"TL5": {
"argName": "image"
},
"TL6": {
"argName": "icon"
},
"BT7": {
"text": "manage images",
"argName": "manageImages",
"submit": true,
"justify": "center"
},
"TM8": {
"items": [
"save",
"cancel"
],
"submit": true,
"argName": "saveOrCancel"
} }
}, TM2: {
"submit": { items: ["yes", "no"]
"*": [ argName: manuallyApproveFollowers
}
TM3: {
items: ["yes", "no"]
argName: hideSocialGraph
}
TM4: {
items: ["yes", "no"]
argName: showRealName
}
TL5: {argName: "image"}
TL6: {argName: "icon"}
BT7: {
text: manage images
argName: manageImages
submit: true
justify: center
}
TM8: {
items: ["save", "cancel"]
submit: true
argName: saveOrCancel
}
}
submit: {
*: [
{ {
// :TODO: we need a way to just want the argName *for the submitting item* and drop others // :TODO: we need a way to just want the argName *for the submitting item* and drop others
"value": { value: {manageImages: null}
"manageImages": null action: @method:mainSubmit
},
"action": "@method:mainSubmit"
} }
] ]
}, }
"actionKeys": "@reference:common.escToPrev" actionKeys: @reference:common.escToPrev
}, }
"1": { 1: {
"mci": { mci: {
"ML1": { ML1: {
"argName": "imageUrl", argName: imageUrl
"mode": "edit", mode: edit
"scrollMode": "start", scrollMode: start
"focus": true, focus: true
"tabSwitchesView": true tabSwitchesView: true
},
"ML2": {
"argName": "iconUrl",
"mode": "edit",
"scrollMode": "start",
"tabSwitchesView": true
},
"TM3": {
"items": [
"save",
"cancel"
],
"submit": true,
"argName": "imagesSaveOrCancel"
} }
}, ML2: {
"submit": { argName: iconUrl
"*": [ mode: edit
scrollMode: start
tabSwitchesView: true
}
TM3: {
items: ["save", "cancel"]
submit: true
argName: imagesSaveOrCancel
}
}
submit: {
*: [
{ {
"value": { value: {imagesSaveOrCancel: null}
"imagesSaveOrCancel": null action: @method:imagesSubmit
},
"action": "@method:imagesSubmit"
} }
] ]
}, }
"actionKeys": [ actionKeys: [
{ {
"keys": [ keys: ["escape"]
"escape" action: @method:backToMain
],
"action": "@method:backToMain"
} }
] ]
} }
} }
}, }
"activityPubSocialManager": { activityPubSocialManager: {
"desc": "Social Manager", desc: Social Manager
"module": "./activitypub/social_manager", module: ./activitypub/social_manager
"config": { config: {
"art": { art: {main: "activitypub_social_manager"}
"main": "activitypub_social_manager" }
} form: {
}, 0: {
"form": { mci: {
"0": { VM1: {}
"mci": { MT2: {mode: "preview", acceptsFocus: false, acceptsInput: false}
"VM1": {}, TM3: {
"MT2": { focus: true
"mode": "preview", items: ["following", "followers"]
"acceptsFocus": false,
"acceptsInput": false
},
"TM3": {
"focus": true,
"items": [
"following",
"followers"
]
} }
}, }
"actionKeys": [ actionKeys: [
{ {
"keys": [ keys: ["space"]
"space" action: @method:spaceKeyPressed
], }
"action": "@method:spaceKeyPressed"
},
{ {
"keys": [ keys: ["down arrow", "up arrow"]
"down arrow", action: @method:listKeyPressed
"up arrow" }
],
"action": "@method:listKeyPressed"
},
{ {
"keys": [ keys: ["escape"]
"escape" action: @systemMethod:prevMenu
],
"action": "@systemMethod:prevMenu"
} }
] ]
} }
} }
} }
} }
} }