refactor: remove video channel type, fix invisible CreateChannel inputs
Voice channels already support video/screen share, so the separate video type was redundant. Adds migration to convert existing video channels. Also adds border-border-soft to CreateChannel input fields for visibility.
This commit is contained in:
@@ -57,7 +57,7 @@ interface SpaceState {
|
||||
leaveSpace: (spaceId: string) => Promise<void>;
|
||||
joinByCode: (inviteCode: string, origin?: string) => Promise<Space>;
|
||||
generateInvite: (spaceId: string) => Promise<string>;
|
||||
createChannel: (spaceId: string, name: string, type: 'text' | 'voice' | 'video', topic?: string) => Promise<Channel>;
|
||||
createChannel: (spaceId: string, name: string, type: 'text' | 'voice', topic?: string) => Promise<Channel>;
|
||||
deleteChannel: (channelId: string) => Promise<void>;
|
||||
addSpace: (space: Space) => void;
|
||||
removeSpace: (spaceId: string) => void;
|
||||
@@ -294,7 +294,7 @@ export const useSpaceStore = create<SpaceState>((set, get) => ({
|
||||
return result.inviteCode;
|
||||
},
|
||||
|
||||
createChannel: async (spaceId: string, name: string, type: 'text' | 'voice' | 'video', topic?: string) => {
|
||||
createChannel: async (spaceId: string, name: string, type: 'text' | 'voice', topic?: string) => {
|
||||
const channel = await api.channels.create(spaceId, { name, type, topic });
|
||||
set((state) => {
|
||||
if (state.channels.some(c => c.id === channel.id)) return state;
|
||||
|
||||
Reference in New Issue
Block a user