fix: federated space icon display/upload in settings, restyle settings panels

Fix three federation bugs in Space Settings: icon URL was double-wrapped
through home API, upload targeted home instance instead of remote, and
updateSpace used home API client. Also restyle settings panels (User,
Space, Members, Roles, Connected Instances) with consistent section
headers, grouped cards, and improved layout.
This commit is contained in:
Jannis Braun
2026-03-09 03:30:15 +01:00
parent d75788febd
commit 096251e5b0
8 changed files with 599 additions and 485 deletions
+8 -1
View File
@@ -199,7 +199,14 @@ export const useSpaceStore = create<SpaceState>((set, get) => ({
},
updateSpace: async (spaceId: string, data: UpdateSpaceRequest) => {
const updated = await api.spaces.update(spaceId, data);
const space = get().spaces.find(s => s.id === spaceId);
const origin = space?._instanceOrigin ?? '';
const client = getApiForOrigin(origin);
const updated = await client.spaces.update(spaceId, data);
// Normalize remote asset URL so the icon displays correctly in-app
if (origin && updated.icon) {
updated.icon = resolveAssetUrl(updated.icon, origin) ?? updated.icon;
}
set((state) => ({
spaces: state.spaces.map(s => s.id === spaceId ? { ...s, ...updated } : s),
}));