fix(spaces): correct API paths for member/invite operations in settings panel

All fetch calls in rstack-space-settings were missing the /api/spaces prefix,
causing 404s for add-by-username, invite-by-email, change-role, remove-member,
and load-invites. Also add color-scheme: light dark to fix native select
dropdowns rendering in light mode on dark theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-25 15:15:33 -07:00
parent 28f11242f7
commit 0753b31990
1 changed files with 6 additions and 5 deletions

View File

@ -213,7 +213,7 @@ export class RStackSpaceSettings extends HTMLElement {
// Load invites (admin only)
if (this._isAdmin && token) {
try {
const res = await fetch(`/${this._space}/invites`, {
const res = await fetch(`/api/spaces/${this._space}/invites`, {
headers: { "Authorization": `Bearer ${token}` },
});
if (res.ok) {
@ -615,7 +615,7 @@ export class RStackSpaceSettings extends HTMLElement {
if (!token) return;
try {
const res = await fetch(`/${this._space}/members/add`, {
const res = await fetch(`/api/spaces/${this._space}/members/add`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@ -649,7 +649,7 @@ export class RStackSpaceSettings extends HTMLElement {
if (!token) return;
try {
const res = await fetch(`/${this._space}/invite`, {
const res = await fetch(`/api/spaces/${this._space}/invite`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@ -693,7 +693,7 @@ export class RStackSpaceSettings extends HTMLElement {
if (!token) return;
try {
await fetch(`/${this._space}/members/${encodeURIComponent(did)}`, {
await fetch(`/api/spaces/${this._space}/members/${encodeURIComponent(did)}`, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
@ -710,7 +710,7 @@ export class RStackSpaceSettings extends HTMLElement {
if (!token) return;
try {
await fetch(`/${this._space}/members/${encodeURIComponent(did)}`, {
await fetch(`/api/spaces/${this._space}/members/${encodeURIComponent(did)}`, {
method: "DELETE",
headers: { "Authorization": `Bearer ${token}` },
});
@ -739,6 +739,7 @@ export class RStackSpaceSettings extends HTMLElement {
const PANEL_CSS = `
:host {
display: contents;
color-scheme: light dark;
}
.panel {