Merge remote-tracking branch 'origin/main' into feat/translodit
This commit is contained in:
commit
57e46b10f4
|
|
@ -201,7 +201,8 @@ export const EditorWrapper: FC<{
|
|||
const goBackToGlobal = useCallback(async () => {
|
||||
if (
|
||||
await deleteDialog(
|
||||
'This action is irreversible. Are you sure you want to go back to global mode?'
|
||||
'This action is irreversible. Are you sure you want to go back to global mode?',
|
||||
'Yes, go back to global mode',
|
||||
)
|
||||
) {
|
||||
setLoaded(false);
|
||||
|
|
|
|||
|
|
@ -346,10 +346,12 @@ export const ManageModal: FC<AddEditModalProps> = (props) => {
|
|||
<Button
|
||||
className="rounded-[4px] relative group"
|
||||
disabled={selectedIntegrations.length === 0 || loading}
|
||||
onClick={schedule('schedule')}
|
||||
>
|
||||
<div className="flex justify-center items-center gap-[5px] h-full">
|
||||
<div className="h-full flex items-center text-white">
|
||||
<div
|
||||
className="h-full flex items-center text-white"
|
||||
onClick={schedule('schedule')}
|
||||
>
|
||||
{selectedIntegrations.length === 0
|
||||
? t(
|
||||
'select_channels_from_circles',
|
||||
|
|
|
|||
|
|
@ -139,14 +139,17 @@ export const useLaunchStore = create<StoreState>()((set) => ({
|
|||
settings: any
|
||||
) => {
|
||||
set((state) => {
|
||||
const existingIndex = state.selectedIntegrations.findIndex(
|
||||
const existing = state.selectedIntegrations.find(
|
||||
(i) => i.integration.id === integration.id
|
||||
);
|
||||
|
||||
if (existingIndex > -1) {
|
||||
if (existing) {
|
||||
return {
|
||||
...(existing.integration.id === state.current
|
||||
? { current: 'global' }
|
||||
: {}),
|
||||
selectedIntegrations: state.selectedIntegrations.filter(
|
||||
(_, index) => index !== existingIndex
|
||||
(s, index) => s.integration.id !== existing.integration.id
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue