refactor: rename Server → Space across entire codebase
Renames all domain terminology from "Server" to "Space" throughout the application — database schema, API routes, shared types, stores, components, and UI strings. Files renamed: ServerSidebar → SpaceSidebar, CreateServer → CreateSpace, JoinServer → JoinSpace, ServerSettings → SpaceSettings, serverStore → spaceStore, routes/servers → routes/spaces.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Modal } from '../ui/Modal';
|
||||
import { useUIStore } from '../../stores/uiStore';
|
||||
import { useServerStore } from '../../stores/serverStore';
|
||||
import { useSpaceStore } from '../../stores/spaceStore';
|
||||
|
||||
export function CreateChannelModal() {
|
||||
const [name, setName] = useState('');
|
||||
@@ -11,8 +11,8 @@ export function CreateChannelModal() {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const activeModal = useUIStore((s) => s.activeModal);
|
||||
const closeModal = useUIStore((s) => s.closeModal);
|
||||
const createChannel = useServerStore((s) => s.createChannel);
|
||||
const currentServerId = useServerStore((s) => s.currentServerId);
|
||||
const createChannel = useSpaceStore((s) => s.createChannel);
|
||||
const currentSpaceId = useSpaceStore((s) => s.currentSpaceId);
|
||||
|
||||
const isOpen = activeModal === 'createChannel';
|
||||
|
||||
@@ -25,14 +25,14 @@ export function CreateChannelModal() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentServerId) {
|
||||
setError('No server selected');
|
||||
if (!currentSpaceId) {
|
||||
setError('No space selected');
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
try {
|
||||
await createChannel(currentServerId, name.trim(), type, topic.trim() || undefined);
|
||||
await createChannel(currentSpaceId, name.trim(), type, topic.trim() || undefined);
|
||||
closeModal();
|
||||
setName('');
|
||||
setTopic('');
|
||||
|
||||
Reference in New Issue
Block a user