updated layout in hub
This commit is contained in:
1
app/icons/bip110.svg
Normal file
1
app/icons/bip110.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="30" fill="#1E3A5F"/><text x="32" y="28" font-family="sans-serif" font-size="12" font-weight="bold" fill="#F7931A" text-anchor="middle">BIP</text><text x="32" y="46" font-family="sans-serif" font-size="18" font-weight="bold" fill="white" text-anchor="middle">110</text></svg>
|
||||||
|
After Width: | Height: | Size: 362 B |
1
app/icons/bitcoin-core.svg
Normal file
1
app/icons/bitcoin-core.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="30" fill="#F7931A"/><circle cx="32" cy="32" r="22" fill="none" stroke="white" stroke-width="2"/><text x="32" y="44" font-family="sans-serif" font-size="30" font-weight="bold" fill="white" text-anchor="middle">₿</text></svg>
|
||||||
|
After Width: | Height: | Size: 313 B |
@@ -22,7 +22,8 @@ Adw.init()
|
|||||||
# Category display order and labels
|
# Category display order and labels
|
||||||
CATEGORY_ORDER = [
|
CATEGORY_ORDER = [
|
||||||
("infrastructure", "Infrastructure"),
|
("infrastructure", "Infrastructure"),
|
||||||
("bitcoin", "Bitcoin"),
|
("bitcoin-base", "Bitcoin Base"),
|
||||||
|
("bitcoin-apps", "Bitcoin Apps"),
|
||||||
("communication", "Communication"),
|
("communication", "Communication"),
|
||||||
("apps", "Self-Hosted Apps"),
|
("apps", "Self-Hosted Apps"),
|
||||||
("nostr", "Nostr"),
|
("nostr", "Nostr"),
|
||||||
@@ -57,17 +58,7 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
header = Adw.HeaderBar()
|
header = Adw.HeaderBar()
|
||||||
|
header.set_title_widget(self._build_title_box())
|
||||||
# Show active role in header
|
|
||||||
role = config.get("role", "server_plus_desktop")
|
|
||||||
role_label = ROLE_LABELS.get(role, role)
|
|
||||||
role_tag = Gtk.Label(
|
|
||||||
label=role_label,
|
|
||||||
css_classes=["caption", "role-badge"],
|
|
||||||
)
|
|
||||||
header.set_title_widget(
|
|
||||||
self._build_title_box(role_label)
|
|
||||||
)
|
|
||||||
|
|
||||||
refresh_btn = Gtk.Button(
|
refresh_btn = Gtk.Button(
|
||||||
icon_name="view-refresh-symbolic",
|
icon_name="view-refresh-symbolic",
|
||||||
@@ -76,7 +67,6 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
refresh_btn.connect("clicked", lambda _b: self._refresh_all())
|
refresh_btn.connect("clicked", lambda _b: self._refresh_all())
|
||||||
header.pack_end(refresh_btn)
|
header.pack_end(refresh_btn)
|
||||||
|
|
||||||
# Main vertical layout
|
|
||||||
self._main_box = Gtk.Box(
|
self._main_box = Gtk.Box(
|
||||||
orientation=Gtk.Orientation.VERTICAL,
|
orientation=Gtk.Orientation.VERTICAL,
|
||||||
spacing=0,
|
spacing=0,
|
||||||
@@ -100,7 +90,9 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
if interval and interval > 0:
|
if interval and interval > 0:
|
||||||
GLib.timeout_add_seconds(interval, self._auto_refresh)
|
GLib.timeout_add_seconds(interval, self._auto_refresh)
|
||||||
|
|
||||||
def _build_title_box(self, role_label):
|
def _build_title_box(self):
|
||||||
|
role = self._config.get("role", "server_plus_desktop")
|
||||||
|
role_label = ROLE_LABELS.get(role, role)
|
||||||
box = Gtk.Box(
|
box = Gtk.Box(
|
||||||
orientation=Gtk.Orientation.VERTICAL,
|
orientation=Gtk.Orientation.VERTICAL,
|
||||||
halign=Gtk.Align.CENTER,
|
halign=Gtk.Align.CENTER,
|
||||||
@@ -141,7 +133,6 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
)
|
)
|
||||||
self._main_box.append(section_label)
|
self._main_box.append(section_label)
|
||||||
|
|
||||||
# Separator
|
|
||||||
sep = Gtk.Separator(
|
sep = Gtk.Separator(
|
||||||
orientation=Gtk.Orientation.HORIZONTAL,
|
orientation=Gtk.Orientation.HORIZONTAL,
|
||||||
margin_start=24,
|
margin_start=24,
|
||||||
@@ -150,7 +141,6 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
)
|
)
|
||||||
self._main_box.append(sep)
|
self._main_box.append(sep)
|
||||||
|
|
||||||
# FlowBox for this category
|
|
||||||
flowbox = Gtk.FlowBox(
|
flowbox = Gtk.FlowBox(
|
||||||
max_children_per_line=4,
|
max_children_per_line=4,
|
||||||
min_children_per_line=2,
|
min_children_per_line=2,
|
||||||
@@ -180,7 +170,6 @@ class SovranHubWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
self._main_box.append(flowbox)
|
self._main_box.append(flowbox)
|
||||||
|
|
||||||
# Defer first status poll so the window renders immediately
|
|
||||||
GLib.idle_add(self._refresh_all)
|
GLib.idle_add(self._refresh_all)
|
||||||
|
|
||||||
def _refresh_all(self):
|
def _refresh_all(self):
|
||||||
|
|||||||
@@ -3,31 +3,30 @@
|
|||||||
let
|
let
|
||||||
cfg = config.sovran_systemsOS;
|
cfg = config.sovran_systemsOS;
|
||||||
|
|
||||||
# ── Determine Bitcoin implementation label ───────────────────
|
|
||||||
bitcoinImplName =
|
|
||||||
if cfg.features.bitcoin-core then "Bitcoin Core"
|
|
||||||
else if cfg.features.bip110 then "Bitcoin Knots + BIP110"
|
|
||||||
else "Bitcoin Knots";
|
|
||||||
|
|
||||||
monitoredServices =
|
monitoredServices =
|
||||||
# ── Infrastructure (always present) ────────────────────────
|
# ── Infrastructure (always present) ────────────────────────
|
||||||
[
|
[
|
||||||
{ name = "Caddy"; unit = "caddy.service"; type = "system"; icon = "caddy"; enabled = true; category = "infrastructure"; }
|
{ name = "Caddy"; unit = "caddy.service"; type = "system"; icon = "caddy"; enabled = true; category = "infrastructure"; }
|
||||||
{ name = "Tor"; unit = "tor.service"; type = "system"; icon = "tor"; enabled = true; category = "infrastructure"; }
|
{ name = "Tor"; unit = "tor.service"; type = "system"; icon = "tor"; enabled = true; category = "infrastructure"; }
|
||||||
]
|
]
|
||||||
# ── Bitcoin Ecosystem ──────────────────────────────────────
|
# ── Bitcoin Base (node implementations) ────────────────────
|
||||||
++ [
|
++ [
|
||||||
{ name = bitcoinImplName; unit = "bitcoind.service"; type = "system"; icon = "bitcoind"; enabled = cfg.services.bitcoin; category = "bitcoin"; }
|
{ name = "Bitcoin Knots"; unit = "bitcoind.service"; type = "system"; icon = "bitcoind"; enabled = cfg.services.bitcoin && !cfg.features.bitcoin-core && !cfg.features.bip110; category = "bitcoin-base"; }
|
||||||
{ name = "Electrs"; unit = "electrs.service"; type = "system"; icon = "electrs"; enabled = cfg.services.bitcoin; category = "bitcoin"; }
|
{ name = "Bitcoin Core"; unit = "bitcoind.service"; type = "system"; icon = "bitcoin-core"; enabled = cfg.features.bitcoin-core; category = "bitcoin-base"; }
|
||||||
{ name = "LND"; unit = "lnd.service"; type = "system"; icon = "lnd"; enabled = cfg.services.bitcoin; category = "bitcoin"; }
|
{ name = "Bitcoin Knots + BIP110"; unit = "bitcoind.service"; type = "system"; icon = "bip110"; enabled = cfg.features.bip110; category = "bitcoin-base"; }
|
||||||
{ name = "Ride The Lightning"; unit = "rtl.service"; type = "system"; icon = "rtl"; enabled = cfg.services.bitcoin; category = "bitcoin"; }
|
]
|
||||||
{ name = "BTCPayserver"; unit = "btcpayserver.service"; type = "system"; icon = "btcpayserver"; enabled = cfg.services.bitcoin; category = "bitcoin"; }
|
# ── Bitcoin Apps (services on top of the node) ─────────────
|
||||||
{ name = "Mempool"; unit = "mempool.service"; type = "system"; icon = "mempool"; enabled = cfg.features.mempool; category = "bitcoin"; }
|
++ [
|
||||||
|
{ name = "Electrs"; unit = "electrs.service"; type = "system"; icon = "electrs"; enabled = cfg.services.bitcoin; category = "bitcoin-apps"; }
|
||||||
|
{ name = "LND"; unit = "lnd.service"; type = "system"; icon = "lnd"; enabled = cfg.services.bitcoin; category = "bitcoin-apps"; }
|
||||||
|
{ name = "Ride The Lightning"; unit = "rtl.service"; type = "system"; icon = "rtl"; enabled = cfg.services.bitcoin; category = "bitcoin-apps"; }
|
||||||
|
{ name = "BTCPayserver"; unit = "btcpayserver.service"; type = "system"; icon = "btcpayserver"; enabled = cfg.services.bitcoin; category = "bitcoin-apps"; }
|
||||||
|
{ name = "Mempool"; unit = "mempool.service"; type = "system"; icon = "mempool"; enabled = cfg.features.mempool; category = "bitcoin-apps"; }
|
||||||
]
|
]
|
||||||
# ── Communication ──────────────────────────────────────────
|
# ── Communication ──────────────────────────────────────────
|
||||||
++ [
|
++ [
|
||||||
{ name = "Matrix-Synapse"; unit = "matrix-synapse.service"; type = "system"; icon = "synapse"; enabled = cfg.services.synapse; category = "communication"; }
|
{ name = "Matrix-Synapse"; unit = "matrix-synapse.service"; type = "system"; icon = "synapse"; enabled = cfg.services.synapse; category = "communication"; }
|
||||||
{ name = "Element-Call"; unit = "livekit.service"; type = "system"; icon = "livekit"; enabled = cfg.features.element-calling; category = "communication"; }
|
{ name = "Element-Call"; unit = "livekit.service"; type = "system"; icon = "livekit"; enabled = cfg.features.element-calling; category = "communication"; }
|
||||||
]
|
]
|
||||||
# ── Self-Hosted Apps ───────────────────────────────────────
|
# ── Self-Hosted Apps ───────────────────────────────────────
|
||||||
++ [
|
++ [
|
||||||
@@ -40,7 +39,6 @@ let
|
|||||||
{ name = "Haven Relay"; unit = "haven-relay.service"; type = "system"; icon = "haven"; enabled = cfg.features.haven; category = "nostr"; }
|
{ name = "Haven Relay"; unit = "haven-relay.service"; type = "system"; icon = "haven"; enabled = cfg.features.haven; category = "nostr"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# ── Determine active role name ───────────────────────────────
|
|
||||||
activeRole =
|
activeRole =
|
||||||
if cfg.roles.desktop then "desktop"
|
if cfg.roles.desktop then "desktop"
|
||||||
else if cfg.roles.node then "node"
|
else if cfg.roles.node then "node"
|
||||||
|
|||||||
Reference in New Issue
Block a user