mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-13 17:09:15 +00:00
Add Relay URL info to nostr relay page
This commit is contained in:
parent
4c6e85a7b4
commit
dcaded8409
|
@ -53,6 +53,15 @@
|
||||||
"For example, you can add the relay to noscl via the command: noscl relay add wss://localhost:5051",
|
"For example, you can add the relay to noscl via the command: noscl relay add wss://localhost:5051",
|
||||||
"Enjoy!"
|
"Enjoy!"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "Relay Addresses",
|
||||||
|
"content": [
|
||||||
|
"wss://{LOCAL_IP_ADDRESS}:5051",
|
||||||
|
"wss://{APP_TOR_ADDRESS}:5051",
|
||||||
|
"ws://{LOCAL_IP_ADDRESS}:5050",
|
||||||
|
"ws://{APP_TOR_ADDRESS}:5050"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"can_uninstall": true,
|
"can_uninstall": true,
|
||||||
|
|
|
@ -169,6 +169,7 @@ def replace_app_info_variables(app_data, text):
|
||||||
if app_data["https_port"] != None:
|
if app_data["https_port"] != None:
|
||||||
text = text.replace("{HTTPS_PORT}", str(app_data["https_port"]))
|
text = text.replace("{HTTPS_PORT}", str(app_data["https_port"]))
|
||||||
text = text.replace("{APP_TOR_ADDRESS}", get_onion_url_for_service(app_data["short_name"]))
|
text = text.replace("{APP_TOR_ADDRESS}", get_onion_url_for_service(app_data["short_name"]))
|
||||||
|
text = text.replace("{LOCAL_IP_ADDRESS}", get_local_ip())
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def initialize_application_defaults(app):
|
def initialize_application_defaults(app):
|
||||||
|
@ -241,6 +242,10 @@ def initialize_application_defaults(app):
|
||||||
btn["onclick"] = replace_app_info_variables(app, btn["onclick"])
|
btn["onclick"] = replace_app_info_variables(app, btn["onclick"])
|
||||||
for key in app["install_env_vars"]:
|
for key in app["install_env_vars"]:
|
||||||
app["install_env_vars"][key] = replace_app_info_variables(app, app["install_env_vars"][key])
|
app["install_env_vars"][key] = replace_app_info_variables(app, app["install_env_vars"][key])
|
||||||
|
for i,section in enumerate(app["app_page_content"]):
|
||||||
|
for j,line in enumerate(section["content"]):
|
||||||
|
section["content"][j] = replace_app_info_variables(app, line)
|
||||||
|
app["app_page_content"][i] = section
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user