diff --git a/api/internal/handlers/installation.go b/api/internal/handlers/installation.go index debce2964..38f4bcbc3 100644 --- a/api/internal/handlers/installation.go +++ b/api/internal/handlers/installation.go @@ -1,6 +1,7 @@ package handlers import ( + "context" "encoding/json" "log/slog" "net/http" @@ -14,25 +15,28 @@ import ( // MountInstallation exposes capabilities only through the authenticated router. func MountInstallation(r chi.Router, store *db.Store, standalone bool, version string) { r.Get("/admin/installation", func(w http.ResponseWriter, req *http.Request) { - // The display name is optional: a config failure must not hide the - // static capabilities that the rest of the dashboard depends on. - name := "gameplane" - raw, found, err := store.ConfigValue(req.Context(), "general") - if err != nil { - slog.Warn("installation name: read general config", "err", err) - } else if found { - var general generalCfg - if err := json.Unmarshal([]byte(raw), &general); err != nil { - slog.Warn("installation name: decode general config", "err", err) - } else if configuredName := strings.TrimSpace(general.InstanceName); configuredName != "" { - name = configuredName - } - } writeJSON(w, struct { Standalone bool `json:"standalone"` LocalCluster bool `json:"localCluster"` Version string `json:"version"` InstanceName string `json:"instanceName"` - }{Standalone: standalone, LocalCluster: !standalone, Version: version, InstanceName: name}) + }{Standalone: standalone, LocalCluster: !standalone, Version: version, InstanceName: installationDisplayName(req.Context(), store)}) }) } + +// The optional display name is shared by the dashboard and valid public links. +// A configuration failure must leave both available with the default brand. +func installationDisplayName(ctx context.Context, store *db.Store) string { + raw, found, err := store.ConfigValue(ctx, "general") + if err != nil { + slog.Warn("installation name: read general config", "err", err) + } else if found { + var general generalCfg + if err := json.Unmarshal([]byte(raw), &general); err != nil { + slog.Warn("installation name: decode general config", "err", err) + } else if name := strings.TrimSpace(general.InstanceName); name != "" { + return name + } + } + return "gameplane" +} diff --git a/api/internal/handlers/shares.go b/api/internal/handlers/shares.go index 962d1cb09..6c9a405c0 100644 --- a/api/internal/handlers/shares.go +++ b/api/internal/handlers/shares.go @@ -5,7 +5,9 @@ import ( "errors" "io" "net/http" + "net/netip" "strconv" + "strings" "time" "github.com/go-chi/chi/v5" @@ -13,6 +15,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/validation" "github.com/GameplanePanel/gameplane/api/internal/auth" "github.com/GameplanePanel/gameplane/api/internal/db" @@ -312,6 +315,8 @@ func mutateShareHandler(reg *kube.Registry, store *db.Store) http.HandlerFunc { type sharePublicResp struct { ServerName string `json:"serverName"` + InstanceName string `json:"instanceName"` + Description string `json:"description,omitempty"` Status string `json:"status"` ManuallyStopped bool `json:"manuallyStopped"` CanStart bool `json:"canStart"` @@ -384,6 +389,8 @@ func resolveShareHandler(reg *kube.Registry, store *db.Store) http.HandlerFunc { resp := sharePublicResp{ ServerName: link.ServerName, + InstanceName: installationDisplayName(req.Context(), store), + Description: strings.TrimSpace(obj.GetAnnotations()["gameplane.local/description"]), Status: status, Address: address, PlayersOnline: players, @@ -547,9 +554,8 @@ func getPlayersOnline(obj *unstructured.Unstructured) *int32 { return nil } -// getPublicAddress returns the first publicly reachable (non-private) endpoint -// that is served by a tunnel provider. If no tunnel endpoint, falls back to the -// first non-private regular endpoint. Returns nil if no suitable endpoint exists. +// getPublicAddress picks a published host and its matching port. The operator +// resolves per-server and template hostnames after the backing Service is ready. func getPublicAddress(obj *unstructured.Unstructured) *shareAddr { endpoints, ok, err := unstructured.NestedSlice(obj.Object, "status", "endpoints") if err != nil || !ok || len(endpoints) == 0 { @@ -557,7 +563,9 @@ func getPublicAddress(obj *unstructured.Unstructured) *shareAddr { } expose, _, _ := unstructured.NestedString(obj.Object, "spec", "networking", "expose") - var fallback *shareAddr + configuredHost, _, _ := unstructured.NestedString(obj.Object, "spec", "networking", "hostname") + var best *shareAddr + bestRank := 0 for _, ep := range endpoints { epMap, ok := ep.(map[string]interface{}) if !ok { @@ -569,26 +577,61 @@ func getPublicAddress(obj *unstructured.Unstructured) *shareAddr { } host, _, _ := unstructured.NestedString(epMap, "host") port := nestedPort(epMap) - if host == "" || port == 0 { + if host == "" || host == "None" || port == 0 { continue } provider, _, _ := unstructured.NestedString(epMap, "tunnelProvider") - if provider != "" { - return &shareAddr{Host: host, Port: port} - } + serviceAddress, _, _ := unstructured.NestedString(epMap, "serviceAddress") // Older operators published the Service ClusterIP as the NodePort // host. A refreshed endpoint records the ClusterIP separately. - if expose == "NodePort" { - serviceAddress, _, _ := unstructured.NestedString(epMap, "serviceAddress") - if serviceAddress == "" || serviceAddress == host { - continue - } + if provider == "" && expose == "NodePort" && (serviceAddress == "" || serviceAddress == host) { + continue } - if fallback == nil { - fallback = &shareAddr{Host: host, Port: port} + + rank := shareAddressRank(host, configuredHost, serviceAddress, provider) + if rank > bestRank { + best = &shareAddr{Host: host, Port: port} + bestRank = rank } } - return fallback + return best +} + +func shareAddressRank(host, configuredHost, serviceAddress, provider string) int { + const ( + invalid = iota + nativeIP + tunnelIP + nativeDNS + tunnelDNS + advertisedDNS + ) + // Some providers wrap IPv6 literals in brackets for use with a port. + if strings.HasPrefix(host, "[") { + addr, err := netip.ParseAddrPort(host + ":0") + if err != nil { + return invalid + } + host = addr.Addr().String() + } + if _, err := netip.ParseAddr(host); err == nil { + if provider != "" { + return tunnelIP + } + return nativeIP + } + if len(validation.IsDNS1123Subdomain(strings.ToLower(strings.TrimSuffix(host, ".")))) != 0 { + return invalid + } + if provider != "" { + return tunnelDNS + } + // The operator may advertise a template default identical to the load + // balancer's ingress hostname. Its source is indistinguishable in status. + if strings.EqualFold(host, configuredHost) || (configuredHost == "" && serviceAddress != "") { + return advertisedDNS + } + return nativeDNS } // nestedPort extracts the "port" field from an endpoint map as an int32. diff --git a/api/internal/handlers/shares_test.go b/api/internal/handlers/shares_test.go index c96d186d6..3fa7a3aca 100644 --- a/api/internal/handlers/shares_test.go +++ b/api/internal/handlers/shares_test.go @@ -241,8 +241,16 @@ func TestChangeShareWakePermission(t *testing.T) { func TestShareResolveValidToken(t *testing.T) { store := newTestStore(t) ownerID := insertShareTestUser(t, store, "owner-resolve") + if _, err := store.DB.ExecContext(t.Context(), `INSERT INTO config(key, value) VALUES ('general', '{"instanceName":" Northstar Games ","externalURL":"https://internal.example","defaultNamespace":"internal-games"}')`); err != nil { + t.Fatal(err) + } + server := newShareTestServer("srv-resolve", ownerID) + annotations := server.GetAnnotations() + annotations["gameplane.local/description"] = " A survival world for our community. " + annotations["internal.example/note"] = "internal-only note" + server.SetAnnotations(annotations) reg := kube.NewRegistry("local") - reg.Set("local", fakeKubeClient(newShareTestServer("srv-resolve", ownerID))) + reg.Set("local", fakeKubeClient(server)) h := mountSharesRouter(reg, store) owner := &auth.User{ID: ownerID, Username: "owner-resolve", Role: "admin"} @@ -270,6 +278,9 @@ func TestShareResolveValidToken(t *testing.T) { if resp["serverName"] != "srv-resolve" { t.Fatalf("serverName = %v, want srv-resolve; body=%s", resp["serverName"], body) } + if resp["instanceName"] != "Northstar Games" || resp["description"] != "A survival world for our community." || bytes.Contains(body, []byte("internal")) { + t.Fatalf("unexpected public share identity: %s", body) + } if resp["status"] != "Running" { t.Fatalf("status = %v, want Running; body=%s", resp["status"], body) } @@ -320,6 +331,9 @@ func TestShareResolvePrivateEndpointOmitted(t *testing.T) { if _, ok := resp["address"]; ok { t.Fatalf("address must be omitted for a private-only endpoint, got %v; body=%s", resp["address"], body) } + if _, described := resp["description"]; described || resp["instanceName"] != "gameplane" { + t.Fatalf("unexpected public share defaults: %s", body) + } } // TestShareResolveInvalidToken verifies that unknown, expired, and revoked @@ -516,6 +530,8 @@ func TestSharePublicPayloadSafe(t *testing.T) { // The response should only have the safe fields. expectedKeys := map[string]bool{ "serverName": true, + "instanceName": true, + "description": true, "status": true, "manuallyStopped": true, "canStart": true, @@ -563,6 +579,59 @@ func TestShareNodePortPlayerAddress(t *testing.T) { } } +func TestSharePrefersPublishedHostnameAndItsPort(t *testing.T) { + t.Parallel() + const gameHost = "play.example.com" + nativeDNS := map[string]any{"host": gameHost, "port": int64(31042), "serviceAddress": "10.43.0.5"} + relayDNS := map[string]any{"host": "relay.example.com", "port": int64(31999), "tunnelProvider": "frp"} + relayIP := map[string]any{"host": "2001:db8::2", "port": int64(31999), "tunnelProvider": "frp"} + directIP := map[string]any{"host": "192.0.2.10", "port": int64(31042), "serviceAddress": "10.43.0.5"} + for _, tc := range []struct { + name, configured string + endpoints []any + want shareAddr + }{ + {"configured native name after relay", gameHost, []any{relayDNS, nativeDNS}, shareAddr{gameHost, 31042}}, + {"inherited native name before relay", "", []any{nativeDNS, relayDNS}, shareAddr{gameHost, 31042}}, + {"DNS relay over native IP", "", []any{directIP, relayDNS}, shareAddr{"relay.example.com", 31999}}, + {"configured name awaiting reconciliation", gameHost, []any{relayIP, directIP}, shareAddr{"2001:db8::2", 31999}}, + {"other published DNS over a relay IP", "pending.example.com", []any{relayIP, nativeDNS}, shareAddr{gameHost, 31042}}, + {"malformed hosts before a bracketed IPv6 relay", "", []any{ + map[string]any{"host": "[2001:db8::1", "port": int64(25565), "tunnelProvider": "frp"}, + map[string]any{"host": "invalid/host", "port": int64(25566), "tunnelProvider": "frp"}, + map[string]any{"host": "[2001:db8::2]", "port": int64(31999), "tunnelProvider": "frp"}, + }, shareAddr{"[2001:db8::2]", 31999}}, + {"configured name on private endpoint", gameHost, []any{ + map[string]any{"host": gameHost, "port": int64(30123), "private": true}, + relayIP, + }, shareAddr{"2001:db8::2", 31999}}, + } { + t.Run(tc.name, func(t *testing.T) { + obj := newShareTestServer("world", 1) + obj.Object["spec"] = map[string]any{"networking": map[string]any{"expose": "NodePort", "hostname": tc.configured}} + obj.Object["status"].(map[string]any)["endpoints"] = tc.endpoints + if got := getPublicAddress(obj); got == nil || *got != tc.want { + t.Fatalf("got %+v, want %+v", got, tc.want) + } + }) + } +} + +func TestSharePrefersLoadBalancerDNSMatchingTemplateHostname(t *testing.T) { + t.Parallel() + const gameHost = "games.example.com" + obj := newShareTestServer("world", 1) + obj.Object["spec"] = map[string]any{"networking": map[string]any{"expose": "LoadBalancer"}} + obj.Object["status"].(map[string]any)["endpoints"] = []any{ + map[string]any{"host": "relay.example.com", "port": int64(31999), "tunnelProvider": "frp"}, + map[string]any{"host": gameHost, "serviceAddress": gameHost, "port": int64(25565)}, + } + want := shareAddr{gameHost, 25565} + if got := getPublicAddress(obj); got == nil || *got != want { + t.Fatalf("got %+v, want %+v", got, want) + } +} + // TestSharePrivateEndpointNotReturned verifies that private/tailnet-only endpoints // are never returned to anonymous callers. func TestSharePrivateEndpointNotReturned(t *testing.T) { diff --git a/api/specs.md b/api/specs.md index 5b54833e2..925c31527 100644 --- a/api/specs.md +++ b/api/specs.md @@ -666,6 +666,8 @@ Verify from `/api/go.mod`. **005_audit_chain.sql:** (hash-chain integrity) - Adds `prev_hash` and `hash` columns to `audit_events` for tamper detection +Valid public share responses include `instanceName` from the panel’s general settings (default `gameplane`) and the optional `description` from the server’s `gameplane.local/description` annotation. The connection address uses the operator’s published, non-private endpoints. An advertised server hostname takes priority. Without a server override, a native DNS endpoint with a recorded Service address takes priority, including when a template hostname matches the load balancer’s ingress hostname. Other DNS names follow, then IP addresses. Tunnels take precedence among otherwise equivalent addresses. Each host keeps its endpoint’s port. + **Public share power policy:** `GET /shares/{token}` includes `manuallyStopped` (the server's explicit stop setting) and `canStart` (the link permits waking and the server is not manually stopped). The existing `status` remains the observed phase. `POST /shares/{token}/start` is wake-only: an authorized link to a manually stopped server returns 409 with the stable generic JSON body `{"error":"server stopped"}` without stamping a wake or changing `spec.suspend`. Idle-asleep servers still receive a conditional wake annotation and 202; the operator owns reconciliation. Invalid and view-only start requests retain the identical neutral 404 response. **006_share_links.sql:** (unauthenticated server access tokens) @@ -749,7 +751,7 @@ Foreign keys are enforced only on Postgres (modernc-sqlite runs with FK OFF); th `GameServer.spec.config` stores wizard values in clear, including those of `type: password` fields in the template's `configSchema`. Anyone holding `servers:read` (or the owner/collaborator fallback) could therefore read every password. The API now redacts them; implementation and tests are in `api/internal/handlers/config_redact.go` and `config_redact_test.go`. - **Effective template.** `GET /servers/{name}/template` reads the server's verified, admitted snapshot or the installed template before its first pin. It requires read access to the exact server. A caller without cluster-wide `templates:read` on the target cluster must be the server's owner or a collaborator on it (#1063), so the dashboard can show that server's template-driven tabs; anyone else still needs `templates:read`. - **Marker:** `__gameplane_redacted__`. On reads, each non-empty password-type value is replaced by the marker (an empty value stays empty so clients can show "not set"). The password-field set comes from the server's effective `GameTemplate.spec.configSchema`. When `gameplane.local/effective-template-revision` is set, the API reads the server's immutable snapshot from the selected cluster and namespace, verifies its controller owner, identity, digest and template name, and rejects deleting snapshots. The exact stored JSON must match the pinned SHA-256 digest. An OnRequest server keeps its admitted password rules even when the catalog removes or retypes those fields. Servers without a pin use the current catalog. Rules are memoised only within one request or SSE event, keyed by template, namespace, server name, UID and revision. -- **Covered paths (one helper):** GET/POST/PUT `/servers` and `/servers/{name}` (including the create and update replies), `POST /servers/{name}:clone` reply (the clone itself stores the source's values verbatim), `GET /users/me/servers`, `GET /fleet/servers`, and the `/events` SSE stream (each watch event is redacted on a copy). Share links expose only name/status/address/player count; capture, mod, tunnel-credential, notification and WebSocket paths never carry `spec.config`; the audit log and its sinks record actor/method/path/target/status/ip/reason only and never request bodies. +- **Covered paths (one helper):** GET/POST/PUT `/servers` and `/servers/{name}` (including the create and update replies), `POST /servers/{name}:clone` reply (the clone itself stores the source's values verbatim), `GET /users/me/servers`, `GET /fleet/servers`, and the `/events` SSE stream (each watch event is redacted on a copy). Share links expose the instance name, server name, optional description, power and wake status, address and player count. Share, capture, mod, tunnel-credential, notification and WebSocket paths never carry `spec.config`. The audit log and its sinks record actor/method/path/target/status/ip/reason only and never request bodies. - **Fail closed:** when the template cannot be read (no `templateRef`, not found, API error, malformed `configSchema`), or a pinned snapshot is missing, unreadable or invalid, every non-empty config value is redacted. A failed pin lookup never falls back to the latest catalog. The API needs `get` on ConfigMaps in each allowed game namespace; the chart grants it through the games Role, and remote kubeconfigs need the same permission. Failed lookups are not cached. PUT secret preservation uses this same effective schema. - **Update rule (PUT `/servers/{name}`)**, applied before the write (markers: every key; the other rules: per password-type key, every key when failing closed): a value equal to the marker keeps the stored value for ANY key, whether or not the current template marks it a password and whatever the stored value's type (the marker is API-emitted, and a fail-closed read marks every key); if the key is absent from the stored object the marker is dropped, never stored; a different non-empty value replaces it; an explicit empty string clears it only when the field is optional, for a `required` field (or when failing closed, where optionality is unknown) the stored value is kept; a key omitted from the body is removed as in any PUT, except a `required` password field, which is restored. This is what makes the dashboard's whole-`spec` PUT (`mergeDraftOntoLatest`) safe. On POST, marker values are dropped. - **Not covered:** Kubernetes API readers (kubectl, GitOps, the optional read-only `mcp-server`) see the stored object; protect it with cluster RBAC. diff --git a/assets/design-export/fig/1-46396.fig b/assets/design-export/fig/1-46396.fig index 54850d9ca..77514f726 100644 Binary files a/assets/design-export/fig/1-46396.fig and b/assets/design-export/fig/1-46396.fig differ diff --git a/assets/design-export/fig/1-46397.fig b/assets/design-export/fig/1-46397.fig index a9c919dd7..2b345cb58 100644 Binary files a/assets/design-export/fig/1-46397.fig and b/assets/design-export/fig/1-46397.fig differ diff --git a/assets/design-export/fig/1-46398.fig b/assets/design-export/fig/1-46398.fig index a833beb67..f101d7221 100644 Binary files a/assets/design-export/fig/1-46398.fig and b/assets/design-export/fig/1-46398.fig differ diff --git a/assets/design-export/fig/B57dG.fig b/assets/design-export/fig/B57dG.fig index 041a44e8b..1176a0b14 100644 Binary files a/assets/design-export/fig/B57dG.fig and b/assets/design-export/fig/B57dG.fig differ diff --git a/assets/design-export/fig/C2LQE4.fig b/assets/design-export/fig/C2LQE4.fig index b6f66d445..9613aac81 100644 Binary files a/assets/design-export/fig/C2LQE4.fig and b/assets/design-export/fig/C2LQE4.fig differ diff --git a/assets/design-export/fig/EWrn0.fig b/assets/design-export/fig/EWrn0.fig index e144bf570..b6667ac85 100644 Binary files a/assets/design-export/fig/EWrn0.fig and b/assets/design-export/fig/EWrn0.fig differ diff --git a/assets/design-export/fig/EcoGD.fig b/assets/design-export/fig/EcoGD.fig index 807135695..a695c9c85 100644 Binary files a/assets/design-export/fig/EcoGD.fig and b/assets/design-export/fig/EcoGD.fig differ diff --git a/assets/design-export/fig/FBiMN.fig b/assets/design-export/fig/FBiMN.fig index 24eaec04e..f1e6e64d8 100644 Binary files a/assets/design-export/fig/FBiMN.fig and b/assets/design-export/fig/FBiMN.fig differ diff --git a/assets/design-export/fig/LYPXU.fig b/assets/design-export/fig/LYPXU.fig index cf0cf85a0..d8101e850 100644 Binary files a/assets/design-export/fig/LYPXU.fig and b/assets/design-export/fig/LYPXU.fig differ diff --git a/assets/design-export/fig/WrmU5.fig b/assets/design-export/fig/WrmU5.fig index a563a3d82..40d33a522 100644 Binary files a/assets/design-export/fig/WrmU5.fig and b/assets/design-export/fig/WrmU5.fig differ diff --git a/assets/design-export/fig/Z0oyh.fig b/assets/design-export/fig/Z0oyh.fig index 56385da10..7e45153f2 100644 Binary files a/assets/design-export/fig/Z0oyh.fig and b/assets/design-export/fig/Z0oyh.fig differ diff --git a/assets/design-export/fig/ZlLf0.fig b/assets/design-export/fig/ZlLf0.fig index f0376ccfc..a891d9b38 100644 Binary files a/assets/design-export/fig/ZlLf0.fig and b/assets/design-export/fig/ZlLf0.fig differ diff --git a/assets/design-export/fig/iYUWc.fig b/assets/design-export/fig/iYUWc.fig index 27dd53b2a..a70732f83 100644 Binary files a/assets/design-export/fig/iYUWc.fig and b/assets/design-export/fig/iYUWc.fig differ diff --git a/assets/design-export/fig/kK8Ji.fig b/assets/design-export/fig/kK8Ji.fig index 36adb38ef..9a1b3d8e1 100644 Binary files a/assets/design-export/fig/kK8Ji.fig and b/assets/design-export/fig/kK8Ji.fig differ diff --git a/assets/design-export/fig/p8QSPq.fig b/assets/design-export/fig/p8QSPq.fig index 7296092d4..37b3cefc9 100644 Binary files a/assets/design-export/fig/p8QSPq.fig and b/assets/design-export/fig/p8QSPq.fig differ diff --git a/assets/design-export/fig/q31B6w.fig b/assets/design-export/fig/q31B6w.fig index f0cbef9ca..b4a89058b 100644 Binary files a/assets/design-export/fig/q31B6w.fig and b/assets/design-export/fig/q31B6w.fig differ diff --git a/assets/design-export/fig/qFLfB.fig b/assets/design-export/fig/qFLfB.fig index 485909d2c..e6019ca9f 100644 Binary files a/assets/design-export/fig/qFLfB.fig and b/assets/design-export/fig/qFLfB.fig differ diff --git a/assets/design-export/json/1-46396.json b/assets/design-export/json/1-46396.json index 02c2b0c48..c57dd4c06 100644 --- a/assets/design-export/json/1-46396.json +++ b/assets/design-export/json/1-46396.json @@ -277,7 +277,7 @@ "type": "FRAME", "x": 20, "y": 191, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -289,11 +289,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -314,14 +314,14 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { - "name": "View nodes", + "name": "View Nodes", "type": "INSTANCE", - "x": 125, + "x": 122, "y": 0, - "width": 108, + "width": 110, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -346,7 +346,71 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", + "type": "INSTANCE", + "x": 366, + "y": 0, + "width": 67, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["SFTP"] } ] } @@ -437,7 +501,7 @@ "type": "FRAME", "x": 20, "y": 157, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -449,11 +513,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -474,14 +538,78 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] + }, + { + "name": "View Nodes", + "type": "INSTANCE", + "x": 122, + "y": 0, + "width": 110, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] }, { - "name": "View nodes", + "name": "SFTP", "type": "INSTANCE", - "x": 125, + "x": 366, "y": 0, - "width": 108, + "width": 67, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -506,7 +634,7 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["SFTP"] } ] } diff --git a/assets/design-export/json/1-46397.json b/assets/design-export/json/1-46397.json index 7df43c6ae..37ef78217 100644 --- a/assets/design-export/json/1-46397.json +++ b/assets/design-export/json/1-46397.json @@ -277,7 +277,7 @@ "type": "FRAME", "x": 20, "y": 191, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -289,11 +289,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -314,14 +314,14 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { - "name": "View nodes", + "name": "View Nodes", "type": "INSTANCE", - "x": 125, + "x": 122, "y": 0, - "width": 108, + "width": 110, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -346,7 +346,71 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", + "type": "INSTANCE", + "x": 366, + "y": 0, + "width": 67, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["SFTP"] } ] } @@ -437,7 +501,7 @@ "type": "FRAME", "x": 20, "y": 157, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -449,11 +513,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -474,14 +538,78 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] + }, + { + "name": "View Nodes", + "type": "INSTANCE", + "x": 122, + "y": 0, + "width": 110, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] }, { - "name": "View nodes", + "name": "SFTP", "type": "INSTANCE", - "x": 125, + "x": 366, "y": 0, - "width": 108, + "width": 67, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -506,7 +634,7 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["SFTP"] } ] } diff --git a/assets/design-export/json/1-46398.json b/assets/design-export/json/1-46398.json index 8dd8d7b02..380457e12 100644 --- a/assets/design-export/json/1-46398.json +++ b/assets/design-export/json/1-46398.json @@ -277,7 +277,7 @@ "type": "FRAME", "x": 20, "y": 191, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -289,11 +289,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -314,14 +314,14 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { - "name": "View nodes", + "name": "View Nodes", "type": "INSTANCE", - "x": 125, + "x": 122, "y": 0, - "width": 108, + "width": 110, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -346,7 +346,71 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", + "type": "INSTANCE", + "x": 366, + "y": 0, + "width": 67, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["SFTP"] } ] } @@ -437,7 +501,7 @@ "type": "FRAME", "x": 20, "y": 157, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -449,11 +513,11 @@ }, "children": [ { - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -474,14 +538,78 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] + }, + { + "name": "View Nodes", + "type": "INSTANCE", + "x": 122, + "y": 0, + "width": 110, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] }, { - "name": "View nodes", + "name": "SFTP", "type": "INSTANCE", - "x": 125, + "x": 366, "y": 0, - "width": 108, + "width": 67, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -506,7 +634,7 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["SFTP"] } ] } diff --git a/assets/design-export/json/B57dG.json b/assets/design-export/json/B57dG.json index 8aa83746b..5ef0935b9 100644 --- a/assets/design-export/json/B57dG.json +++ b/assets/design-export/json/B57dG.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 291, + "y": 275.5, "width": 440, - "height": 318, + "height": 349, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,62 +140,98 @@ "x": 36, "y": 160, "width": 368, - "height": 58, + "height": 89, "layout": { "mode": "VERTICAL", "gap": 10, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "MIN", + "counter": "CENTER", "sizing": ["HUG", "FIXED"] }, "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], + "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, { - "name": "statusBadge", - "type": "INSTANCE", + "name": "Server description", + "type": "TEXT", "x": 0, "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "Status badge with indicator", + "type": "FRAME", + "x": 115.5, + "y": 70, "width": 137, "height": 19, - "component": "Chip/Soft/Default/SM", - "componentId": "1:1002", - "fills": [{"type": "SOLID", "color": "#8B5CF633", "opacity": 0.2}], - "strokes": [{"type": "SOLID", "color": "#A78BFA99", "opacity": 0.6}], - "strokeWeight": 1, - "cornerRadius": 16, "layout": { "mode": "HORIZONTAL", - "gap": 2, - "padding": [2, 4, 2, 20], + "gap": 8, + "padding": [0, 0, 0, 0], "primary": "MIN", "counter": "CENTER", "sizing": ["HUG", "HUG"] }, - "variables": {"cornerRadius": "radius/2xl"}, - "texts": ["Still unavailable"] - }, - { - "name": "statusDot", - "type": "ELLIPSE", - "x": 10, - "y": 45.5, - "width": 6, - "height": 6, - "fills": [{"type": "SOLID", "color": "#000000"}], - "absolute": true + "children": [ + { + "name": "statusBadge", + "type": "INSTANCE", + "x": 0, + "y": 0, + "width": 137, + "height": 19, + "component": "Chip/Soft/Default/SM", + "componentId": "1:1002", + "fills": [{"type": "SOLID", "color": "#8B5CF633", "opacity": 0.2}], + "strokes": [{"type": "SOLID", "color": "#A78BFA99", "opacity": 0.6}], + "strokeWeight": 1, + "cornerRadius": 16, + "layout": { + "mode": "HORIZONTAL", + "gap": 2, + "padding": [2, 4, 2, 20], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["HUG", "HUG"] + }, + "variables": {"cornerRadius": "radius/2xl"}, + "texts": ["Still unavailable"] + }, + { + "name": "statusDot", + "type": "ELLIPSE", + "x": 10, + "y": 6.5, + "width": 6, + "height": 6, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "absolute": true, + "variables": {"fills/0/color": "muted"} + } + ] } ] }, @@ -204,7 +240,7 @@ "name": "messageBlock", "type": "FRAME", "x": 36, - "y": 242, + "y": 273, "width": 368, "height": 40, "layout": { diff --git a/assets/design-export/json/C2LQE4.json b/assets/design-export/json/C2LQE4.json index 0f5dff6e8..666055f9d 100644 --- a/assets/design-export/json/C2LQE4.json +++ b/assets/design-export/json/C2LQE4.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "INSTANCE", "x": 500, - "y": 259, + "y": 243.5, "width": 440, - "height": 382, + "height": 413, "component": "Gameplane/Share Card", "componentId": "1:4507", "fills": [{"type": "SOLID", "color": "#1C1A20"}], @@ -43,12 +43,13 @@ }, "variables": {"fills/0/color": "surface/surface", "strokes/0/color": "border/border"}, "texts": [ - "gameplane", + "Northstar Games", "shared server link", "mc-survival", + "A survival world for our community.", "Online", "CONNECT AT", - "play.gameplane.example:25565", + "play.northstar.example:25565", "3 players online", "English" ] diff --git a/assets/design-export/json/EWrn0.json b/assets/design-export/json/EWrn0.json index 05c3f4dab..4115e585f 100644 --- a/assets/design-export/json/EWrn0.json +++ b/assets/design-export/json/EWrn0.json @@ -129,99 +129,12 @@ "layoutAlignSelf": "STRETCH", "variables": {"fills/0/color": "background/background"}, "children": [ - { - "id": "1:9523", - "name": "Workload cluster selector", - "type": "FRAME", - "x": 24, - "y": 24, - "width": 215, - "height": 36, - "fills": [{"type": "SOLID", "color": "#1C1A20"}], - "strokes": [{"type": "SOLID", "color": "#2C2932"}], - "strokeWeight": 1, - "cornerRadius": 24, - "layout": { - "mode": "HORIZONTAL", - "gap": 6, - "padding": [6, 12, 6, 12], - "primary": "MIN", - "counter": "CENTER", - "sizing": ["HUG", "FIXED"] - }, - "variables": { - "cornerRadius": "radius/3xl", - "fills/0/color": "surface/surface", - "strokes/0/color": "border/border" - }, - "children": [ - { - "id": "1:9524", - "name": "API status", - "type": "ELLIPSE", - "x": 12, - "y": 14, - "width": 8, - "height": 8, - "fills": [{"type": "SOLID", "color": "#21C45D"}], - "variables": {"fills/0/color": "success/success"} - }, - { - "id": "1:9525", - "name": "Selector label", - "type": "TEXT", - "x": 26, - "y": 9, - "width": 50, - "height": 18, - "fills": [{"type": "SOLID", "color": "#9E98A6"}], - "text": "Cluster:", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} - }, - { - "id": "1:9526", - "name": "Selected workload cluster", - "type": "TEXT", - "x": 82, - "y": 9, - "width": 101, - "height": 18, - "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "East production", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} - }, - { - "id": "1:9527", - "name": "Open cluster choices", - "type": "FRAME", - "x": 189, - "y": 11, - "width": 14, - "height": 14, - "variables": {"fills/0/color": "muted"}, - "children": [ - { - "name": "path", - "type": "VECTOR", - "x": 3.5, - "y": 5.25, - "width": 7, - "height": 3.5, - "strokes": [{"type": "SOLID", "color": "#9E98A6"}], - "strokeWeight": 1.17 - } - ] - } - ] - }, { "id": "1:9528", "name": "Page Header", "type": "FRAME", "x": 24, - "y": 84, + "y": 24, "width": 1132, "height": 53, "fills": [{"type": "SOLID", "color": "#121114"}], @@ -403,7 +316,7 @@ "name": "Background refresh error with retained draft", "type": "FRAME", "x": 24, - "y": 161, + "y": 101, "width": 1132, "height": 64, "fills": [{"type": "SOLID", "color": "#1C1A20"}], @@ -471,24 +384,21 @@ "name": "Filters", "type": "INSTANCE", "x": 24, - "y": 249, + "y": 189, "width": 1132, "height": 36, "component": "Gameplane/Modules Filter Bar", "componentId": "1:2420", "layout": { "mode": "HORIZONTAL", - "gap": 12, + "gap": 8, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "CENTER", + "counter": "MIN", "sizing": ["FIXED", "HUG"] }, "layoutAlignSelf": "STRETCH", "texts": [ - "All sources", - "default", - "community", "All categories", "Adventure", "Building", @@ -501,7 +411,8 @@ "Shooter", "Simulation", "Survival", - "Search modules…" + "Search modules…", + "Filters" ] }, { @@ -509,7 +420,7 @@ "name": "Row 1", "type": "FRAME", "x": 24, - "y": 309, + "y": 249, "width": 1132, "height": 360, "layout": { @@ -1244,7 +1155,7 @@ "name": "Row 2", "type": "FRAME", "x": 24, - "y": 695, + "y": 633, "width": 1132, "height": 326, "layout": { @@ -1747,7 +1658,7 @@ "name": "Row 3", "type": "FRAME", "x": 24, - "y": 1081, + "y": 983, "width": 1132, "height": 326, "layout": { @@ -2349,6 +2260,207 @@ "layoutGrow": 1 } ] + }, + { + "name": "Module filters (open)", + "type": "FRAME", + "x": 896, + "y": 233, + "width": 260, + "height": 116, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "effects": [{"type": "DROP_SHADOW", "radius": 12, "visible": true}], + "cornerRadius": 24, + "layout": { + "mode": "VERTICAL", + "gap": 12, + "padding": [16, 16, 16, 16], + "primary": "MIN", + "counter": "MIN", + "sizing": ["HUG", "FIXED"] + }, + "absolute": true, + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "id": "1:9523", + "name": "Workload cluster selector", + "type": "FRAME", + "x": 16, + "y": 16, + "width": 228, + "height": 36, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 24, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [6, 12, 6, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "layoutAlignSelf": "STRETCH", + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "id": "1:9524", + "name": "API status", + "type": "ELLIPSE", + "x": 12, + "y": 14, + "width": 8, + "height": 8, + "fills": [{"type": "SOLID", "color": "#21C45D"}], + "variables": {"fills/0/color": "success/success"} + }, + { + "id": "1:9525", + "name": "Selector label", + "type": "TEXT", + "x": 26, + "y": 9, + "width": 50, + "height": 18, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "text": "Cluster:", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "id": "1:9526", + "name": "Selected workload cluster", + "type": "TEXT", + "x": 82, + "y": 9, + "width": 101, + "height": 18, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "text": "East production", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} + }, + { + "id": "1:9527", + "name": "Open cluster choices", + "type": "FRAME", + "x": 189, + "y": 11, + "width": 14, + "height": 14, + "variables": {"fills/0/color": "muted"}, + "children": [ + { + "name": "path", + "type": "VECTOR", + "x": 3.5, + "y": 5.25, + "width": 7, + "height": 3.5, + "strokes": [{"type": "SOLID", "color": "#9E98A6"}], + "strokeWeight": 1.17 + } + ] + } + ] + }, + { + "name": "Source selector", + "type": "FRAME", + "x": 16, + "y": 64, + "width": 228, + "height": 36, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 24, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [6, 12, 6, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "layoutAlignSelf": "STRETCH", + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "name": "API status", + "type": "ELLIPSE", + "x": 12, + "y": 14, + "width": 8, + "height": 8, + "visible": false, + "fills": [{"type": "SOLID", "color": "#21C45D"}], + "variables": {"fills/0/color": "success/success"} + }, + { + "name": "Selector label", + "type": "TEXT", + "x": 12, + "y": 9, + "width": 50, + "height": 18, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "text": "Source:", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "Selected workload cluster", + "type": "TEXT", + "x": 68, + "y": 9, + "width": 71, + "height": 18, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "text": "All sources", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} + }, + { + "name": "Open cluster choices", + "type": "FRAME", + "x": 145, + "y": 11, + "width": 14, + "height": 14, + "variables": {"fills/0/color": "muted"}, + "children": [ + { + "name": "path", + "type": "VECTOR", + "x": 3.5, + "y": 5.25, + "width": 7, + "height": 3.5, + "strokes": [{"type": "SOLID", "color": "#9E98A6"}], + "strokeWeight": 1.17 + } + ] + } + ] + } + ] } ] } diff --git a/assets/design-export/json/EcoGD.json b/assets/design-export/json/EcoGD.json index 060f6dc71..0af866415 100644 --- a/assets/design-export/json/EcoGD.json +++ b/assets/design-export/json/EcoGD.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 266.5, + "y": 251, "width": 440, - "height": 367, + "height": 398, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,7 +140,7 @@ "x": 36, "y": 160, "width": 368, - "height": 67, + "height": 98, "layout": { "mode": "VERTICAL", "gap": 10, @@ -152,24 +152,40 @@ "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", - "x": 111, + "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, + { + "name": "Server description", + "type": "TEXT", + "x": 0, + "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, { "id": "1:4543", "name": "statusBadge", "type": "FRAME", "x": 128.5, - "y": 39, + "y": 70, "width": 111, "height": 28, "fills": [{"type": "SOLID", "color": "#2C1926"}], @@ -243,7 +259,7 @@ "name": "startingBlock", "type": "FRAME", "x": 36, - "y": 251, + "y": 282, "width": 368, "height": 40, "layout": { @@ -278,7 +294,7 @@ "name": "playersRow", "type": "FRAME", "x": 36, - "y": 315, + "y": 346, "width": 109, "height": 16, "layout": { diff --git a/assets/design-export/json/FBiMN.json b/assets/design-export/json/FBiMN.json index ca82a73b3..39f5cf765 100644 --- a/assets/design-export/json/FBiMN.json +++ b/assets/design-export/json/FBiMN.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 263.5, + "y": 248, "width": 440, - "height": 373, + "height": 404, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,34 +140,51 @@ "x": 36, "y": 160, "width": 368, - "height": 59, + "height": 90, "layout": { "mode": "VERTICAL", "gap": 10, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "MIN", + "counter": "CENTER", "sizing": ["HUG", "FIXED"] }, "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], + "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, { - "name": "statusBadge", - "type": "INSTANCE", + "name": "Server description", + "type": "TEXT", "x": 0, "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "statusBadge", + "type": "INSTANCE", + "x": 148.5, + "y": 70, "width": 71, "height": 20, "component": "Status=Asleep", @@ -190,7 +207,7 @@ "name": "asleepBlock", "type": "FRAME", "x": 36, - "y": 243, + "y": 274, "width": 368, "height": 94, "layout": { diff --git a/assets/design-export/json/LYPXU.json b/assets/design-export/json/LYPXU.json index 713cb78e1..d9c420cae 100644 --- a/assets/design-export/json/LYPXU.json +++ b/assets/design-export/json/LYPXU.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 290.5, + "y": 275, "width": 440, - "height": 319, + "height": 350, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,34 +140,51 @@ "x": 36, "y": 160, "width": 368, - "height": 59, + "height": 90, "layout": { "mode": "VERTICAL", "gap": 10, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "MIN", + "counter": "CENTER", "sizing": ["HUG", "FIXED"] }, "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], + "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, { - "name": "statusBadge", - "type": "INSTANCE", + "name": "Server description", + "type": "TEXT", "x": 0, "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "statusBadge", + "type": "INSTANCE", + "x": 143.5, + "y": 70, "width": 81, "height": 20, "component": "Status=Stopped", @@ -190,7 +207,7 @@ "name": "messageBlock", "type": "FRAME", "x": 36, - "y": 243, + "y": 274, "width": 368, "height": 40, "layout": { diff --git a/assets/design-export/json/WrmU5.json b/assets/design-export/json/WrmU5.json index 37291ddf1..ed1f9e925 100644 --- a/assets/design-export/json/WrmU5.json +++ b/assets/design-export/json/WrmU5.json @@ -412,7 +412,7 @@ "type": "FRAME", "x": 24, "y": 136, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -425,11 +425,11 @@ "children": [ { "id": "1:9271", - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -450,15 +450,15 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { "id": "1:9272", - "name": "View nodes", + "name": "View Nodes", "type": "INSTANCE", - "x": 125, + "x": 122, "y": 0, - "width": 108, + "width": 110, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -483,7 +483,71 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", + "type": "INSTANCE", + "x": 366, + "y": 0, + "width": 67, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["SFTP"] } ] } @@ -616,7 +680,7 @@ "type": "FRAME", "x": 24, "y": 136, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -629,11 +693,11 @@ "children": [ { "id": "1:9281", - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -654,15 +718,79 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { "id": "1:9282", - "name": "View nodes", + "name": "View Nodes", + "type": "INSTANCE", + "x": 122, + "y": 0, + "width": 110, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", "type": "INSTANCE", - "x": 125, + "x": 366, "y": 0, - "width": 108, + "width": 67, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -687,7 +815,7 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["SFTP"] } ] } diff --git a/assets/design-export/json/Z0oyh.json b/assets/design-export/json/Z0oyh.json index 813879625..075c4894b 100644 --- a/assets/design-export/json/Z0oyh.json +++ b/assets/design-export/json/Z0oyh.json @@ -128,87 +128,120 @@ "layoutAlignSelf": "STRETCH", "children": [ { - "id": "1:9301", - "name": "Workload cluster selector", + "name": "Catalog search and filters", "type": "FRAME", "x": 24, "y": 24, - "width": 203, + "width": 1132, "height": 36, - "fills": [{"type": "SOLID", "color": "#1C1A20"}], - "strokes": [{"type": "SOLID", "color": "#2C2932"}], - "strokeWeight": 1, - "cornerRadius": 24, "layout": { "mode": "HORIZONTAL", - "gap": 6, - "padding": [6, 12, 6, 12], - "primary": "MIN", + "gap": 8, + "padding": [0, 0, 0, 0], + "primary": "MAX", "counter": "CENTER", - "sizing": ["HUG", "FIXED"] - }, - "variables": { - "cornerRadius": "radius/3xl", - "fills/0/color": "surface/surface", - "strokes/0/color": "border/border" + "sizing": ["FIXED", "HUG"] }, + "layoutAlignSelf": "STRETCH", "children": [ { - "id": "1:9302", - "name": "API status", - "type": "ELLIPSE", - "x": 12, - "y": 14, - "width": 8, - "height": 8, - "fills": [{"type": "SOLID", "color": "#9E98A6"}], - "variables": {"fills/0/color": "muted"} - }, - { - "id": "1:9303", - "name": "Selector label", - "type": "TEXT", - "x": 26, - "y": 9, - "width": 50, - "height": 18, - "fills": [{"type": "SOLID", "color": "#9E98A6"}], - "text": "Cluster:", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} - }, - { - "id": "1:9304", - "name": "Selected workload cluster", - "type": "TEXT", - "x": 82, - "y": 9, - "width": 89, - "height": 18, - "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "Select cluster", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} + "name": "Search", + "type": "INSTANCE", + "x": 827, + "y": 0, + "width": 200, + "height": 36, + "opacity": 0.5, + "component": "Gameplane/Search Input", + "componentId": "1:975", + "fills": [{"type": "SOLID", "color": "#17151A"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "effects": [{"type": "DROP_SHADOW", "radius": 2, "visible": true}], + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [0, 12, 0, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "variables": { + "cornerRadius": "radius/xl", + "fills/0/color": "field/background", + "strokes/0/color": "field/border" + }, + "texts": ["Search modules…"] }, { - "id": "1:9305", - "name": "Open cluster choices", + "name": "Filter trigger", "type": "FRAME", - "x": 177, - "y": 11, - "width": 14, - "height": 14, - "variables": {"fills/0/color": "muted"}, + "x": 1035, + "y": 0, + "width": 97, + "height": 36, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [0, 0, 0, 0], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["HUG", "HUG"] + }, "children": [ { - "name": "path", - "type": "VECTOR", - "x": 3.5, - "y": 5.25, - "width": 7, - "height": 3.5, - "strokes": [{"type": "SOLID", "color": "#9E98A6"}], - "strokeWeight": 1.17 + "name": "Filters", + "type": "INSTANCE", + "x": 0, + "y": 0, + "width": 97, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["Filters"] + }, + { + "name": "Filter icon", + "type": "FRAME", + "x": 16, + "y": 10, + "width": 16, + "height": 16, + "absolute": true, + "clips": true, + "children": [ + { + "name": "Vector", + "type": "VECTOR", + "x": 1, + "y": 3, + "width": 14, + "height": 9.5, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}] + } + ] } ] } @@ -285,6 +318,208 @@ ] } ] + }, + { + "name": "Module filters (open)", + "type": "FRAME", + "x": 1156, + "y": 132, + "width": 260, + "height": 116, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "effects": [{"type": "DROP_SHADOW", "radius": 12, "visible": true}], + "cornerRadius": 24, + "layout": { + "mode": "VERTICAL", + "gap": 12, + "padding": [16, 16, 16, 16], + "primary": "MIN", + "counter": "MIN", + "sizing": ["HUG", "FIXED"] + }, + "absolute": true, + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "id": "1:9301", + "name": "Workload cluster selector", + "type": "FRAME", + "x": 16, + "y": 16, + "width": 228, + "height": 36, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 24, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [6, 12, 6, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "layoutAlignSelf": "STRETCH", + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "id": "1:9302", + "name": "API status", + "type": "ELLIPSE", + "x": 12, + "y": 14, + "width": 8, + "height": 8, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "variables": {"fills/0/color": "muted"} + }, + { + "id": "1:9303", + "name": "Selector label", + "type": "TEXT", + "x": 26, + "y": 9, + "width": 50, + "height": 18, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "text": "Cluster:", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "id": "1:9304", + "name": "Selected workload cluster", + "type": "TEXT", + "x": 82, + "y": 9, + "width": 89, + "height": 18, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "text": "Select cluster", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} + }, + { + "id": "1:9305", + "name": "Open cluster choices", + "type": "FRAME", + "x": 177, + "y": 11, + "width": 14, + "height": 14, + "variables": {"fills/0/color": "muted"}, + "children": [ + { + "name": "path", + "type": "VECTOR", + "x": 3.5, + "y": 5.25, + "width": 7, + "height": 3.5, + "strokes": [{"type": "SOLID", "color": "#9E98A6"}], + "strokeWeight": 1.17 + } + ] + } + ] + }, + { + "name": "Source selector", + "type": "FRAME", + "x": 16, + "y": 64, + "width": 228, + "height": 36, + "opacity": 0.5, + "fills": [{"type": "SOLID", "color": "#1C1A20"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 24, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [6, 12, 6, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "layoutAlignSelf": "STRETCH", + "variables": { + "cornerRadius": "radius/3xl", + "fills/0/color": "surface/surface", + "strokes/0/color": "border/border" + }, + "children": [ + { + "name": "API status", + "type": "ELLIPSE", + "x": 12, + "y": 14, + "width": 8, + "height": 8, + "visible": false, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "variables": {"fills/0/color": "muted"} + }, + { + "name": "Selector label", + "type": "TEXT", + "x": 12, + "y": 9, + "width": 50, + "height": 18, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "text": "Source:", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "Selected workload cluster", + "type": "TEXT", + "x": 68, + "y": 9, + "width": 71, + "height": 18, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "text": "All sources", + "font": ["Geist", 400, 14], + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} + }, + { + "name": "Open cluster choices", + "type": "FRAME", + "x": 145, + "y": 11, + "width": 14, + "height": 14, + "variables": {"fills/0/color": "muted"}, + "children": [ + { + "name": "path", + "type": "VECTOR", + "x": 3.5, + "y": 5.25, + "width": 7, + "height": 3.5, + "strokes": [{"type": "SOLID", "color": "#9E98A6"}], + "strokeWeight": 1.17 + } + ] + } + ] + } + ] } ] } diff --git a/assets/design-export/json/ZlLf0.json b/assets/design-export/json/ZlLf0.json index 72df41618..696c74eac 100644 --- a/assets/design-export/json/ZlLf0.json +++ b/assets/design-export/json/ZlLf0.json @@ -128,87 +128,120 @@ "layoutAlignSelf": "STRETCH", "children": [ { - "id": "1:9315", - "name": "Workload cluster selector", + "name": "Catalog search and filters", "type": "FRAME", "x": 24, "y": 24, - "width": 215, + "width": 1132, "height": 36, - "fills": [{"type": "SOLID", "color": "#1C1A20"}], - "strokes": [{"type": "SOLID", "color": "#2C2932"}], - "strokeWeight": 1, - "cornerRadius": 24, "layout": { "mode": "HORIZONTAL", - "gap": 6, - "padding": [6, 12, 6, 12], - "primary": "MIN", + "gap": 8, + "padding": [0, 0, 0, 0], + "primary": "MAX", "counter": "CENTER", - "sizing": ["HUG", "FIXED"] - }, - "variables": { - "cornerRadius": "radius/3xl", - "fills/0/color": "surface/surface", - "strokes/0/color": "border/border" + "sizing": ["FIXED", "HUG"] }, + "layoutAlignSelf": "STRETCH", "children": [ { - "id": "1:9316", - "name": "API status", - "type": "ELLIPSE", - "x": 12, - "y": 14, - "width": 8, - "height": 8, - "fills": [{"type": "SOLID", "color": "#21C45D"}], - "variables": {"fills/0/color": "success/success"} + "name": "Search", + "type": "INSTANCE", + "x": 827, + "y": 0, + "width": 200, + "height": 36, + "opacity": 0.5, + "component": "Gameplane/Search Input", + "componentId": "1:975", + "fills": [{"type": "SOLID", "color": "#17151A"}], + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "effects": [{"type": "DROP_SHADOW", "radius": 2, "visible": true}], + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 6, + "padding": [0, 12, 0, 12], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["FIXED", "FIXED"] + }, + "variables": { + "cornerRadius": "radius/xl", + "fills/0/color": "field/background", + "strokes/0/color": "field/border" + }, + "texts": ["Search modules…"] }, { - "id": "1:9317", - "name": "Selector label", - "type": "TEXT", - "x": 26, - "y": 9, - "width": 50, - "height": 18, - "fills": [{"type": "SOLID", "color": "#9E98A6"}], - "text": "Cluster:", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} - }, - { - "id": "1:9318", - "name": "Selected workload cluster", - "type": "TEXT", - "x": 82, - "y": 9, - "width": 101, - "height": 18, - "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "East production", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} - }, - { - "id": "1:9319", - "name": "Open cluster choices", + "name": "Filter trigger", "type": "FRAME", - "x": 189, - "y": 11, - "width": 14, - "height": 14, - "variables": {"fills/0/color": "muted"}, + "x": 1035, + "y": 0, + "width": 97, + "height": 36, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [0, 0, 0, 0], + "primary": "MIN", + "counter": "CENTER", + "sizing": ["HUG", "HUG"] + }, "children": [ { - "name": "path", - "type": "VECTOR", - "x": 3.5, - "y": 5.25, - "width": 7, - "height": 3.5, - "strokes": [{"type": "SOLID", "color": "#9E98A6"}], - "strokeWeight": 1.17 + "name": "Filters", + "type": "INSTANCE", + "x": 0, + "y": 0, + "width": 97, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["Filters"] + }, + { + "name": "Filter icon", + "type": "FRAME", + "x": 16, + "y": 10, + "width": 16, + "height": 16, + "absolute": true, + "clips": true, + "children": [ + { + "name": "Vector", + "type": "VECTOR", + "x": 1, + "y": 3, + "width": 14, + "height": 9.5, + "fills": [{"type": "SOLID", "color": "#F5F3F7"}] + } + ] } ] } diff --git a/assets/design-export/json/iYUWc.json b/assets/design-export/json/iYUWc.json index 31ef310c3..c07d7d970 100644 --- a/assets/design-export/json/iYUWc.json +++ b/assets/design-export/json/iYUWc.json @@ -280,7 +280,7 @@ "type": "FRAME", "x": 20, "y": 191, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -293,11 +293,11 @@ "children": [ { "id": "1:8665", - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -318,15 +318,15 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { "id": "1:8666", - "name": "View nodes", + "name": "View Nodes", "type": "INSTANCE", - "x": 125, + "x": 122, "y": 0, - "width": 108, + "width": 110, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -351,7 +351,71 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", + "type": "INSTANCE", + "x": 366, + "y": 0, + "width": 67, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["SFTP"] } ] } @@ -442,7 +506,7 @@ "type": "FRAME", "x": 20, "y": 157, - "width": 233, + "width": 433, "height": 36, "layout": { "mode": "HORIZONTAL", @@ -455,11 +519,11 @@ "children": [ { "id": "1:8673", - "name": "Open cluster", + "name": "View Details", "type": "INSTANCE", "x": 0, "y": 0, - "width": 117, + "width": 114, "height": 36, "component": "Button/Primary/MD", "componentId": "1:1094", @@ -480,15 +544,79 @@ "paddingLeft": "spacing/4", "fills/0/color": "accent/accent" }, - "texts": ["Open cluster"] + "texts": ["View Details"] }, { "id": "1:8674", - "name": "View nodes", + "name": "View Nodes", + "type": "INSTANCE", + "x": 122, + "y": 0, + "width": 110, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Nodes"] + }, + { + "name": "View Servers", + "type": "INSTANCE", + "x": 240, + "y": 0, + "width": 118, + "height": 36, + "component": "Button/Outline/MD", + "componentId": "1:1794", + "strokes": [{"type": "SOLID", "color": "#2C2932"}], + "strokeWeight": 1, + "cornerRadius": 12, + "layout": { + "mode": "HORIZONTAL", + "gap": 8, + "padding": [8, 16, 8, 16], + "primary": "CENTER", + "counter": "CENTER", + "sizing": ["HUG", "FIXED"] + }, + "variables": { + "itemSpacing": "spacing/2", + "paddingRight": "spacing/4", + "paddingLeft": "spacing/4", + "topLeftRadius": "radius/xl", + "topRightRadius": "radius/xl", + "bottomLeftRadius": "radius/xl", + "bottomRightRadius": "radius/xl", + "strokes/0/color": "border-2" + }, + "texts": ["View Servers"] + }, + { + "name": "SFTP", "type": "INSTANCE", - "x": 125, + "x": 366, "y": 0, - "width": 108, + "width": 67, "height": 36, "component": "Button/Outline/MD", "componentId": "1:1794", @@ -513,7 +641,7 @@ "bottomRightRadius": "radius/xl", "strokes/0/color": "border-2" }, - "texts": ["View nodes"] + "texts": ["SFTP"] } ] } diff --git a/assets/design-export/json/kK8Ji.json b/assets/design-export/json/kK8Ji.json index 8bebd3463..094c20574 100644 --- a/assets/design-export/json/kK8Ji.json +++ b/assets/design-export/json/kK8Ji.json @@ -977,17 +977,14 @@ "componentId": "1:2420", "layout": { "mode": "HORIZONTAL", - "gap": 12, + "gap": 8, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "CENTER", + "counter": "MIN", "sizing": ["FIXED", "HUG"] }, "layoutAlignSelf": "STRETCH", "texts": [ - "All sources", - "default", - "community", "All categories", "Adventure", "Building", @@ -1000,7 +997,8 @@ "Shooter", "Simulation", "Survival", - "Search modules…" + "Search modules…", + "Filters" ] }, { diff --git a/assets/design-export/json/p8QSPq.json b/assets/design-export/json/p8QSPq.json index 93d6cbdff..0d78523af 100644 --- a/assets/design-export/json/p8QSPq.json +++ b/assets/design-export/json/p8QSPq.json @@ -129,99 +129,12 @@ "layoutAlignSelf": "STRETCH", "variables": {"fills/0/color": "background/background"}, "children": [ - { - "id": "1:9627", - "name": "Workload cluster selector", - "type": "FRAME", - "x": 24, - "y": 24, - "width": 215, - "height": 36, - "fills": [{"type": "SOLID", "color": "#1C1A20"}], - "strokes": [{"type": "SOLID", "color": "#2C2932"}], - "strokeWeight": 1, - "cornerRadius": 24, - "layout": { - "mode": "HORIZONTAL", - "gap": 6, - "padding": [6, 12, 6, 12], - "primary": "MIN", - "counter": "CENTER", - "sizing": ["HUG", "FIXED"] - }, - "variables": { - "cornerRadius": "radius/3xl", - "fills/0/color": "surface/surface", - "strokes/0/color": "border/border" - }, - "children": [ - { - "id": "1:9628", - "name": "API status", - "type": "ELLIPSE", - "x": 12, - "y": 14, - "width": 8, - "height": 8, - "fills": [{"type": "SOLID", "color": "#21C45D"}], - "variables": {"fills/0/color": "success/success"} - }, - { - "id": "1:9629", - "name": "Selector label", - "type": "TEXT", - "x": 26, - "y": 9, - "width": 50, - "height": 18, - "fills": [{"type": "SOLID", "color": "#9E98A6"}], - "text": "Cluster:", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} - }, - { - "id": "1:9630", - "name": "Selected workload cluster", - "type": "TEXT", - "x": 82, - "y": 9, - "width": 101, - "height": 18, - "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "East production", - "font": ["Geist", 400, 14], - "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "foreground/foreground"} - }, - { - "id": "1:9631", - "name": "Open cluster choices", - "type": "FRAME", - "x": 189, - "y": 11, - "width": 14, - "height": 14, - "variables": {"fills/0/color": "muted"}, - "children": [ - { - "name": "path", - "type": "VECTOR", - "x": 3.5, - "y": 5.25, - "width": 7, - "height": 3.5, - "strokes": [{"type": "SOLID", "color": "#9E98A6"}], - "strokeWeight": 1.17 - } - ] - } - ] - }, { "id": "1:9632", "name": "Page Header", "type": "FRAME", "x": 24, - "y": 84, + "y": 24, "width": 1132, "height": 53, "fills": [{"type": "SOLID", "color": "#121114"}], @@ -403,7 +316,7 @@ "name": "Background refresh error with retained draft", "type": "FRAME", "x": 24, - "y": 161, + "y": 101, "width": 1132, "height": 64, "fills": [{"type": "SOLID", "color": "#1C1A20"}], @@ -471,7 +384,7 @@ "name": "Sources managed on east", "type": "FRAME", "x": 24, - "y": 249, + "y": 189, "width": 1132, "height": 214, "fills": [{"type": "SOLID", "color": "#1C1A20"}], @@ -1307,24 +1220,21 @@ "name": "Filters", "type": "INSTANCE", "x": 24, - "y": 487, + "y": 427, "width": 1132, "height": 36, "component": "Gameplane/Modules Filter Bar", "componentId": "1:2420", "layout": { "mode": "HORIZONTAL", - "gap": 12, + "gap": 8, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "CENTER", + "counter": "MIN", "sizing": ["FIXED", "HUG"] }, "layoutAlignSelf": "STRETCH", "texts": [ - "All sources", - "default", - "community", "All categories", "Adventure", "Building", @@ -1337,7 +1247,8 @@ "Shooter", "Simulation", "Survival", - "Search modules…" + "Search modules…", + "Filters" ] }, { @@ -1345,7 +1256,7 @@ "name": "Row 1", "type": "FRAME", "x": 24, - "y": 547, + "y": 487, "width": 1132, "height": 326, "layout": { diff --git a/assets/design-export/json/q31B6w.json b/assets/design-export/json/q31B6w.json index 66a12db8e..117890fcf 100644 --- a/assets/design-export/json/q31B6w.json +++ b/assets/design-export/json/q31B6w.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 263.5, + "y": 248, "width": 440, - "height": 373, + "height": 404, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,34 +140,51 @@ "x": 36, "y": 160, "width": 368, - "height": 59, + "height": 90, "layout": { "mode": "VERTICAL", "gap": 10, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "MIN", + "counter": "CENTER", "sizing": ["HUG", "FIXED"] }, "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], + "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, { - "name": "statusBadge", - "type": "INSTANCE", + "name": "Server description", + "type": "TEXT", "x": 0, "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "statusBadge", + "type": "INSTANCE", + "x": 148.5, + "y": 70, "width": 71, "height": 20, "component": "Status=Asleep", @@ -190,7 +207,7 @@ "name": "asleepBlock", "type": "FRAME", "x": 36, - "y": 243, + "y": 274, "width": 368, "height": 94, "layout": { diff --git a/assets/design-export/json/qFLfB.json b/assets/design-export/json/qFLfB.json index 6709ab8d4..33ffe4ba9 100644 --- a/assets/design-export/json/qFLfB.json +++ b/assets/design-export/json/qFLfB.json @@ -24,9 +24,9 @@ "name": "shareCard", "type": "FRAME", "x": 500, - "y": 290.5, + "y": 275, "width": 440, - "height": 319, + "height": 350, "fills": [{"type": "SOLID", "color": "#1C1A20"}], "strokes": [{"type": "SOLID", "color": "#2C2932"}], "strokeWeight": 1, @@ -91,9 +91,9 @@ { "name": "logoCol", "type": "FRAME", - "x": 135, + "x": 103, "y": 60, - "width": 98, + "width": 162, "height": 40, "layout": { "mode": "VERTICAL", @@ -105,14 +105,14 @@ }, "children": [ { - "name": "text", + "name": "Instance name", "type": "TEXT", "x": 0, "y": 0, - "width": 98, + "width": 162, "height": 24, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], - "text": "gameplane", + "text": "Northstar Games", "font": ["JetBrains Mono", 600, 18], "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} @@ -120,7 +120,7 @@ { "name": "text", "type": "TEXT", - "x": 4, + "x": 36, "y": 26, "width": 90, "height": 14, @@ -140,34 +140,51 @@ "x": 36, "y": 160, "width": 368, - "height": 59, + "height": 90, "layout": { "mode": "VERTICAL", "gap": 10, "padding": [0, 0, 0, 0], "primary": "MIN", - "counter": "MIN", + "counter": "CENTER", "sizing": ["HUG", "FIXED"] }, "layoutAlignSelf": "STRETCH", "children": [ { - "name": "text", + "name": "Server name", "type": "TEXT", "x": 0, "y": 0, - "width": 146, + "width": 368, "height": 29, "fills": [{"type": "SOLID", "color": "#F5F3F7"}], + "layoutAlignSelf": "STRETCH", "text": "mc-survival", "font": ["JetBrains Mono", 600, 22], + "align": "CENTER", "variables": {"fontFamily": "typography/font-mono", "fills/0/color": "foreground/foreground"} }, { - "name": "statusBadge", - "type": "INSTANCE", + "name": "Server description", + "type": "TEXT", "x": 0, "y": 39, + "width": 368, + "height": 21, + "fills": [{"type": "SOLID", "color": "#9E98A6"}], + "layoutAlignSelf": "STRETCH", + "text": "A survival world for our community.", + "font": ["Geist", 400, 14], + "lineHeight": {"value": 150, "unit": "PERCENT"}, + "align": "CENTER", + "variables": {"fontFamily": "typography/font-sans", "fills/0/color": "muted"} + }, + { + "name": "statusBadge", + "type": "INSTANCE", + "x": 148.5, + "y": 70, "width": 71, "height": 20, "component": "Status=Asleep", @@ -190,7 +207,7 @@ "name": "asleepBlock", "type": "FRAME", "x": 36, - "y": 243, + "y": 274, "width": 368, "height": 40, "layout": { diff --git a/assets/design-export/screens.json b/assets/design-export/screens.json index 46cd86783..7e6bfb14c 100644 --- a/assets/design-export/screens.json +++ b/assets/design-export/screens.json @@ -277,7 +277,7 @@ "name": "Screen/Modules Catalog", "width": 1440, "height": 1320, - "hash": "fdde7681dfd1e8e9c2c337da3700f9dcefa833af504e63830ef43a18d8707d22" + "hash": "fab271f68439d0ed54dbdc8ee496a22c9f1b55cf622fbd70e27a029d1044865a" }, { "file": "DPrYX", @@ -533,7 +533,7 @@ "name": "Screen/Share Link — Up", "width": 1440, "height": 900, - "hash": "0444e28f4d60b240e3a7472291c652c891ddf247efda574c9121cdbc508bee06" + "hash": "a68e39c6376b48d86e8847b96877771053a21ed4d5343d327bc49aca7fc7fbfa" }, { "file": "q31B6w", @@ -541,7 +541,7 @@ "name": "Screen/Share Link — Asleep (can start)", "width": 1440, "height": 900, - "hash": "7bcf84d07219b43a4b47f647681c327488d087bdbf486677db722976e99af61d" + "hash": "26d3958649bdc198319e8291800abb95fca3f65d836e90ce802c8946ab4fe813" }, { "file": "qFLfB", @@ -549,7 +549,7 @@ "name": "Historical/Share Link — Asleep (view only)", "width": 1440, "height": 900, - "hash": "9086f2f0cc0d6678f7b31dafb9695f072ca1f94cc46461fa2546e2810578dea2" + "hash": "36bb7006a73be7e2438f2b10889b1e2d83a78b8bdb739ecafc66312dc7ef592a" }, { "file": "EcoGD", @@ -557,7 +557,7 @@ "name": "Screen/Share Link — Starting", "width": 1440, "height": 900, - "hash": "f0cd0df67b8c3d5c909e28138d760bbe074aefe3ea34a8f522a5ee7616b72cd4" + "hash": "713730e87c5adc46577c0fa3eefce21a3e50c0681d0c28188e55bd21e3d04ef1" }, { "file": "epZO2", @@ -573,7 +573,7 @@ "name": "Screen/Share Link — Stopped by owner", "width": 1440, "height": 900, - "hash": "8918e582ecb0b3a3f9fc47bc0b3a0e2fa61beb8abd92418ea9262be05ec3cf93" + "hash": "98c2ecb0ce8f64a52d62e75e4c8c01343a8f17096283e80fd381f2f33f18e1ef" }, { "file": "B57dG", @@ -581,7 +581,7 @@ "name": "Screen/Share Link — Start timed out", "width": 1440, "height": 900, - "hash": "d1ae20d302b11929e34a8327bc2050a8ffc43e2fc71c36e69695c9e65aed2f51" + "hash": "b9ca0f884dedbebec82edf8e1f85ee90aba70249e32d5550cc885584cba4a6a5" }, { "file": "Bbnga", @@ -1053,7 +1053,7 @@ "name": "Screen/Clusters — Registered clusters", "width": 1440, "height": 900, - "hash": "38dfc31fd15a9edad1c5cb9345a3aaf3b45dcbe90b4ce7ee34b22d617346c813" + "hash": "324b409a2152ef8843554fe53051d261c6300e32cac5454d699ee974c8f6e777" }, { "file": "oMuyw", @@ -1109,7 +1109,7 @@ "name": "Screen/Share Link — Asleep (Start cooldown)", "width": 1440, "height": 900, - "hash": "f97df043fde88dcd0ebf0d6305a532bd9211c479ac8b8deae383822f4e13b6d4" + "hash": "93960bb70c0d72304f0ecd4810edbb52362bac29c9e5574d968dab9b294a6299" }, { "file": "zj5a3", @@ -1189,7 +1189,7 @@ "name": "Screen/Standalone — Clusters (Registered)", "width": 1440, "height": 900, - "hash": "b57ae2e7b17eb104fa91c9cef622d57d5e4778758c8a97a99d73583ba8bd4ef3" + "hash": "5924b2269b41073c6e4b1bf061170b73f713b5a10b30e9b9b1fa9e587b35d576" }, { "file": "Be7ZW", @@ -1205,7 +1205,7 @@ "name": "Screen/Standalone — Modules (No selection)", "width": 1440, "height": 900, - "hash": "3b989eb7fa7834e6f017700eaef196957b521e347b8910e26cc3771112855f3d" + "hash": "6802ab90605f3c98dac27a387b52444561bc280fc2f199685a4f648111c5ac75" }, { "file": "ZlLf0", @@ -1213,7 +1213,7 @@ "name": "Screen/Standalone — Modules (Permission denied)", "width": 1440, "height": 900, - "hash": "d7a300a7bbbaac81d01c5198d30733a0a9d9b014ebf1e815383935847c944764" + "hash": "7b96afdd32c3df27398a050d1d44c88270acbd200fc3d124b11c4c662c4fbeee" }, { "file": "RpHBg", @@ -1285,7 +1285,7 @@ "name": "Screen/Standalone — Modules (East selected)", "width": 1440, "height": 1900, - "hash": "7ff39bd0ccb0de4f05027558ccd5b3a0fa01b70b516d3ec1f3c7cc7d1b363193" + "hash": "f2280b4dd8be8df0b37041aaa1e7d4eb5e01319042f359bade0cd01ec754e97b" }, { "file": "p8QSPq", @@ -1293,7 +1293,7 @@ "name": "Screen/Standalone — Modules (Manage sources)", "width": 1440, "height": 2050, - "hash": "ffb6642c25ec6e918ed744a589cd0b6500b22992bfc915a8cd00ebd624e5a2e9" + "hash": "5c14a2b5ca1d4aa1ccf456514505f1ee2ea1de344a630fd611fbf081777d070d" }, { "file": "aMU7O", @@ -1973,7 +1973,7 @@ "name": "Screen/Clusters — SFTP (remote-lab)", "width": 1440, "height": 900, - "hash": "14ed225a1fe8e4cb60cecbbbb044bec5d43c918f29b303b1c5ca7bcd3981d6dc" + "hash": "b4cee0cab5196b8a280b739e862766f1e2c804a0db37bb1195a889d5fcb7a1f1" }, { "file": "1-46397", @@ -1981,7 +1981,7 @@ "name": "Screen/Clusters — SFTP (remote-lab) — Token created", "width": 1440, "height": 900, - "hash": "5cb22dbef210309e57d5cbbaf1fe5ca7c8c66bc285cc941d4d692477e8fb5875" + "hash": "2be1e83f23bb3f98dabde586d53c462ecb06b9b2350c6f3c22738791e95c761c" }, { "file": "1-46398", @@ -1989,7 +1989,7 @@ "name": "Screen/Clusters — SFTP (remote-lab) — Token limit", "width": 1440, "height": 900, - "hash": "7ddaf46a5e2930b22368cd93568a3e5b408269c6ae6c9d461a18763c3f06468d" + "hash": "6316667d8d13c91ff1248e7e58c78e0a88a3601d887ea71cccf9052df1f7cde2" }, { "file": "1041846705-1", diff --git a/assets/design-export/screenshots/1-46396.png b/assets/design-export/screenshots/1-46396.png index 21fab73fa..5b56831b7 100644 Binary files a/assets/design-export/screenshots/1-46396.png and b/assets/design-export/screenshots/1-46396.png differ diff --git a/assets/design-export/screenshots/1-46397.png b/assets/design-export/screenshots/1-46397.png index 1def6389a..64e04295a 100644 Binary files a/assets/design-export/screenshots/1-46397.png and b/assets/design-export/screenshots/1-46397.png differ diff --git a/assets/design-export/screenshots/1-46398.png b/assets/design-export/screenshots/1-46398.png index fea38ac96..1e2ff95a3 100644 Binary files a/assets/design-export/screenshots/1-46398.png and b/assets/design-export/screenshots/1-46398.png differ diff --git a/assets/design-export/screenshots/B57dG.png b/assets/design-export/screenshots/B57dG.png index 7890fd9dc..e79f5eb06 100644 Binary files a/assets/design-export/screenshots/B57dG.png and b/assets/design-export/screenshots/B57dG.png differ diff --git a/assets/design-export/screenshots/C2LQE4.png b/assets/design-export/screenshots/C2LQE4.png index 11c789eca..e269887ba 100644 Binary files a/assets/design-export/screenshots/C2LQE4.png and b/assets/design-export/screenshots/C2LQE4.png differ diff --git a/assets/design-export/screenshots/EWrn0.png b/assets/design-export/screenshots/EWrn0.png index 3b0920baa..5968d8893 100644 Binary files a/assets/design-export/screenshots/EWrn0.png and b/assets/design-export/screenshots/EWrn0.png differ diff --git a/assets/design-export/screenshots/EcoGD.png b/assets/design-export/screenshots/EcoGD.png index 2529a25e8..3f6fd5ea4 100644 Binary files a/assets/design-export/screenshots/EcoGD.png and b/assets/design-export/screenshots/EcoGD.png differ diff --git a/assets/design-export/screenshots/FBiMN.png b/assets/design-export/screenshots/FBiMN.png index 7b963bcd1..edb3b9407 100644 Binary files a/assets/design-export/screenshots/FBiMN.png and b/assets/design-export/screenshots/FBiMN.png differ diff --git a/assets/design-export/screenshots/LYPXU.png b/assets/design-export/screenshots/LYPXU.png index 74e72d29a..d921e9c10 100644 Binary files a/assets/design-export/screenshots/LYPXU.png and b/assets/design-export/screenshots/LYPXU.png differ diff --git a/assets/design-export/screenshots/WrmU5.png b/assets/design-export/screenshots/WrmU5.png index 85205942c..fdbd9ec3a 100644 Binary files a/assets/design-export/screenshots/WrmU5.png and b/assets/design-export/screenshots/WrmU5.png differ diff --git a/assets/design-export/screenshots/Z0oyh.png b/assets/design-export/screenshots/Z0oyh.png index ac57e71ac..b38d1b16e 100644 Binary files a/assets/design-export/screenshots/Z0oyh.png and b/assets/design-export/screenshots/Z0oyh.png differ diff --git a/assets/design-export/screenshots/ZlLf0.png b/assets/design-export/screenshots/ZlLf0.png index ad56e712a..7c56fb4f1 100644 Binary files a/assets/design-export/screenshots/ZlLf0.png and b/assets/design-export/screenshots/ZlLf0.png differ diff --git a/assets/design-export/screenshots/iYUWc.png b/assets/design-export/screenshots/iYUWc.png index 443908c2e..720858039 100644 Binary files a/assets/design-export/screenshots/iYUWc.png and b/assets/design-export/screenshots/iYUWc.png differ diff --git a/assets/design-export/screenshots/kK8Ji.png b/assets/design-export/screenshots/kK8Ji.png index 03401ba9d..07ff3faad 100644 Binary files a/assets/design-export/screenshots/kK8Ji.png and b/assets/design-export/screenshots/kK8Ji.png differ diff --git a/assets/design-export/screenshots/p8QSPq.png b/assets/design-export/screenshots/p8QSPq.png index 463b79c7c..ba306b2a8 100644 Binary files a/assets/design-export/screenshots/p8QSPq.png and b/assets/design-export/screenshots/p8QSPq.png differ diff --git a/assets/design-export/screenshots/q31B6w.png b/assets/design-export/screenshots/q31B6w.png index 111789fe9..4f383099b 100644 Binary files a/assets/design-export/screenshots/q31B6w.png and b/assets/design-export/screenshots/q31B6w.png differ diff --git a/assets/design-export/screenshots/qFLfB.png b/assets/design-export/screenshots/qFLfB.png index 11ad19d9b..90a7386ea 100644 Binary files a/assets/design-export/screenshots/qFLfB.png and b/assets/design-export/screenshots/qFLfB.png differ diff --git a/changelog/unreleased/1147-share-links-and-catalog-filters.md b/changelog/unreleased/1147-share-links-and-catalog-filters.md new file mode 100644 index 000000000..826a3a4f5 --- /dev/null +++ b/changelog/unreleased/1147-share-links-and-catalog-filters.md @@ -0,0 +1,3 @@ +# Share link details and module catalog filters + +Public share cards show the panel’s instance name and the server description beneath the centered server name. The connection address prefers a published game hostname when one is available. In Modules, the source and workload cluster selectors are under Filters beside search, and categories wrap to fit the page. Cluster cards now offer View Details, View Nodes and View Servers in that order. [PR #1147](https://github.com/GameplanePanel/Gameplane/pull/1147) diff --git a/design.fig b/design.fig index faf7bb6b4..615ca01ba 100644 Binary files a/design.fig and b/design.fig differ diff --git a/docs/multicluster-ui.md b/docs/multicluster-ui.md index 467fec74f..9c1267d2e 100644 --- a/docs/multicluster-ui.md +++ b/docs/multicluster-ui.md @@ -15,10 +15,10 @@ standalone panels have no Local entry and can start with no registrations. The directory is available to cluster managers and users who can discover a registration through their workload, inventory or configuration permissions. -- **Open cluster** opens its Overview, Nodes and Configuration tabs. -- **View servers** opens the server list filtered to that cluster. -- **View nodes** opens `/nodes?cluster=` when the user has its inventory +- **View Details** opens the cluster overview with tabs for Nodes and Configuration. +- **View Nodes** opens `/nodes?cluster=` when the user has its inventory permission. It does not change the remembered infrastructure selection. +- **View Servers** opens the server list filtered to that cluster. - Connection health reports Kubernetes API connectivity. It does not establish gateway readiness or game health. diff --git a/docs/security.md b/docs/security.md index 180c69c13..2c5701574 100644 --- a/docs/security.md +++ b/docs/security.md @@ -345,6 +345,8 @@ still sees the stored values; restrict that with cluster RBAC. ## Share links +Anyone with a valid link can see the panel’s configured instance name, the server name, and the description entered in the server’s **Settings → General**. When the server is online, the page shows its published connection address and available player count. A configured server or template hostname appears with its game port when the operator publishes it. + The server owner can change an active link's **Can start** permission under **Settings → Share links**. Use the **Link ID** shown at creation to identify its row later. Enabling wake access lets anyone who already has that URL wake the server from idle sleep. Disabling it removes that permission on the next request. The URL and expiry stay the same. Share links (`api/internal/db/shares.go`, schema in `api/internal/db/migrations/sqlite/006_share_links.sql`, Postgres twin in `migrations/postgres/`) grant unauthenticated, token-bearing access to a single GameServer's status and connection address, optionally with permission to wake it. Because they are unauthenticated, their security rests entirely on the token being both hard to guess and hard to recover if the database or a backup leaks. diff --git a/i18n/locales/en/app.json b/i18n/locales/en/app.json index a43333e10..b28586aba 100644 --- a/i18n/locales/en/app.json +++ b/i18n/locales/en/app.json @@ -7715,6 +7715,14 @@ "defaultMessage": "{count, plural, one {{count} cluster} other {{count} clusters}} available · Status reports Kubernetes API connectivity, not game or gateway health.", "description": "Clusters: count of registered clusters followed by a note that status reflects Kubernetes API connectivity; {count} is the number of clusters" }, + "web.routes.clusters.card_view_nodes": { + "defaultMessage": "View Nodes", + "description": "Clusters: button on a cluster card that opens the node inventory for that cluster; shown only when the user can view inventory; keep it short" + }, + "web.routes.clusters.card_view_servers": { + "defaultMessage": "View Servers", + "description": "Clusters: button on a cluster card that opens the server list for that cluster; keep it short; its screen-reader name also includes the cluster name" + }, "web.routes.clusters.central_cluster": { "defaultMessage": "Central cluster", "description": "Clusters: note on the cluster card of the built-in local cluster that the panel itself runs in" @@ -7748,12 +7756,12 @@ "description": "Clusters: heading of the empty-state card shown when no cluster is registered or visible to the user" }, "web.routes.clusters.open_cluster": { - "defaultMessage": "Open cluster", - "description": "Open cluster details button" + "defaultMessage": "View Details", + "description": "Clusters: button on a cluster card that opens its overview" }, "web.routes.clusters.open_cluster_named": { - "defaultMessage": "Open cluster {name}", - "description": "Accessible cluster details button label" + "defaultMessage": "View Details for {name}", + "description": "Clusters: accessible label of the View Details button; {name} is the cluster display name" }, "web.routes.clusters.phase_healthy": { "defaultMessage": "Healthy", @@ -7804,16 +7812,16 @@ "description": "Clusters: button on a cluster card that opens the node inventory for that cluster; shown only when the user can view inventory; keep it short" }, "web.routes.clusters.view_nodes_in": { - "defaultMessage": "View nodes in {name}", - "description": "Clusters: accessible label of the View nodes button; {name} is the cluster display name" + "defaultMessage": "View Nodes in {name}", + "description": "Clusters: accessible label of the View Nodes button; {name} is the cluster display name" }, "web.routes.clusters.view_servers": { "defaultMessage": "View servers", "description": "Clusters: button on a cluster card that opens the server list for that cluster; keep it short; its screen-reader name also includes the cluster name" }, "web.routes.clusters.view_servers_in": { - "defaultMessage": "View servers in {name}", - "description": "Clusters: accessible label of the View servers button; {name} is the cluster display name" + "defaultMessage": "View Servers in {name}", + "description": "Clusters: accessible label of the View Servers button; {name} is the cluster display name" }, "web.routes.create_server.add_port_mapping": { "defaultMessage": "Add port mapping", @@ -9037,12 +9045,16 @@ }, "web.routes.modules.all_sources": { "defaultMessage": "All sources", - "description": "Modules: source filter chip that shows every source" + "description": "Modules: source filter option that shows every source" }, "web.routes.modules.catalog_entry_the_entry_can_be_re": { "defaultMessage": "catalog entry. The entry can be re-uploaded later.", "description": "Modules: end of the remove-upload dialog text saying the catalog entry can be re-uploaded later" }, + "web.routes.modules.categories": { + "defaultMessage": "Categories", + "description": "Modules: accessible label for the group of category filters" + }, "web.routes.modules.create_module": { "defaultMessage": "Create module", "description": "Modules: button that opens the dialog to build a new module; keep it short" @@ -9063,6 +9075,10 @@ "defaultMessage": "Failed to load module sources.", "description": "Modules: error text shown when the module sources panel fails to load; a retry button sits next to it" }, + "web.routes.modules.filters": { + "defaultMessage": "Filters", + "description": "Modules: button and popover for choosing the workload cluster and module source" + }, "web.routes.modules.loading_module_catalog": { "defaultMessage": "Loading module catalog…", "description": "Modules: loading text shown in place of the catalog while the module list is fetched" @@ -9103,6 +9119,10 @@ "defaultMessage": "Search modules", "description": "Modules: accessible name of the module search field" }, + "web.routes.modules.source": { + "defaultMessage": "Source", + "description": "Modules: label for the source selector in the Filters popover" + }, "web.routes.modules.uninstall": { "defaultMessage": "Uninstall", "description": "Modules: confirm button of the uninstall dialog that removes the module; keep it short" diff --git a/i18n/locales/fr/app.json b/i18n/locales/fr/app.json index 1ee0c0089..3669f926d 100644 --- a/i18n/locales/fr/app.json +++ b/i18n/locales/fr/app.json @@ -5487,6 +5487,14 @@ "defaultMessage": "{count, plural, one {{count} cluster disponible} other {{count} clusters disponibles}} · Le statut indique la connectivité à l'API Kubernetes, et non l'état du jeu ou de la passerelle.", "description": "Clusters: count of registered clusters followed by a note that status reflects Kubernetes API connectivity; {count} is the number of clusters" }, + "web.routes.clusters.card_view_nodes": { + "defaultMessage": "Voir les nœuds", + "description": "Clusters: button on a cluster card that opens the node inventory for that cluster; shown only when the user can view inventory; keep it short" + }, + "web.routes.clusters.card_view_servers": { + "defaultMessage": "Voir les serveurs", + "description": "Clusters: button on a cluster card that opens the server list for that cluster; keep it short; its screen-reader name also includes the cluster name" + }, "web.routes.clusters.central_cluster": { "defaultMessage": "Cluster central", "description": "Clusters: note on the cluster card of the built-in local cluster that the panel itself runs in" @@ -5561,7 +5569,7 @@ }, "web.routes.clusters.view_nodes_in": { "defaultMessage": "Voir les nœuds de {name}", - "description": "Clusters: accessible label of the View nodes button; {name} is the cluster display name" + "description": "Clusters: accessible label of the View Nodes button; {name} is the cluster display name" }, "web.routes.clusters.view_servers": { "defaultMessage": "Voir les serveurs", @@ -5569,7 +5577,7 @@ }, "web.routes.clusters.view_servers_in": { "defaultMessage": "Voir les serveurs de {name}", - "description": "Clusters: accessible label of the View servers button; {name} is the cluster display name" + "description": "Clusters: accessible label of the View Servers button; {name} is the cluster display name" }, "web.routes.create_server.add_port_mapping": { "defaultMessage": "Ajouter une correspondance de port", @@ -6585,12 +6593,16 @@ }, "web.routes.modules.all_sources": { "defaultMessage": "Toutes les sources", - "description": "Modules: source filter chip that shows every source" + "description": "Modules: source filter option that shows every source" }, "web.routes.modules.catalog_entry_the_entry_can_be_re": { "defaultMessage": "du catalogue. L'entrée pourra être réimportée plus tard.", "description": "Modules: end of the remove-upload dialog text saying the catalog entry can be re-uploaded later" }, + "web.routes.modules.categories": { + "defaultMessage": "Catégories", + "description": "Modules: accessible label for the group of category filters" + }, "web.routes.modules.create_module": { "defaultMessage": "Créer un module", "description": "Modules: button that opens the dialog to build a new module; keep it short" @@ -6611,6 +6623,10 @@ "defaultMessage": "Échec du chargement des sources de modules.", "description": "Modules: error text shown when the module sources panel fails to load; a retry button sits next to it" }, + "web.routes.modules.filters": { + "defaultMessage": "Filtres", + "description": "Modules: button and popover for choosing the workload cluster and module source" + }, "web.routes.modules.loading_module_catalog": { "defaultMessage": "Chargement du catalogue de modules…", "description": "Modules: loading text shown in place of the catalog while the module list is fetched" @@ -6651,6 +6667,10 @@ "defaultMessage": "Rechercher des modules", "description": "Modules: accessible name of the module search field" }, + "web.routes.modules.source": { + "defaultMessage": "Source", + "description": "Modules: label for the source selector in the Filters popover" + }, "web.routes.modules.uninstall": { "defaultMessage": "Désinstaller", "description": "Modules: confirm button of the uninstall dialog that removes the module; keep it short" @@ -10450,7 +10470,7 @@ "defaultMessage": "Impossible de charger les capacités de l'installation." }, "web.routes.clusters.open_cluster_named": { - "defaultMessage": "Ouvrir le cluster {name}" + "defaultMessage": "Voir les détails de {name}" }, "web.components.modpack_confirm_dialog.install_desc": { "defaultMessage": "{serverName} redémarre pour installer le pack. Il reste sur cette version jusqu’à ce que vous la changiez." @@ -10582,7 +10602,7 @@ "defaultMessage": "la clé CurseForge doit être enregistrée dans le panneau avant de pouvoir être partagée avec les serveurs de jeu" }, "web.routes.clusters.open_cluster": { - "defaultMessage": "Ouvrir le cluster" + "defaultMessage": "Voir les détails" }, "web.logs.history.failed": { "defaultMessage": "Impossible de charger l’historique des journaux." diff --git a/web/e2e/screenshots/slice5.spec.ts b/web/e2e/screenshots/slice5.spec.ts index ede4e4400..7cd4c6b53 100644 --- a/web/e2e/screenshots/slice5.spec.ts +++ b/web/e2e/screenshots/slice5.spec.ts @@ -301,6 +301,12 @@ test.describe("Slice 5: Share links — Settings surfaces (Desktop — 1440x900) }); test.describe("Slice 5: Share links — public page (Desktop — 1440x900) @screenshots", () => { + const sharedServer = { + serverName: "mc-survival", + instanceName: "Northstar Games", + description: "A survival world for our community.", + }; + test.use({ viewport: { width: 1440, height: 900 }, deviceScaleFactor: 2, @@ -312,9 +318,9 @@ test.describe("Slice 5: Share links — public page (Desktop — 1440x900) @scre "shot-up": { status: 200, body: { - serverName: "mc-survival", + ...sharedServer, status: "Running", - address: { host: "play.gameplane.example", port: 25565 }, + address: { host: "play.northstar.example", port: 25565 }, playersOnline: 3, }, }, @@ -333,7 +339,7 @@ test.describe("Slice 5: Share links — public page (Desktop — 1440x900) @scre await mockShareResolve(page, { "shot-asleep-start": { status: 200, - body: { serverName: "mc-survival", status: "Suspended" }, + body: { ...sharedServer, status: "Suspended" }, }, "shot-asleep-start:start": { status: 202, body: {} }, }); @@ -361,7 +367,7 @@ test.describe("Slice 5: Share links — public page (Desktop — 1440x900) @scre await mockShareResolve(page, { "shot-start-cooldown": { status: 200, - body: { serverName: "mc-survival", status: "Suspended" }, + body: { ...sharedServer, status: "Suspended" }, }, "shot-start-cooldown:start": { status: 429, headers: { "Retry-After": "120" } }, }); @@ -378,7 +384,7 @@ test.describe("Slice 5: Share links — public page (Desktop — 1440x900) @scre test("EcoGD: Share page — Starting", async ({ page }) => { await mockShareResolve(page, { - "shot-starting": { status: 200, body: { serverName: "mc-survival", status: "Starting" } }, + "shot-starting": { status: 200, body: { ...sharedServer, status: "Starting" } }, }); await page.goto("/share/shot-starting"); await expect(page.getByRole("heading", { name: "mc-survival" })).toBeVisible({ diff --git a/web/e2e/specs/live/dataScreens.spec.ts b/web/e2e/specs/live/dataScreens.spec.ts index ba2f85aad..725f9cd24 100644 --- a/web/e2e/specs/live/dataScreens.spec.ts +++ b/web/e2e/specs/live/dataScreens.spec.ts @@ -133,11 +133,7 @@ test.describe("live: data screens render real backend data", () => { test("modules page renders the real catalog state", async ({ page }) => { await page.goto("/modules"); await expect(page.getByRole("heading", { name: /^modules$/i })).toBeVisible(); - // The "All sources" filter chip always renders (the source list is - // seeded with "all"), so it proves the page reflected the real catalog. - // Asserted alone to stay unambiguous: when the catalog is empty the - // empty-state text is ALSO present, so a combined locator would match two - // elements and trip Playwright's strict mode. - await expect(page.getByRole("button", { name: "All sources" })).toBeVisible(); + await page.getByRole("button", { name: "Filters", exact: true }).click(); + await expect(page.getByRole("button", { name: /Source/ })).toHaveText("All sources"); }); }); diff --git a/web/e2e/specs/live/share-links.spec.ts b/web/e2e/specs/live/share-links.spec.ts index 77411101c..0548047ec 100644 --- a/web/e2e/specs/live/share-links.spec.ts +++ b/web/e2e/specs/live/share-links.spec.ts @@ -108,6 +108,7 @@ test.describe("live: share links", () => { // name rather than a specific status chip. const nameHeading = anonPage.getByRole("heading", { name: serverName }); await expect(nameHeading).toBeVisible({ timeout: 20_000 }); + await expect(anonPage.getByText("Live share-link probe", { exact: true })).toBeVisible(); await expect(anonPage.getByRole("heading", { name: /link not available/i })).toHaveCount(0); // Best-effort start action: only meaningful if the server happened @@ -137,6 +138,7 @@ test.describe("live: share links", () => { await expect( anonPage.getByText(/this link may be invalid, expired, or revoked/i), ).toBeVisible(); + await expect(anonPage.getByText("Live share-link probe", { exact: true })).toHaveCount(0); } finally { await anonContext.close(); } diff --git a/web/e2e/specs/modules.spec.ts b/web/e2e/specs/modules.spec.ts index cf6823a14..5ccba0c3b 100644 --- a/web/e2e/specs/modules.spec.ts +++ b/web/e2e/specs/modules.spec.ts @@ -43,6 +43,37 @@ test.describe("modules page", () => { await expect(grid.getByText("Valheim", { exact: true })).toBeVisible(); }); + test("keeps all categories visible and aligns search with Filters", async ({ page, context }) => { + await page.addInitScript(() => localStorage.setItem("gameplane-e2e-dataset", "screenshots")); + await context.addCookies([{ name: "e2e_modules_variant", value: "design", url: new URL(page.url()).origin }]); + await page.setViewportSize({ width: 1440, height: 900 }); + await page.goto("/modules"); + const categories = page.getByRole("group", { name: "Categories" }); + const search = page.getByRole("textbox", { name: "Search modules" }); + const filters = page.getByRole("button", { name: "Filters", exact: true }); + await expect(categories.getByRole("button", { name: "Adventure" })).toBeVisible(); + await page.evaluate(() => document.fonts.ready); + + for (const width of [1440, 375]) { + await page.setViewportSize({ width, height: 900 }); + const [bar, field, trigger] = await Promise.all([categories.boundingBox(), search.boundingBox(), filters.boundingBox()]); + expect(bar).not.toBeNull(); + expect(field).not.toBeNull(); + expect(trigger).not.toBeNull(); + expect(await categories.evaluate((el) => el.scrollWidth <= el.clientWidth)).toBe(true); + expect(field!.y).toBe(trigger!.y); + expect(field!.height).toBe(trigger!.height); + expect(field!.x + field!.width).toBeLessThanOrEqual(trigger!.x); + expect(trigger!.x + trigger!.width).toBeLessThanOrEqual(width); + if (width === 1440) { + expect(bar!.y).toBe(field!.y); + expect(bar!.height).toBe(field!.height); + } else { + expect(bar!.y + bar!.height).toBeLessThanOrEqual(field!.y); + } + } + }); + test("install dialog submits POST /modules with source/version/name", async ({ page }) => { await page.goto("/modules"); await page.waitForLoadState("domcontentloaded"); diff --git a/web/e2e/specs/multicluster-ui.spec.ts b/web/e2e/specs/multicluster-ui.spec.ts index da2e2e77b..5ab8b9c28 100644 --- a/web/e2e/specs/multicluster-ui.spec.ts +++ b/web/e2e/specs/multicluster-ui.spec.ts @@ -97,7 +97,7 @@ test.describe("multicluster administration", () => { await expect(page.getByRole("heading", { name: "Clusters", exact: true })).toBeVisible(); await expect(page.getByRole("button", { name: "Select cluster", exact: true })).toHaveCount(0); await expect(page.getByRole("heading", { name: "Remote demo", exact: true })).toBeVisible(); - await page.getByRole("button", { name: "View nodes in Remote demo", exact: true }).click(); + await page.getByRole("button", { name: "View Nodes in Remote demo", exact: true }).click(); await expect(page).toHaveURL(/\/nodes\?cluster=remote-demo$/); const nodeFilter = page.getByRole("main").getByRole("button", { name: /^Filter(?:\s*\d+)?$/ }); await expect(nodeFilter).toHaveAccessibleName(/^Filter\s*1$/); @@ -118,7 +118,7 @@ test.describe("multicluster administration", () => { await page.goto("/clusters/remote-demo?tab=configuration"); await expect(page.getByRole("button", { name: /Download kubeconfig/i })).toBeDisabled(); await page.goto("/clusters"); - await page.getByRole("button", { name: "View servers in Remote demo", exact: true }).click(); + await page.getByRole("button", { name: "View Servers in Remote demo", exact: true }).click(); await expect(page).toHaveURL(/\/servers\?cluster=remote-demo$/); await expect(page.getByRole("main").getByRole("link", { name: "smoke-same", exact: true })).toHaveCount(1); await expect(page.getByRole("button", { name: "Select cluster", exact: true })).toHaveCount(0); diff --git a/web/specs.md b/web/specs.md index 208a67684..7cbc59255 100644 --- a/web/specs.md +++ b/web/specs.md @@ -590,9 +590,9 @@ Every file in slice 2b imports **only** from `@heroui/react` and `@/components/u ### Modules Catalog Surface **Modules.tsx (main page):** -- Single catalog view (no Catalog/Installed/Upload tab switcher): search box, source filter, and category chips over the combined catalog (`matchesAllCategories`); ModuleCard instances for each entry, each carrying its own install/upgrade/uninstall actions +- Category chips filter the catalog with `matchesAllCategories` and wrap to fit the available width. The search field and its adjacent Filters button stay together on smaller screens. Filters contains the source selector and, on standalone installations, the workload cluster selector. Each selection takes effect immediately. The cluster selector remains available when the catalog cannot load or no registered target is selected. - "Create module" button opens the Module Builder; "Upload module" button (shown when an upload-capable source exists) opens `UploadModuleDialog` -- `ModuleSourcesPanel` (source CRUD) is reached from Admin, not from a tab on this page +- Manage sources opens the source editor for the current catalog target. Admin also exposes the editor through `ModuleSourcesPanel`. **ModuleCard.tsx (reusable card):** - Game icon (ui/GameIcon); module name, description @@ -878,7 +878,7 @@ package.json # @gameplane/web v0.5.0; dev: vite, npm scripts for - **Step 3 (Review & Export)**: Dual-pane view with syntax-editable YAML manifests (`module.yaml`, `template.yaml`, `README.md`), live offline validation diagnostics, memory scaling simulation (`autoFromMemoryLimit`), and action buttons to download a `.tar.gz` archive or install directly into a cluster upload `ModuleSource`. 7. **Clusters** (`/clusters`) → `ClustersPage`; **Nodes** (`/nodes`) → `NodesPage` - - Clusters lists authorized registrations and opens `/clusters/$clusterId` with Overview, Nodes and Configuration tabs. + - Each cluster card offers **View Details**, **View Nodes** (with inventory permission), then **View Servers**. View Details opens `/clusters/$clusterId` with Overview, Nodes and Configuration tabs. - Nodes combines authorized inventory by default with URL cluster, text and status filters, sortable columns and responsive stacked rows. Its compact search and Filter popover match Backups: Cluster/Status choices are drafts until Apply, Clear resets drafts, and the badge counts applied filters without search. Cluster details reuse the same inventory with a fixed target and status-only popover. Incomplete coverage and missing metrics remain visible. - Add node requires an explicit target; node join and kubeconfig download remain local-only and capability/permission gated. Configuration owns kubeconfig, read-only storage, target-bound backup destinations and confirmed remote removal. - `/cluster` remains a compatibility redirect to Nodes. Navigation and filters never retarget an existing server or pending mutation. @@ -1010,7 +1010,7 @@ The warning is shown regardless of how many groups are being added (single or mu 13. **Share** (`/share/$token`) → `SharePage` (public route, outside AppLayout) - Public, unauthenticated, no sidebar or top bar - - Resolves a share link token to its public view (server name, status, address, player count if exposed) + - Valid links show the configured instance name above the centered server name, with the optional server description immediately below the name. The online state shows the preferred published hostname and port (or the fallback IP and port) and the player count when available. The copy action uses the displayed address. - Rate-limited; invalid links and auth failures show neutral "Link not available" copy per FR-005, without raw error detail - Public responses include `manuallyStopped` and effective `canStart` booleans; clients tolerate their absence from older API versions. `Shares.start` propagates rejected requests, including uniform 404 and manually-stopped 409 responses, so only an accepted response begins wake polling. The page never displays raw response details. A manual stop takes precedence over stale observed phases, including Running, and shows Stopped with owner-must-start copy and no public action. A 409 from Start enters the same stopped state. An idle-asleep response with `canStart: false` shows the view-only card; missing fields retain compatibility with older APIs. - Starting polls wait at least five seconds after each completed request, with one request in flight. Transient 429/5xx/network failures retain the last public Starting view (or loading spinner during initial resolve) and retry with 10/20/40/60-second bounded backoff; a larger Retry-After (seconds or HTTP date) is honored. Successful polling responses reset the delay. After an accepted wake, stale Stopped/Suspended phases keep the Starting card and continue polling; no second Start is offered. Running, a manual stop, or a neutral invalid response stops polling. Every Starting session has a separate five-minute deadline that stops scheduled polls and aborts an outstanding request even during long Retry-After backoffs, then shows Still unavailable with check-back/owner-help copy. An observed start without a locally accepted wake may return to an asleep card. Token changes/unmount abort requests and ignore stale completions. `Shares.resolve` propagates transient errors with `APIError.retryAfter`, while invalid/expired/revoked 404s remain the same neutral response. diff --git a/web/src/components/ClusterSelector.tsx b/web/src/components/ClusterSelector.tsx index e5fde97e9..cc47b793a 100644 --- a/web/src/components/ClusterSelector.tsx +++ b/web/src/components/ClusterSelector.tsx @@ -41,7 +41,6 @@ export function ClusterSelector() { const { data, isLoading, error } = useQuery({ queryKey: ["clusters"], queryFn: () => Clusters.list(), - refetchInterval: 30_000, }); const clusters = data?.items ?? []; diff --git a/web/src/components/ModuleTarget.tsx b/web/src/components/ModuleTarget.tsx index 1706ccbf8..ee2849615 100644 --- a/web/src/components/ModuleTarget.tsx +++ b/web/src/components/ModuleTarget.tsx @@ -14,9 +14,19 @@ import { useOptionalIntl } from "@/lib/i18n/format"; const unauthorized = (error: unknown) => error instanceof APIError && error.status === 401; +interface ModuleTargetProps { + children: (cluster: string, canManage: boolean, clusterDisplayName: string, selector: ReactNode) => ReactNode; + loadingMessage?: string; + renderFallback?: (state: ReactNode, selector: ReactNode) => ReactNode; +} + +function defaultFallback(state: ReactNode, selector: ReactNode) { + return <>{selector}{state}; +} + // Do not mount workload queries until the installation and target are known. // Combined installations retain their existing local module catalog. -export function ModuleTarget({ children, loadingMessage: loadingMessageProp }: { children: (cluster: string, canManage: boolean, clusterDisplayName: string) => ReactNode; loadingMessage?: string }) { +export function ModuleTarget({ children, loadingMessage: loadingMessageProp, renderFallback = defaultFallback }: ModuleTargetProps) { const intl = useOptionalIntl(); const loadingMessage = loadingMessageProp ?? intl.formatMessage({ id: "web.components.module_target.loading_installation", defaultMessage: "Loading installation…", description: "Module target: loading message while the installation settings load, used when no loadingMessage is passed" }); const installation = useInstallation(); @@ -25,33 +35,35 @@ export function ModuleTarget({ children, loadingMessage: loadingMessageProp }: { const registry = useQuery({ queryKey: ["clusters"], queryFn: () => Clusters.list(), enabled: installation.data?.standalone === true, + refetchInterval: 30_000, }); if (installation.isPending) return ; if (installation.isError && (!installation.data || unauthorized(installation.error))) return void installation.refetch()} />; + const selector = installation.data.standalone ? : null; + const fallback = (state: ReactNode) => renderFallback(state, selector); const renderTarget = (cluster: string, clusterDisplayName = cluster) => { - if (identity.isPending) return ; - if (identity.isError && (!identity.data || unauthorized(identity.error))) return void identity.refetch()} />; + if (identity.isPending) return fallback(); + if (identity.isError && (!identity.data || unauthorized(identity.error))) return fallback( void identity.refetch()} />); return <> {identity.isError && void identity.refetch()} />} {can(identity.data, "modules:read", "*", cluster) - ? children(cluster, can(identity.data, "modules:manage", "*", cluster), clusterDisplayName) - : } + ? children(cluster, can(identity.data, "modules:manage", "*", cluster), clusterDisplayName, selector) + : fallback()} ; }; const installationError = installation.isError && void installation.refetch()} />; if (!installation.data.standalone) return <>{installationError}{renderTarget("local")}; const target = registry.data?.items.find((cluster) => cluster.name === selected); return
- {installationError} {registry.isError && registry.data && !unauthorized(registry.error) && void registry.refetch()} />} - {registry.isPending ? - : registry.isError && (!registry.data || unauthorized(registry.error)) ? void registry.refetch()} /> + {registry.isPending ? fallback() + : registry.isError && (!registry.data || unauthorized(registry.error)) ? fallback( void registry.refetch()} />) : target ? renderTarget(target.name, target.displayName || target.name) - : + : fallback(

{intl.formatMessage({ id: "web.components.module_target.select_a_workload_cluster", defaultMessage: "Select a workload cluster", description: "Module target: heading of the empty state asking the user to pick a workload cluster before its modules can be shown" })}

{intl.formatMessage({ id: "web.components.module_target.modules_and_their_sources_are_managed", defaultMessage: "Modules and their sources are managed by the operator on a registered workload cluster.", description: "Module target: explanation under the select-a-cluster heading saying modules and their sources are managed by the operator on a registered workload cluster" })}

{intl.formatMessage({ id: "web.components.module_target.manage_clusters", defaultMessage: "Manage clusters", description: "Module target: link in the select-a-cluster empty state that opens the clusters page; keep it short" })} -
} +
)}
; } diff --git a/web/src/components/modules/ModuleSourcesPanel.tsx b/web/src/components/modules/ModuleSourcesPanel.tsx index 7775fa59c..23b841da6 100644 --- a/web/src/components/modules/ModuleSourcesPanel.tsx +++ b/web/src/components/modules/ModuleSourcesPanel.tsx @@ -30,7 +30,9 @@ import type { IntlShape } from "react-intl"; // Helm values or `kubectl apply` — the dashboard just writes the CRs. export function ModuleSourcesPanel() { const intl = useOptionalIntl(); - return {(cluster, canManage) => }; + return + {(cluster, canManage, _displayName, selector) => <>{selector}} + ; } export function ClusterModuleSources({ cluster, canManage }: { cluster: string; canManage: boolean }) { diff --git a/web/src/routes/Clusters.test.tsx b/web/src/routes/Clusters.test.tsx index bab2888b9..b597553c9 100644 --- a/web/src/routes/Clusters.test.tsx +++ b/web/src/routes/Clusters.test.tsx @@ -25,9 +25,11 @@ describe("ClustersPage", () => { renderWithQuery(); expect(await screen.findByRole("heading", { name: "East" })).toBeInTheDocument(); expect(screen.getByText("API: Unhealthy")).toBeInTheDocument(); - expect(screen.getByRole("button", { name: "View servers in East" })).toBeEnabled(); - expect(screen.queryByRole("button", { name: "View nodes in East" })).not.toBeInTheDocument(); - expect(screen.getByRole("button", { name: "View nodes in Central" })).toBeEnabled(); + expect(screen.getByRole("button", { name: "View Servers in East" })).toBeEnabled(); + expect(screen.queryByRole("button", { name: "View Nodes in East" })).not.toBeInTheDocument(); + expect(screen.getByRole("button", { name: "View Nodes in Central" })).toBeEnabled(); + const centralActions = screen.getAllByRole("button", { name: /^View .+ Central$/ }); + expect(centralActions.map((button) => button.textContent)).toEqual(["View Details", "View Nodes", "View Servers"]); expect(screen.getByText(/Kubernetes API connectivity/)).toBeInTheDocument(); }); @@ -38,7 +40,7 @@ describe("ClustersPage", () => { renderWithQuery(, { client }); const key = ["resource", "local", "gameplane-games", "same-name", "local-uid", "server"]; client.setQueryData(key, { uid: "local-uid" }); - await userEvent.click(await screen.findByRole("button", { name: "View servers in East" })); + await userEvent.click(await screen.findByRole("button", { name: "View Servers in East" })); await waitFor(() => expect(navigate).toHaveBeenCalledWith({ to: "/servers", search: { cluster: "east" } })); expect(getCurrentCluster()).toBe("local"); expect(client.getQueryData(key)).toEqual({ uid: "local-uid" }); @@ -47,7 +49,7 @@ describe("ClustersPage", () => { it("opens inventory only for an explicitly capable registration", async () => { server.use(http.get("/clusters", () => HttpResponse.json({ items: [{ ...registrations[1], canViewInventory: true }] }))); renderWithQuery(); - await userEvent.click(await screen.findByRole("button", { name: "View nodes in East" })); + await userEvent.click(await screen.findByRole("button", { name: "View Nodes in East" })); await waitFor(() => expect(navigate).toHaveBeenCalledWith({ to: "/nodes", search: { cluster: "east" } })); expect(getCurrentCluster()).toBe("local"); }); @@ -55,7 +57,7 @@ describe("ClustersPage", () => { it("opens details without changing the infrastructure selection or offering directory removal", async () => { server.use(http.get("/clusters", () => HttpResponse.json({ items: registrations }))); renderWithQuery(); - await userEvent.click(await screen.findByRole("button", { name: "Open cluster East" })); + await userEvent.click(await screen.findByRole("button", { name: "View Details for East" })); expect(navigate).toHaveBeenCalledWith({ to: "/clusters/$clusterId", params: { clusterId: "east" }, search: { tab: "overview" } }); expect(getCurrentCluster()).toBe("local"); expect(screen.queryByRole("button", { name: /Remove cluster/ })).not.toBeInTheDocument(); @@ -64,15 +66,15 @@ describe("ClustersPage", () => { it("admits an authorized destination-only registration without exposing node inventory", async () => { server.use(http.get("/users/me", () => HttpResponse.json(makeUser({ permissions: {}, permissionsByCluster: { east: { "gameplane-games": ["destinations:read"] } } }))), http.get("/clusters", () => HttpResponse.json({ items: [registrations[1]] }))); renderWithQuery(); - expect(await screen.findByRole("button", { name: "Open cluster East" })).toBeEnabled(); - expect(screen.queryByRole("button", { name: "View nodes in East" })).not.toBeInTheDocument(); + expect(await screen.findByRole("button", { name: "View Details for East" })).toBeEnabled(); + expect(screen.queryByRole("button", { name: "View Nodes in East" })).not.toBeInTheDocument(); }); it("does not invent a local registration for empty or failed registry responses", async () => { server.use(http.get("/clusters", () => HttpResponse.json({ items: [] }))); const { unmount } = renderWithQuery(); expect(await screen.findByText("No clusters available")).toBeInTheDocument(); - expect(screen.queryByRole("button", { name: /View servers/ })).not.toBeInTheDocument(); + expect(screen.queryByRole("button", { name: /View Servers/ })).not.toBeInTheDocument(); unmount(); server.use(http.get("/clusters", () => HttpResponse.error())); renderWithQuery(); diff --git a/web/src/routes/Clusters.tsx b/web/src/routes/Clusters.tsx index 1c8e70b55..a37b85f12 100644 --- a/web/src/routes/Clusters.tsx +++ b/web/src/routes/Clusters.tsx @@ -78,9 +78,9 @@ export function ClustersPage() { {cluster.message &&

