diff --git a/frontend/src/components/forms/Channel.jsx b/frontend/src/components/forms/Channel.jsx
index d40aacf1..b5f18c56 100644
--- a/frontend/src/components/forms/Channel.jsx
+++ b/frontend/src/components/forms/Channel.jsx
@@ -380,7 +380,7 @@ const Channel = ({ channel = null, isOpen, onClose }) => {
-
+
+
+
diff --git a/frontend/src/components/tables/StreamsTable.jsx b/frontend/src/components/tables/StreamsTable.jsx
index 8cc05efa..17567732 100644
--- a/frontend/src/components/tables/StreamsTable.jsx
+++ b/frontend/src/components/tables/StreamsTable.jsx
@@ -652,51 +652,74 @@ const StreamsTable = ({}) => {
}}
>
{/* Top toolbar with Remove, Assign, Auto-match, and Add buttons */}
-
-
- }
- variant="default"
- size="xs"
- onClick={deleteStreams}
- disabled={rowSelection.length === 0}
- >
- Remove
-
+
+
+ {selectedStreamIds.length > 0 && (
+ }
+ variant="light"
+ size="xs"
+ onClick={addStreamsToChannel}
+ p={5}
+ color={theme.tailwind.green[5]}
+ style={{
+ borderWidth: '1px',
+ borderColor: theme.tailwind.green[5],
+ color: 'white',
+ }}
+ >
+ Add Streams to Channel
+
+ )}
+
- }
- variant="default"
- size="xs"
- onClick={createChannelsFromStreams}
- p={5}
- >
- Create Channels
-
+
+
+ }
+ variant="default"
+ size="xs"
+ onClick={deleteStreams}
+ disabled={selectedStreamIds.length == 0}
+ >
+ Remove
+
- }
- variant="light"
- size="xs"
- onClick={() => editStream()}
- p={5}
- color={theme.tailwind.green[5]}
- style={{
- borderWidth: '1px',
- borderColor: theme.tailwind.green[5],
- color: 'white',
- }}
- >
- Add Stream
-
-
-
+ }
+ variant="default"
+ size="xs"
+ onClick={createChannelsFromStreams}
+ p={5}
+ disabled={selectedStreamIds.length == 0}
+ >
+ Create Channels
+
+
+ }
+ variant="light"
+ size="xs"
+ onClick={() => editStream()}
+ p={5}
+ color={theme.tailwind.green[5]}
+ style={{
+ borderWidth: '1px',
+ borderColor: theme.tailwind.green[5],
+ color: 'white',
+ }}
+ >
+ Create Stream
+
+
+
+
{initialDataCount === 0 && (
diff --git a/frontend/src/store/channels.jsx b/frontend/src/store/channels.jsx
index b8ca53b5..b413d6de 100644
--- a/frontend/src/store/channels.jsx
+++ b/frontend/src/store/channels.jsx
@@ -240,7 +240,22 @@ const useChannelsStore = create((set, get) => ({
delete updatedProfiles[id];
}
- return { profiles: updatedProfiles };
+ let additionalUpdates = {};
+ if (profileIds.includes(state.selectedProfileId)) {
+ additionalUpdates = {
+ selectedProfileId: '0',
+ selectedProfileChannels: [],
+ selectedProfile: {},
+ };
+ }
+
+ return {
+ profiles: updatedProfiles,
+ selectedProfileId: profileIds.includes(state.selectedProfileId)
+ ? '0'
+ : state.selectedProfileId,
+ ...additionalUpdates,
+ };
}),
updateProfileChannel: (channelId, profileId, enabled) =>