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