{cluster.message}

}
- - - {cluster.canViewInventory === true && } + + {cluster.canViewInventory === true && } + {can(me, "cluster:manage") && }
diff --git a/web/src/routes/Modules.test.tsx b/web/src/routes/Modules.test.tsx index aa2689ced..25972f665 100644 --- a/web/src/routes/Modules.test.tsx +++ b/web/src/routes/Modules.test.tsx @@ -301,10 +301,18 @@ describe("ModulesPage", () => { await screen.findByText("Minecraft (Java)"); expect(screen.getByText("Valheim")).toBeInTheDocument(); - // Click the "community" source filter - await userEvent.click(screen.getByRole("button", { name: "community" })); + const filters = screen.getByRole("button", { name: "Filters" }); + await userEvent.click(filters); + expect(screen.queryByRole("button", { name: "Select cluster" })).not.toBeInTheDocument(); + const source = screen.getByRole("button", { name: /Source/ }); + expect(source).toHaveTextContent("All sources"); + await userEvent.click(source); + await userEvent.click(await screen.findByRole("option", { name: "community" })); expect(screen.queryByText("Minecraft (Java)")).not.toBeInTheDocument(); expect(screen.getByText("Valheim")).toBeInTheDocument(); + await userEvent.click(source); + await userEvent.click(await screen.findByRole("option", { name: "All sources" })); + expect(screen.getByText("Minecraft (Java)")).toBeInTheDocument(); }); it("searches modules by display name", async () => { diff --git a/web/src/routes/Modules.tsx b/web/src/routes/Modules.tsx index 51eb11303..37ab03587 100644 --- a/web/src/routes/Modules.tsx +++ b/web/src/routes/Modules.tsx @@ -1,8 +1,8 @@ import { ModuleTarget } from "@/components/ModuleTarget"; -import { useMemo, useState } from "react"; +import { useMemo, useState, type ReactNode } from "react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { Plus, Search, Settings2, Upload } from "lucide-react"; -import { Button, Input } from "@heroui/react"; +import { Filter, Plus, Search, Settings2, Upload } from "lucide-react"; +import { Button, Input, Label, ListBox, ListBoxItem, Popover, Select } from "@heroui/react"; import { ModuleCard } from "@/components/modules/ModuleCard"; import { InstallDialog } from "@/components/modules/InstallDialog"; @@ -26,10 +26,67 @@ import { useOptionalIntl } from "@/lib/i18n/format"; // a Module CR, the operator's Module reconciler pulls the bundle and // materializes the GameTemplate. export function ModulesPage() { - return {(cluster, canManage, clusterDisplayName) => }; + return
+ + {(cluster, canManage, clusterDisplayName, selector) => ( + + )} + +
; +} + +function catalogFallback(state: ReactNode, clusterSelector: ReactNode) { + return <>{clusterSelector && }{state}; +} + +interface CatalogSearch { + query: string; + onQueryChange: (value: string) => void; + sources: string[]; + source: string; + onSourceChange: (value: string) => void; } -function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: string; clusterDisplayName: string; canManage: boolean }) { +function ModuleSearchFilters({ clusterSelector, catalog }: { clusterSelector: ReactNode; catalog?: CatalogSearch }) { + const intl = useOptionalIntl(); + const filters = intl.formatMessage({ id: "web.routes.modules.filters", defaultMessage: "Filters", description: "Modules: button and popover for choosing the workload cluster and module source" }); + const allSources = intl.formatMessage({ id: "web.routes.modules.all_sources", defaultMessage: "All sources", description: "Modules: source filter option that shows every source" }); + return
+
+
+ + + + + {clusterSelector} + + + + +
; +} + +function ModulesCatalog({ cluster, clusterDisplayName, canManage, clusterSelector }: { cluster: string; clusterDisplayName: string; canManage: boolean; clusterSelector: ReactNode }) { const intl = useOptionalIntl(); const qc = useQueryClient(); const { data, isLoading, isError, refetch } = useQuery({ @@ -43,7 +100,7 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s }); const [q, setQ] = useState(""); - const [sourceFilter, setSourceFilter] = useState("all"); + const [sourceFilter, setSourceFilter] = useState(""); const [catFilter, setCatFilter] = useState>(new Set()); const [installTarget, setInstallTarget] = useState(null); const [uninstallTarget, setUninstallTarget] = useState(null); @@ -65,7 +122,7 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s const sources = useMemo(() => { const out = new Set(); for (const it of items) for (const s of it.sources) out.add(s.name); - return ["all", ...Array.from(out).sort()]; + return Array.from(out).sort(); }, [items]); const catChips = useMemo( @@ -88,7 +145,7 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s }; const visible = items.filter((e) => { - if (sourceFilter !== "all" && !e.sources.some((s) => s.name === sourceFilter)) return false; + if (sourceFilter && !e.sources.some((s) => s.name === sourceFilter)) return false; if (!matchesAllCategories(e.categories, e.game ?? "", catFilter)) return false; if (q && !(e.displayName ?? e.name).toLowerCase().includes(q.toLowerCase())) { return false; @@ -138,16 +195,16 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s onError: (err: Error) => setPageError(formatErr(err)), }); - if (isLoading) return ; - if (isError && !data) return void refetch()} />; + if (isLoading) return catalogFallback(, clusterSelector); + if (isError && !data) return catalogFallback( void refetch()} />, clusterSelector); return ( -
+
+ <> {uploadSources.length > 0 && ( @@ -156,7 +213,7 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s )} -
+ } /> @@ -164,54 +221,27 @@ function ModulesCatalog({ cluster, clusterDisplayName, canManage }: { cluster: s {sourcesOpen ? : sourcesError && void refetchSources()} />} -
-
- {sources.map((s) => ( +
+
+ {catChips.map((c) => ( ))}
-
-
- {catChips.map((c) => ( - - ))} -
-
-
-
- - setQ(e.target.value)} - /> -
+
{pageError && ( diff --git a/web/src/routes/Share.test.tsx b/web/src/routes/Share.test.tsx index b88eb3c56..f3d873752 100644 --- a/web/src/routes/Share.test.tsx +++ b/web/src/routes/Share.test.tsx @@ -82,6 +82,24 @@ describe("SharePage", () => { }); }); + it.each([ + { status: "Running" }, + { status: "Suspended", canStart: true }, + { status: "Suspended", canStart: false }, + { status: "Stopped", manuallyStopped: true }, + { status: "Starting" }, + ])("shows the configured identity and description for %j", async (power) => { + const description = "A survival world for our community."; + vi.mocked(Shares.resolve).mockResolvedValue({ + serverName: "mc-survival", instanceName: "Northstar Games", description, ...power, + }); + renderWithRouter("test-token"); + const heading = await screen.findByRole("heading", { name: "mc-survival" }); + expect(screen.getByText("Northstar Games")).toBeInTheDocument(); + expect(heading.nextElementSibling).toBe(screen.getByText(description)); + expect(screen.queryByText("gameplane")).not.toBeInTheDocument(); + }); + describe("Up state (T182)", () => { it("renders server name and Online status", async () => { vi.mocked(Shares.resolve).mockResolvedValue({ @@ -96,6 +114,8 @@ describe("SharePage", () => { await waitFor(() => { expect(screen.getByText("mc-survival")).toBeInTheDocument(); expect(screen.getByText("Online")).toBeInTheDocument(); + expect(screen.getByText("gameplane")).toBeInTheDocument(); + expect(screen.getByRole("heading").nextElementSibling).toBeNull(); }); }); @@ -525,13 +545,15 @@ describe("SharePage", () => { it("uses neutral unavailable copy for a permanent auth failure during polling", async () => { vi.useFakeTimers(); vi.mocked(Shares.resolve) - .mockResolvedValueOnce({ serverName: "survival", status: "Starting" }) + .mockResolvedValueOnce({ serverName: "survival", instanceName: "Northstar Games", description: "Our shared world", status: "Starting" }) .mockRejectedValue(new APIError(401, "private auth detail")); renderWithRouter("test-token"); await act(async () => {}); await act(async () => { await vi.advanceTimersByTimeAsync(5000); }); expect(screen.getByText("Link not available")).toBeInTheDocument(); expect(screen.queryByText(/private auth detail/)).not.toBeInTheDocument(); + expect(screen.queryByText("Northstar Games")).not.toBeInTheDocument(); + expect(screen.queryByText("Our shared world")).not.toBeInTheDocument(); await act(async () => { await vi.advanceTimersByTimeAsync(60000); }); expect(Shares.resolve).toHaveBeenCalledTimes(2); }); diff --git a/web/src/routes/Share.tsx b/web/src/routes/Share.tsx index 7b193c8bb..60513ed6a 100644 --- a/web/src/routes/Share.tsx +++ b/web/src/routes/Share.tsx @@ -94,6 +94,26 @@ function LanguageCorner() { ); } +function ShareIdentity({ server }: { server?: ShareLinkPublic }) { + const intl = useOptionalIntl(); + const description = server?.description?.trim(); + return ( +
+
+
+ +
+
+
+
{server?.instanceName?.trim() || intl.formatMessage({ id: "web.routes.share.gameplane", defaultMessage: "gameplane", description: "Share: product name above the shared server title on the public share page; a brand name, usually kept as is" })}
+
{intl.formatMessage({ id: "web.routes.share.shared_server_link", defaultMessage: "shared server link", description: "Share: caption under the product name on the public share page, identifying the page as a shared server link" })}
+
+ {server &&

{server.serverName}

} + {description &&

{description}

} +
+ ); +} + export function SharePage() { const { token } = useParams({ from: "/share/$token" }); return ; @@ -261,7 +281,8 @@ function ShareView({ token }: { token: string }) { } }; - const containerClass = "flex h-full w-full items-center justify-center bg-background p-6"; + const containerClass = "flex min-h-full w-full items-center justify-center bg-background p-6"; + const serverCardClass = "relative w-full max-w-[440px] p-8"; return (
@@ -275,19 +296,10 @@ function ShareView({ token }: { token: string }) { )} {state === "up" && data && ( - +
-
-
- -
-
-
-
{intl.formatMessage({ id: "web.routes.share.gameplane", defaultMessage: "gameplane", description: "Share: product name above the shared server title on the public share page; a brand name, usually kept as is" })}
-
{intl.formatMessage({ id: "web.routes.share.shared_server_link", defaultMessage: "shared server link", description: "Share: caption under the product name on the public share page, identifying the page as a shared server link" })}
-
-

{data.serverName}

+
{intl.formatMessage({ id: "web.routes.share.online", defaultMessage: "Online", description: "Share: status badge under the server name on the share page, shown when the server is running; keep it short" })}
@@ -298,7 +310,7 @@ function ShareView({ token }: { token: string }) {
{intl.formatMessage({ id: "web.routes.share.connect_at", defaultMessage: "CONNECT AT", description: "Share: small label above the server address on the share page; keep it short" })}
{address ? (
- + {address}