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:
parent
28f11242f7
commit
0753b31990
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue