Add Astral App
This commit is contained in:
parent
a2101a78ac
commit
a3b8548fb1
63
rootfs/standard/usr/share/mynode_apps/astral/astral.json
Normal file
63
rootfs/standard/usr/share/mynode_apps/astral/astral.json
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"name": "Astral",
|
||||||
|
"short_name": "astral",
|
||||||
|
"author": {
|
||||||
|
"name": "monlovesmango",
|
||||||
|
"link": ""
|
||||||
|
},
|
||||||
|
"website": {
|
||||||
|
"name": "GitHub",
|
||||||
|
"link": "https://github.com/monlovesmango/astral"
|
||||||
|
},
|
||||||
|
"category": "communication",
|
||||||
|
"short_description": "Nostr Web Client",
|
||||||
|
"description": [
|
||||||
|
"Astral is a web client for interacting with Nostr, a protocol that attempts to make decentralized social media a reality. astral began as a fork of Branle."
|
||||||
|
],
|
||||||
|
"latest_version": "c5c36626c29e32bb91e951fac867333562a31296",
|
||||||
|
"supported_archs": null,
|
||||||
|
"download_skip": false,
|
||||||
|
"download_type": "source",
|
||||||
|
"download_source_url": "https://github.com/monlovesmango/astral/archive/c5c36626c29e32bb91e951fac867333562a31296.tar.gz",
|
||||||
|
"download_binary_url": {
|
||||||
|
"aarch64": "download_url",
|
||||||
|
"x86_64": "download_url"
|
||||||
|
},
|
||||||
|
"install_env_vars": {},
|
||||||
|
"supports_app_page": true,
|
||||||
|
"supports_testnet": false,
|
||||||
|
"http_port": 5040,
|
||||||
|
"https_port": 5041,
|
||||||
|
"requires_bitcoin": false,
|
||||||
|
"requires_docker_image_installation": false,
|
||||||
|
"requires_electrs": false,
|
||||||
|
"requires_lightning": false,
|
||||||
|
"show_on_application_page": true,
|
||||||
|
"show_on_homepage": true,
|
||||||
|
"show_on_status_page": true,
|
||||||
|
"hide_status_icon": false,
|
||||||
|
"app_tile_name": "Astral",
|
||||||
|
"app_tile_running_status_text": "Running",
|
||||||
|
"app_tile_button_text": "Info",
|
||||||
|
"app_tile_button_href": "/app/astral/info",
|
||||||
|
"app_page_show_open_button": true,
|
||||||
|
"app_page_content": [
|
||||||
|
{
|
||||||
|
"heading": "Instructions",
|
||||||
|
"content": [
|
||||||
|
"Open the applicationa and login with an existing private key or create a new one. Once logged in, you can interact via the Nostr protocol.",
|
||||||
|
"NOTE: This key is not related to your lightning wallet.",
|
||||||
|
"Enjoy!"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"can_uninstall": true,
|
||||||
|
"can_reinstall": true,
|
||||||
|
"can_enable_disable": true,
|
||||||
|
"is_beta": true,
|
||||||
|
"is_premium": false,
|
||||||
|
"homepage_section": "apps",
|
||||||
|
"homepage_order": 91,
|
||||||
|
"app_type": "custom",
|
||||||
|
"sdk_version": 2
|
||||||
|
}
|
BIN
rootfs/standard/usr/share/mynode_apps/astral/astral.png
Normal file
BIN
rootfs/standard/usr/share/mynode_apps/astral/astral.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
29
rootfs/standard/usr/share/mynode_apps/astral/astral.service
Normal file
29
rootfs/standard/usr/share/mynode_apps/astral/astral.service
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# astral service
|
||||||
|
# /etc/systemd/system/astral.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=astral
|
||||||
|
Wants=www.service docker_images.service
|
||||||
|
After=www.service docker_images.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/mynode/astral/dist/pwa
|
||||||
|
|
||||||
|
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||||
|
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_astral.sh ]; then /bin/bash /usr/bin/service_scripts/pre_astral.sh; fi'
|
||||||
|
ExecStart=/usr/bin/quasar serve -p 5040
|
||||||
|
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_astral.sh ]; then /bin/bash /usr/bin/service_scripts/post_astral.sh; fi'
|
||||||
|
#ExecStop=FILL_IN_EXECSTOP_AND_UNCOMMENT_IF_NEEDED
|
||||||
|
|
||||||
|
User=bitcoin
|
||||||
|
Group=bitcoin
|
||||||
|
Type=simple
|
||||||
|
TimeoutSec=120
|
||||||
|
Restart=always
|
||||||
|
RestartSec=60
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
SyslogIdentifier=astral
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
server {
|
||||||
|
listen 5041 ssl;
|
||||||
|
server_name astral;
|
||||||
|
|
||||||
|
include /etc/nginx/mynode/mynode_ssl_params.conf;
|
||||||
|
include /etc/nginx/mynode/mynode_ssl_cert_key.conf;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access_astral.log;
|
||||||
|
error_log /var/log/nginx/error_astral.log;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:5040;
|
||||||
|
|
||||||
|
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
BIN
rootfs/standard/usr/share/mynode_apps/astral/screenshots/1.png
Normal file
BIN
rootfs/standard/usr/share/mynode_apps/astral/screenshots/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 369 KiB |
BIN
rootfs/standard/usr/share/mynode_apps/astral/screenshots/2.png
Normal file
BIN
rootfs/standard/usr/share/mynode_apps/astral/screenshots/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /usr/share/mynode/mynode_device_info.sh
|
||||||
|
source /usr/share/mynode/mynode_app_versions.sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "==================== INSTALLING APP ===================="
|
||||||
|
|
||||||
|
# The current directory is the app install folder and the app tarball from GitHub
|
||||||
|
# has already been downloaded and extracted. Any additional env variables specified
|
||||||
|
# in the JSON file are also present.
|
||||||
|
|
||||||
|
npm install
|
||||||
|
npm run build:pwa
|
||||||
|
|
||||||
|
echo "================== DONE INSTALLING APP ================="
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This will run after launching the application
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This will run prior to launching the application
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /usr/share/mynode/mynode_device_info.sh
|
||||||
|
source /usr/share/mynode/mynode_app_versions.sh
|
||||||
|
|
||||||
|
echo "==================== UNINSTALLING APP ===================="
|
||||||
|
|
||||||
|
# The app folder will be removed automatically after this script runs. You may not need to do anything here.
|
||||||
|
|
||||||
|
# TODO: Perform special uninstallation steps here
|
||||||
|
|
||||||
|
echo "================== DONE UNINSTALLING APP ================="
|
|
@ -0,0 +1,32 @@
|
||||||
|
from flask import Blueprint, render_template, redirect
|
||||||
|
from user_management import check_logged_in
|
||||||
|
from enable_disable_functions import *
|
||||||
|
from device_info import *
|
||||||
|
from application_info import *
|
||||||
|
from systemctl_info import *
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
mynode_astral = Blueprint('mynode_astral',__name__)
|
||||||
|
|
||||||
|
|
||||||
|
### Page functions (have prefix /app/<app name/)
|
||||||
|
@mynode_astral.route("/info")
|
||||||
|
def astral_page():
|
||||||
|
check_logged_in()
|
||||||
|
|
||||||
|
app = get_application("astral")
|
||||||
|
app_status = get_application_status("astral")
|
||||||
|
app_status_color = get_application_status_color("astral")
|
||||||
|
|
||||||
|
# Load page
|
||||||
|
templateData = {
|
||||||
|
"title": "myNode - " + app["name"],
|
||||||
|
"ui_settings": read_ui_settings(),
|
||||||
|
"app_status": app_status,
|
||||||
|
"app_status_color": app_status_color,
|
||||||
|
"app": app
|
||||||
|
}
|
||||||
|
return render_template('/app/generic_app.html', **templateData)
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Custom Jinja templates (HTML files) can be added here for unique application pages
|
||||||
|
|
||||||
|
Templates will be available under applications/<short_name>/xyz.html
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
{% include 'includes/head.html' %}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{% include 'includes/logo_header.html' %}
|
||||||
|
<div class="mynode_top_left_div">
|
||||||
|
<a href="/"><img class="mynode_nav_icon" src="{{ url_for('static', filename="images/home.png")}}"/></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main_header">{{app.name}} (custom page - remove)</div>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<div class="app_tile_row">
|
||||||
|
<div class="info_tile">
|
||||||
|
<div class="info_tile_header">Status</div>
|
||||||
|
<div class="info_tile_contents">
|
||||||
|
<table class="info_table">
|
||||||
|
<tr>
|
||||||
|
<th>Status</th>
|
||||||
|
<td>{{app_status}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Actions</th>
|
||||||
|
<td>
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Open</a>
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button A</a>
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button B</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="instructions">
|
||||||
|
<div class="instructions-header">Instructions</div>
|
||||||
|
<ol class="instructions-steps">
|
||||||
|
<li>Custom instructions?</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="confirm-dialog"></div>
|
||||||
|
|
||||||
|
<div id="loading_spinner_overlay" class="loading_spinner_overlay" style="display:none;">
|
||||||
|
<img id="loading_spinner" class="loading_image" src="{{ url_for('static', filename="images/loading.gif")}}"/>
|
||||||
|
<br/>
|
||||||
|
<span id="loading_spinner_message">Loading...</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user