Merge remote-tracking branch 'origin/main' into feat/translodit

This commit is contained in:
Nevo David 2025-06-28 17:03:36 +07:00
commit 57e46b10f4
3 changed files with 12 additions and 6 deletions

View File

@ -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);

View File

@ -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',

View File

@ -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
),
};
}