Merge Bitcoin categories into one; rename Self-Hosted Apps to Personal Apps
- One "Bitcoin" category: the service catalog distinguishes bitcoin-base
from bitcoin-apps, which surfaced as two sidebar menus and two tile
sections. The Hub now normalizes both into a single "Bitcoin" category
(nav item with combined count, one tile section). CATEGORY_ALIASES in
constants.js maps the catalog keys; server config sends one
("bitcoin", "Bitcoin") entry and the node role allowlist is updated
to match. The nix catalog is unchanged.
- "Self-Hosted Apps" is now "Personal Apps" — every service here is
self-hosted, so the label added no distinction.
This commit is contained in:
@@ -234,10 +234,9 @@ _support_expiry_timer_lock = Lock()
|
|||||||
|
|
||||||
CATEGORY_ORDER = [
|
CATEGORY_ORDER = [
|
||||||
("infrastructure", "Infrastructure"),
|
("infrastructure", "Infrastructure"),
|
||||||
("bitcoin-base", "Bitcoin Base"),
|
("bitcoin", "Bitcoin"),
|
||||||
("bitcoin-apps", "Bitcoin Apps"),
|
|
||||||
("communication", "Communication"),
|
("communication", "Communication"),
|
||||||
("apps", "Self-Hosted Apps"),
|
("apps", "Personal Apps"),
|
||||||
("nostr", "Nostr"),
|
("nostr", "Nostr"),
|
||||||
("support", "Support"),
|
("support", "Support"),
|
||||||
("feature-manager", "Feature Manager"),
|
("feature-manager", "Feature Manager"),
|
||||||
@@ -452,7 +451,7 @@ ROLE_LABELS = {
|
|||||||
ROLE_CATEGORIES: dict[str, set[str] | None] = {
|
ROLE_CATEGORIES: dict[str, set[str] | None] = {
|
||||||
"server_plus_desktop": None,
|
"server_plus_desktop": None,
|
||||||
"desktop": {"infrastructure", "support", "feature-manager"},
|
"desktop": {"infrastructure", "support", "feature-manager"},
|
||||||
"node": {"infrastructure", "bitcoin-base", "bitcoin-apps", "support", "feature-manager"},
|
"node": {"infrastructure", "bitcoin", "support", "feature-manager"},
|
||||||
}
|
}
|
||||||
|
|
||||||
# Features shown per role (None = show all)
|
# Features shown per role (None = show all)
|
||||||
|
|||||||
@@ -23,13 +23,19 @@ const SUPPORT_TIMER_INTERVAL = 1000;
|
|||||||
|
|
||||||
const CATEGORY_ORDER = [
|
const CATEGORY_ORDER = [
|
||||||
"infrastructure",
|
"infrastructure",
|
||||||
"bitcoin-base",
|
"bitcoin",
|
||||||
"bitcoin-apps",
|
|
||||||
"communication",
|
"communication",
|
||||||
"apps",
|
"apps",
|
||||||
"nostr",
|
"nostr",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/* The service catalog still distinguishes the Bitcoin foundation services
|
||||||
|
from the Bitcoin apps; the Hub shows them as one "Bitcoin" section. */
|
||||||
|
const CATEGORY_ALIASES = {
|
||||||
|
"bitcoin-base": "bitcoin",
|
||||||
|
"bitcoin-apps": "bitcoin",
|
||||||
|
};
|
||||||
|
|
||||||
const FEATURE_SUBCATEGORY_LABELS = {
|
const FEATURE_SUBCATEGORY_LABELS = {
|
||||||
"infrastructure": "🔧 Infrastructure",
|
"infrastructure": "🔧 Infrastructure",
|
||||||
"bitcoin": "₿ Bitcoin",
|
"bitcoin": "₿ Bitcoin",
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
var CAT_ICONS = {
|
var CAT_ICONS = {
|
||||||
"all": "g-grid",
|
"all": "g-grid",
|
||||||
"infrastructure": "g-server",
|
"infrastructure": "g-server",
|
||||||
"bitcoin-base": "g-btc-sym",
|
"bitcoin": "g-btc-sym",
|
||||||
"bitcoin-apps": "g-btc-sym",
|
|
||||||
"communication": "g-chat",
|
"communication": "g-chat",
|
||||||
"apps": "g-dots",
|
"apps": "g-dots",
|
||||||
"nostr": "g-antenna",
|
"nostr": "g-antenna",
|
||||||
@@ -34,8 +33,7 @@
|
|||||||
|
|
||||||
var CAT_FALLBACK_LABELS = {
|
var CAT_FALLBACK_LABELS = {
|
||||||
"infrastructure": "Infrastructure",
|
"infrastructure": "Infrastructure",
|
||||||
"bitcoin-base": "Bitcoin",
|
"bitcoin": "Bitcoin",
|
||||||
"bitcoin-apps": "Bitcoin Apps",
|
|
||||||
"communication": "Communication",
|
"communication": "Communication",
|
||||||
"apps": "Personal Apps",
|
"apps": "Personal Apps",
|
||||||
"nostr": "Nostr",
|
"nostr": "Nostr",
|
||||||
@@ -75,6 +73,7 @@
|
|||||||
var order = [];
|
var order = [];
|
||||||
visibleServices().forEach(function (s) {
|
visibleServices().forEach(function (s) {
|
||||||
var cat = s.category || "other";
|
var cat = s.category || "other";
|
||||||
|
if (CATEGORY_ALIASES[cat]) cat = CATEGORY_ALIASES[cat];
|
||||||
if (!counts[cat]) { counts[cat] = 0; order.push(cat); }
|
if (!counts[cat]) { counts[cat] = 0; order.push(cat); }
|
||||||
counts[cat]++;
|
counts[cat]++;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ function buildTiles(services, categoryLabels) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var cat = svc.category || "other";
|
var cat = svc.category || "other";
|
||||||
|
if (CATEGORY_ALIASES[cat]) cat = CATEGORY_ALIASES[cat];
|
||||||
if (!grouped[cat]) grouped[cat] = [];
|
if (!grouped[cat]) grouped[cat] = [];
|
||||||
grouped[cat].push(svc);
|
grouped[cat].push(svc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user