-
- {!props.standalone ? (
-
- ) : (
-
- )}
-
- {!props.standalone ? (
-
- ) : (
-
- )}
-
-
- {t(
- 'select_or_upload_pictures_maximum_5_at_a_time',
- 'Select or upload pictures (maximum 5 at a time)'
- )}
-
- {t(
- 'you_can_also_drag_drop_pictures',
- 'You can also drag & drop pictures'
- )}
-
-
- {!!mediaList.length && (
- <>
-
- >
- )}
+
+
+
+ {!isLoading && !!data?.results?.length && (
+
+ Select or upload pictures (maximum 5 at a time).{'\n'}
+ You can also drag & drop pictures.
-
- {!mediaList.length ? (
-
-
- {t(
- 'you_don_t_have_any_assets_yet',
- "You don't have any assets yet."
- )}
-
-
- {t(
- 'click_the_button_below_to_upload_one',
- 'Click the button below to upload one'
- )}
-
-
-
-
+ )}
+
+ {!isLoading && !!data?.results?.length && btn}
+
+
+
+
+ {!isLoading && !data?.results?.length && (
+ <>
+
+
+ You don't have any media yet
- ) : (
- <>
- {selectedMedia.length > 0 && (
-
-
-
- )}
- >
- )}
- {mediaList
- .filter((f) => {
- if (type === 'video') {
- return f.path.indexOf('mp4') > -1;
- } else if (type === 'image') {
- return f.path.indexOf('mp4') === -1;
- }
- return true;
- })
- .map((media) => (
+
+ Select or upload pictures (maximum 5 at a time). {'\n'}
+ You can also drag & drop pictures.
+
+
{btn}
+ >
+ )}
+ {isLoading && (
+ <>
+ {[...new Array(16)].map((_, i) => (
p.id === media.id)
- ? 'border-4 border-forth'
- : 'border-tableBorder border-2'
+ 'px-[3px] py-[3px] float-left rounded-[6px] cursor-pointer w8-max aspect-square'
)}
- onClick={props.standalone ? () => {} : setNewMedia(media)}
+ key={i}
>
-
- X
-
-
- {media.path.indexOf('mp4') > -1 ? (
-
- ) : (
-
- )}
+
))}
-
- {(pages || 0) > 1 && (
-
+ >
+ )}
+ {data?.results
+ ?.filter((f: any) => {
+ if (type === 'video') {
+ return f.path.indexOf('mp4') > -1;
+ } else if (type === 'image') {
+ return f.path.indexOf('mp4') === -1;
+ }
+ return true;
+ })
+ .map((media: any) => (
+
+
p.id === media.id)
+ ? 'border-[#612BD3]'
+ : 'border-transparent'
+ )}
+ onClick={addRemoveSelected(media)}
+ >
+ {!!selected.find((p: any) => p.id === media.id) ? (
+
+ {selected.findIndex((z: any) => z.id === media.id) + 1}
+
+ ) : (
+
+ )}
+
+ {media.path.indexOf('mp4') > -1 ? (
+
+ ) : (
+
})
+ )}
+
+
+
+ ))}
+
+
+ {(data?.pages || 0) > 1 && (
+
+ )}
+ {!standalone && (
+
+
+ {!isLoading && !!data?.results?.length && (
+
)}
-
+ )}
-
+
);
};
export const MultiMediaComponent: FC<{
@@ -543,6 +569,8 @@ export const MultiMediaComponent: FC<{
error?: any;
onOpen?: () => void;
onClose?: () => void;
+ toolBar?: React.ReactNode;
+ information?: React.ReactNode;
onChange: (event: {
target: {
name: string;
@@ -557,8 +585,6 @@ export const MultiMediaComponent: FC<{
}) => void;
}> = (props) => {
const {
- onOpen,
- onClose,
name,
error,
text,
@@ -566,6 +592,8 @@ export const MultiMediaComponent: FC<{
value,
allData,
dummy,
+ toolBar,
+ information,
} = props;
const user = useUser();
const modals = useModals();
@@ -574,7 +602,7 @@ export const MultiMediaComponent: FC<{
setCurrentMedia(value);
}
}, [value]);
- const [mediaModal, setMediaModal] = useState(false);
+
const [currentMedia, setCurrentMedia] = useState(value);
const mediaDirectory = useMediaDirectory();
const changeMedia = useCallback(
@@ -603,7 +631,12 @@ export const MultiMediaComponent: FC<{
);
const showModal = useCallback(() => {
modals.openModal({
+ title: 'Media Library',
askClose: false,
+ closeOnEscape: true,
+ fullScreen: true,
+ size: 'calc(100% - 80px)',
+ height: 'calc(100% - 80px)',
children: (close) => (
),
@@ -637,40 +670,12 @@ export const MultiMediaComponent: FC<{
}
}, [changeMedia]);
- const mediaSettings = useMediaSettings();
-
const t = useT();
return (
<>
-
-
-
-
+
+
{!!currentMedia && (
{currentMedia.map((media, index) => (
-
-
- ::
-
+
+
{
- console.log(value);
onChange({
target: {
name: 'upload',
@@ -719,7 +740,7 @@ export const MultiMediaComponent: FC<{
),
});
}}
- className="absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] bg-black/80 rounded-[10px] opacity-0 group-hover:opacity-100 transition-opacity z-[100]"
+ className="absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] bg-black/80 rounded-[10px] opacity-0 group-hover:opacity-100 transition-opacity z-[9]"
>
)}
-
- x
-
+
+
))}
@@ -757,32 +787,76 @@ export const MultiMediaComponent: FC<{
)}
{!dummy && (
-
-
-
diff --git a/apps/frontend/src/components/media/new.uploader.tsx b/apps/frontend/src/components/media/new.uploader.tsx
index febe58fe..be292f37 100644
--- a/apps/frontend/src/components/media/new.uploader.tsx
+++ b/apps/frontend/src/components/media/new.uploader.tsx
@@ -116,7 +116,8 @@ export function useUppyUploader(props: {
uppy2.log(error.message, 'error');
uppy2.info(error.message, 'error', 5000);
toast.show(
- `File type "${fileType}" is not allowed. Allowed types: ${allowedFileTypes}`
+ `File type "${fileType}" is not allowed. Allowed types: ${allowedFileTypes}`,
+ 'warning'
);
uppy2.removeFile(file.id);
return reject(error);
@@ -197,6 +198,7 @@ export function useUppyUploader(props: {
});
});
uppy2.on('error', (result) => {
+ uppy2.clear();
setLocked(false);
});
uppy2.on('complete', async (result) => {
diff --git a/apps/frontend/src/components/new-launch/a.component.tsx b/apps/frontend/src/components/new-launch/a.component.tsx
index 10e6802f..16f65ab2 100644
--- a/apps/frontend/src/components/new-launch/a.component.tsx
+++ b/apps/frontend/src/components/new-launch/a.component.tsx
@@ -24,27 +24,43 @@ export const AComponent: FC<{
// update link
try {
- editor?.chain()?.focus()?.extendMarkRange('link')?.setLink({ href: url })?.run();
- } catch (e) {
- }
+ editor
+ ?.chain()
+ ?.focus()
+ ?.extendMarkRange('link')
+ ?.setLink({ href: url })
+ ?.run();
+ } catch (e) {}
editor?.commands?.focus();
};
return (
);
diff --git a/apps/frontend/src/components/new-launch/add.edit.modal.tsx b/apps/frontend/src/components/new-launch/add.edit.modal.tsx
index 1c01faae..961d5c43 100644
--- a/apps/frontend/src/components/new-launch/add.edit.modal.tsx
+++ b/apps/frontend/src/components/new-launch/add.edit.modal.tsx
@@ -128,7 +128,7 @@ export const AddEditModalInnerInner: FC
= (props) => {
internal: state.internal,
setTags: state.setTags,
setEditor: state.setEditor,
- setRepeater: state.setRepeater
+ setRepeater: state.setRepeater,
}))
);
@@ -161,8 +161,7 @@ export const AddEditModalInnerInner: FC = (props) => {
}))
);
setCurrent(existingData.integration);
- }
- else {
+ } else {
setEditor('normal');
}
@@ -212,5 +211,12 @@ export const AddEditModalInnerInner: FC = (props) => {
return null;
}
- return ;
+ return (
+ <>
+
+
+ >
+ );
};
diff --git a/apps/frontend/src/components/new-launch/add.post.button.tsx b/apps/frontend/src/components/new-launch/add.post.button.tsx
index 1a2ca5b7..c43c991e 100644
--- a/apps/frontend/src/components/new-launch/add.post.button.tsx
+++ b/apps/frontend/src/components/new-launch/add.post.button.tsx
@@ -13,22 +13,25 @@ export const AddPostButton: FC<{
const t = useT();
return (
-
-
+
);
};
diff --git a/apps/frontend/src/components/new-launch/bold.text.tsx b/apps/frontend/src/components/new-launch/bold.text.tsx
index d0478a81..76ef1d80 100644
--- a/apps/frontend/src/components/new-launch/bold.text.tsx
+++ b/apps/frontend/src/components/new-launch/bold.text.tsx
@@ -81,32 +81,25 @@ export const BoldText: FC<{
};
return (
);
diff --git a/apps/frontend/src/components/new-launch/bullets.component.tsx b/apps/frontend/src/components/new-launch/bullets.component.tsx
index 454162e1..24cb3344 100644
--- a/apps/frontend/src/components/new-launch/bullets.component.tsx
+++ b/apps/frontend/src/components/new-launch/bullets.component.tsx
@@ -11,19 +11,24 @@ export const Bullets: FC<{
};
return (
diff --git a/apps/frontend/src/components/new-launch/editor.tsx b/apps/frontend/src/components/new-launch/editor.tsx
index 6d6c9b09..eb9e51a0 100644
--- a/apps/frontend/src/components/new-launch/editor.tsx
+++ b/apps/frontend/src/components/new-launch/editor.tsx
@@ -58,7 +58,8 @@ import Mention from '@tiptap/extension-mention';
import { suggestion } from '@gitroom/frontend/components/new-launch/mention.component';
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
import { AComponent } from '@gitroom/frontend/components/new-launch/a.component';
-import { capitalize } from 'lodash';
+import { Placeholder } from '@tiptap/extensions';
+import { InformationComponent } from '@gitroom/frontend/components/launches/information.component';
const InterceptBoldShortcut = Extension.create({
name: 'preventBoldWithUnderline',
@@ -91,7 +92,7 @@ const InterceptUnderlineShortcut = Extension.create({
export const EditorWrapper: FC<{
totalPosts: number;
value: string;
-}> = (props) => {
+}> = () => {
const {
setGlobalValueText,
setInternalValueText,
@@ -278,6 +279,12 @@ export const EditorWrapper: FC<{
const addValue = useCallback(
(index: number) => () => {
+ setTimeout(() => {
+ // scroll the the bottom
+ document.querySelector('#social-content').scrollTo({
+ top: document.querySelector('#social-content').scrollHeight,
+ });
+ }, 20);
if (internal) {
return addInternalValue(index, current, [
{
@@ -326,30 +333,116 @@ export const EditorWrapper: FC<{
}
return (
-
+
+ {isCreateSet && current !== 'global' && (
+ <>
+
+
+
+ You can't edit networks when creating a set
+
+
+
+ >
+ )}
+ {!canEdit && !isCreateSet && (
+ <>
+
{
+ setLoaded(false);
+ addRemoveInternal(current);
+ }}
+ className="text-center absolute w-full h-full left-0 top-0 items-center justify-center flex z-[101] flex-col gap-[16px]"
+ >
+
+
+ Click this button to exit global editing
+
+ and customize the post for this channel
+
+
+
+
+ >
+ )}
{items.map((g, index) => (
-
- {!canEdit && !isCreateSet && (
-
{
- if (index !== 0) {
- return;
- }
-
- setLoaded(false);
- addRemoveInternal(current);
- }}
- className="select-none cursor-pointer absolute w-full h-full left-0 top-0 bg-red-600/10 z-[100]"
- >
- {index === 0 && (
-
- Edit
+
+
+
- )}
-
-
- {canEdit ? (
-
- ) : (
-
- )}
+ {canEdit && items.length - 1 === index ? (
+
+
+ {!!internal && !existingData?.integration && (
+
+
+
+
+ Editing a Specific Network
+
+
+
+
+ )}
+
+ ) : null}
>
}
/>
-
+
- {index === 0 &&
- current !== 'global' &&
- canEdit &&
- !existingData.integration && (
-
- )}
{items.length > 1 && (
)}
@@ -528,64 +640,47 @@ export const Editor: FC<{
[props.value, id]
);
+ const [loadedEditor, setLoadedEditor] = useState(editorType);
+ const [showEditor, setShowEditor] = useState(true);
+ useEffect(() => {
+ if (editorType === loadedEditor) {
+ return;
+ }
+ setLoadedEditor(editorType);
+ setShowEditor(false);
+ }, [editorType]);
+
+ useEffect(() => {
+ if (showEditor) {
+ return;
+ }
+ setTimeout(() => {
+ setShowEditor(true);
+ }, 20);
+ }, [showEditor]);
+
+ if (!showEditor) {
+ return null;
+ }
+
return (
-
-
-
-
-
-
- {(editorType === 'markdown' || editorType === 'html') &&
- identifier !== 'telegram' && (
- <>
-
-
-
- >
- )}
-
setEmojiPickerOpen(!emojiPickerOpen)}
- >
- {'\uD83D\uDE00'}
-
-
-
- {
- addText(e.emoji);
- setEmojiPickerOpen(false);
- }}
- open={emojiPickerOpen}
- />
-
-
-
-
- {validateChars &&
- props.value.length === 0 &&
- pictures?.length === 0 && (
-
- Your post should have at least one character or one image.
-
- )}
-
+
+
0 && '!rounded-bs-[0]'
+ )}
+ id={id}
+ >
+
+ {/*{validateChars &&*/}
+ {/* props.value.length === 0 &&*/}
+ {/* pictures?.length === 0 && (*/}
+ {/*
*/}
+ {/* Your post should have at least one character or one image.*/}
+ {/*
*/}
+ {/* )}*/}
+
Drop your files here to upload
-
+
-
{
if (editorRef?.current?.editor?.isFocused) {
return;
}
editorRef?.current?.editor?.commands?.focus('end');
}}
- >
-
+ />
+
-
{
if (editorRef?.current?.editor?.isFocused) {
return;
}
editorRef?.current?.editor?.commands?.focus('end');
}}
- >
+ />
+
{setImages && (
0}
+ chars={chars}
+ totalChars={valueWithoutHtml.length}
+ totalAllowedChars={props.totalChars}
+ />
+ }
+ toolBar={
+
+
+
+
+ {(editorType === 'markdown' || editorType === 'html') &&
+ identifier !== 'telegram' && (
+ <>
+
+
+
+ >
+ )}
+
setEmojiPickerOpen(!emojiPickerOpen)}
+ >
+
+
+
+
1
+ ? 'top-[35px]'
+ : 'bottom-[35px]'
+ )}
+ >
+ {
+ addText(e.emoji);
+ setEmojiPickerOpen(false);
+ }}
+ open={emojiPickerOpen}
+ />
+
+
+
+ }
onChange={(value) => {
setImages(value.target.value);
}}
@@ -652,52 +855,52 @@ export const Editor: FC<{
/>
)}
+
{childButton}
-
-
{childButton}
-
- {(props?.totalChars || 0) > 0 ? (
-
props.totalChars && '!text-red-500'
- )}
- >
- {valueWithoutHtml.length}/{props.totalChars}
-
- ) : (
-
- {selectedIntegration?.map((p) => (
-
- chars?.[p.integration.id] &&
- '!text-red-500'
- }
- >
- {p.integration.name} ({capitalize(p.integration.identifier)}
- ):
-
- chars?.[p.integration.id] &&
- '!text-red-500'
- }
- >
- {valueWithoutHtml.length}/{chars?.[p.integration.id]}
-
-
- ))}
-
- )}
-
-
+ {/*
*/}
+ {/*
*/}
+ {/* {(props?.totalChars || 0) > 0 ? (*/}
+ {/*
props.totalChars && '!text-red-500'*/}
+ {/* )}*/}
+ {/* >*/}
+ {/* {valueWithoutHtml.length}/{props.totalChars}*/}
+ {/*
*/}
+ {/* ) : (*/}
+ {/*
*/}
+ {/* {selectedIntegration?.map((p) => (*/}
+ {/*
*/}
+ {/* chars?.[p.integration.id] &&*/}
+ {/* '!text-red-500'*/}
+ {/* }*/}
+ {/* >*/}
+ {/* {p.integration.name} ({capitalize(p.integration.identifier)}*/}
+ {/* ):*/}
+ {/*
*/}
+ {/* chars?.[p.integration.id] &&*/}
+ {/* '!text-red-500'*/}
+ {/* }*/}
+ {/* >*/}
+ {/* {valueWithoutHtml.length}/{chars?.[p.integration.id]}*/}
+ {/*
*/}
+ {/* */}
+ {/* ))}*/}
+ {/*
*/}
+ {/* )}*/}
+ {/*
*/}
+ {/*
*/}
);
};
@@ -712,6 +915,7 @@ export const OnlyEditor = forwardRef<
}
>(({ editorType, value, onChange, paste }, ref) => {
const fetch = useFetch();
+
const { internal } = useLaunchStore(
useShallow((state) => ({
internal: state.internal.find((p) => p.integration.id === state.current),
@@ -759,6 +963,10 @@ export const OnlyEditor = forwardRef<
InterceptUnderlineShortcut,
BulletList,
ListItem,
+ Placeholder.configure({
+ placeholder: 'Write something …',
+ emptyEditorClass: 'is-editor-empty',
+ }),
...(editorType === 'html' || editorType === 'markdown'
? [
Link.configure({
diff --git a/apps/frontend/src/components/new-launch/heading.component.tsx b/apps/frontend/src/components/new-launch/heading.component.tsx
index 26985fe0..99ba129c 100644
--- a/apps/frontend/src/components/new-launch/heading.component.tsx
+++ b/apps/frontend/src/components/new-launch/heading.component.tsx
@@ -13,20 +13,27 @@ export const HeadingComponent: FC<{
};
return (
-
+
-
+
-
>
);
diff --git a/apps/frontend/src/components/new-launch/picks.socials.component.tsx b/apps/frontend/src/components/new-launch/picks.socials.component.tsx
index c966a177..6451ea66 100644
--- a/apps/frontend/src/components/new-launch/picks.socials.component.tsx
+++ b/apps/frontend/src/components/new-launch/picks.socials.component.tsx
@@ -6,6 +6,7 @@ import Image from 'next/image';
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
import { useShallow } from 'zustand/react/shallow';
import { useExistingData } from '@gitroom/frontend/components/launches/helpers/use.existing.data';
+import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
toolTip,
@@ -26,13 +27,13 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
}))
);
+
return (
-
-
-
- {integrations
- .filter((f) => {
+
+
+
+ {integrations.filter((f) => {
if (exising.integration) {
return f.id === exising.integration;
}
@@ -55,34 +56,41 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
addOrRemoveSelectedIntegration(integration, {});
}}
className={clsx(
- 'cursor-pointer relative w-[34px] h-[34px] rounded-full flex justify-center items-center bg-fifth filter transition-all duration-500',
+ 'cursor-pointer border-[1.5px] relative rounded-full flex justify-center items-center bg-fifth filter transition-all duration-500',
selectedIntegrations.findIndex(
(p) => p.integration.id === integration.id
) === -1
- ? 'opacity-40'
- : ''
+ ? 'grayscale border-transparent'
+ : 'border-[#622FF6]'
)}
>
p.integration.id === integration.id
+ ) === -1
+ ? 'border-transparent'
+ : 'border-[#000]'
+ )}
alt={integration.identifier}
- width={32}
- height={32}
+ width={42}
+ height={42}
/>
{integration.identifier === 'youtube' ? (
) : (
)}
diff --git a/apps/frontend/src/components/new-launch/providers/high.order.provider.tsx b/apps/frontend/src/components/new-launch/providers/high.order.provider.tsx
index eb888169..82bf421e 100644
--- a/apps/frontend/src/components/new-launch/providers/high.order.provider.tsx
+++ b/apps/frontend/src/components/new-launch/providers/high.order.provider.tsx
@@ -22,6 +22,7 @@ import useSWR from 'swr';
import { InternalChannels } from '@gitroom/frontend/components/launches/internal.channels';
import { capitalize } from 'lodash';
import clsx from 'clsx';
+import { createPortal } from 'react-dom';
class Empty {
@IsOptional()
@@ -255,40 +256,6 @@ export const withProvider = function
(params: {
>
-
-
-
setTab(0)}
- className={clsx(
- 'cursor-pointer rounded-[4px] flex-1 overflow-hidden whitespace-nowrap text-center pt-[6px] pb-[5px]',
- tab !== 0 && !!SettingsComponent
- ? ''
- : 'text-textItemFocused bg-boxFocused'
- )}
- >
- {t('preview', 'Preview')}
-
-
- {current &&
- (!!SettingsComponent || !!data?.internalPlugs?.length) && (
-
-
setTab(1)}
- className={clsx(
- 'cursor-pointer rounded-[4px] flex-1 overflow-hidden whitespace-nowrap text-center pt-[6px] pb-[5px]',
- tab !== 1 ? '' : 'text-textItemFocused bg-boxFocused'
- )}
- >
- {t('settings', 'Settings')} (
- {capitalize(
- selectedIntegration.integration.identifier.split('-')[0]
- )}
- )
-
-
- )}
-
-
{current &&
(tab === 0 ||
(!SettingsComponent && !data?.internalPlugs?.length)) &&
@@ -331,14 +298,22 @@ export const withProvider = function
(params: {
}
/>
))}
- {(SettingsComponent || !!data?.internalPlugs?.length) && (
-
-
- {!!data?.internalPlugs?.length && !dummy && (
-
- )}
-
- )}
+ {(SettingsComponent || !!data?.internalPlugs?.length) &&
+ createPortal(
+
+
+ {!!data?.internalPlugs?.length && !dummy && (
+
+ )}
+
,
+ document.querySelector('#social-settings') || document.createElement('div')
+ )}
+ {current &&
+ !SettingsComponent &&
+ createPortal(
+ ,
+ document.querySelector('#social-settings')!
+ )}
diff --git a/apps/frontend/src/components/new-launch/providers/show.all.providers.tsx b/apps/frontend/src/components/new-launch/providers/show.all.providers.tsx
index 187a9657..6afe1533 100644
--- a/apps/frontend/src/components/new-launch/providers/show.all.providers.tsx
+++ b/apps/frontend/src/components/new-launch/providers/show.all.providers.tsx
@@ -192,13 +192,6 @@ export const ShowAllProviders = forwardRef((props, ref) => {
})),
}}
>
-
-
-
- {t('preview', 'Preview')}
-
-
-
{global?.[0]?.content?.length === 0 ? (
{t(
diff --git a/apps/frontend/src/components/new-launch/select.current.tsx b/apps/frontend/src/components/new-launch/select.current.tsx
index 8222939c..53350bbe 100644
--- a/apps/frontend/src/components/new-launch/select.current.tsx
+++ b/apps/frontend/src/components/new-launch/select.current.tsx
@@ -1,12 +1,6 @@
'use client';
-import {
- FC,
- RefObject,
- useEffect,
- useRef,
- useState,
-} from 'react';
+import { FC, RefObject, useEffect, useRef, useState } from 'react';
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
import clsx from 'clsx';
import Image from 'next/image';
@@ -72,11 +66,11 @@ export const SelectCurrent: FC = () => {
return (
<>
-
+
@@ -85,19 +79,27 @@ export const SelectCurrent: FC = () => {
setHide(true);
setCurrent('global');
}}
- className="cursor-pointer flex gap-[8px] items-center bg-newBgLineColor p-[10px] rounded-tl-[4px] rounded-tr-[4px]"
+ className={clsx(
+ 'cursor-pointer flex gap-[8px] rounded-[8px] w-[40px] h-[40px] justify-center items-center bg-newBgLineColor',
+ current !== 'global'
+ ? 'text-[#A3A3A3]'
+ : 'border border-[#FC69FF] text-[#FC69FF]'
+ )}
>
-
+
@@ -109,34 +111,39 @@ export const SelectCurrent: FC = () => {
setCurrent(integration.id);
}}
key={integration.id}
- className="cursor-pointer flex gap-[8px] items-center bg-newBgLineColor p-[10px] rounded-tl-[4px] rounded-tr-[4px]"
+ className={clsx(
+ 'border cursor-pointer relative flex gap-[8px] w-[40px] h-[40px] rounded-[8px] items-center bg-newBgLineColor justify-center',
+ current === integration.id
+ ? 'border-[#FC69FF] text-[#FC69FF]'
+ : 'border-transparent'
+ )}
>
+
{integration.identifier === 'youtube' ? (

) : (
)}
@@ -148,3 +155,24 @@ export const SelectCurrent: FC = () => {
>
);
};
+
+export const IsGlobal: FC<{ id: string }> = ({ id }) => {
+ const { isInternal } =
+ useLaunchStore(
+ useShallow((state) => ({
+ isInternal: !!state.internal.find(p => p.integration.id === id),
+ }))
+ );
+
+ if (!isInternal) {
+ return null;
+ }
+
+ return (
+
+ );
+};
diff --git a/apps/frontend/src/components/new-launch/u.text.tsx b/apps/frontend/src/components/new-launch/u.text.tsx
index 3c0315a0..a03d392b 100644
--- a/apps/frontend/src/components/new-launch/u.text.tsx
+++ b/apps/frontend/src/components/new-launch/u.text.tsx
@@ -81,36 +81,25 @@ export const UText: FC<{
};
return (
);
diff --git a/apps/frontend/src/components/new-layout/layout.component.tsx b/apps/frontend/src/components/new-layout/layout.component.tsx
index d34db3aa..dcfc7d37 100644
--- a/apps/frontend/src/components/new-layout/layout.component.tsx
+++ b/apps/frontend/src/components/new-layout/layout.component.tsx
@@ -35,7 +35,6 @@ import { TopMenu } from '@gitroom/frontend/components/layout/top.menu';
import { LanguageComponent } from '@gitroom/frontend/components/layout/language.component';
import { ChromeExtensionComponent } from '@gitroom/frontend/components/layout/chrome.extension.component';
import NotificationComponent from '@gitroom/frontend/components/notifications/notification.component';
-import { BillingAfter } from '@gitroom/frontend/components/new-layout/billing.after';
import { OrganizationSelector } from '@gitroom/frontend/components/layout/organization.selector';
import { PreConditionComponent } from '@gitroom/frontend/components/layout/pre-condition.component';
import { AttachToFeedbackIcon } from '@gitroom/frontend/components/new-layout/sentry.feedback.component';
diff --git a/apps/frontend/src/components/sets/sets.tsx b/apps/frontend/src/components/sets/sets.tsx
index df07d7e2..a37ae809 100644
--- a/apps/frontend/src/components/sets/sets.tsx
+++ b/apps/frontend/src/components/sets/sets.tsx
@@ -94,10 +94,13 @@ export const Sets: FC = () => {
(params?: { id?: string; name?: string; content?: string }) => () => {
modal.openModal({
closeOnClickOutside: false,
+ removeLayout: true,
closeOnEscape: false,
withCloseButton: false,
- removeLayout: true,
- askClose: true,
+ fullScreen: true,
+ classNames: {
+ modal: 'w-[100%] max-w-[1400px] text-textColor',
+ },
id: 'add-edit-modal',
children: (
{
modals.openModal({
title: 'Add Signature',
+ withCloseButton: true,
children: (close) => (
),
@@ -23,18 +24,36 @@ export const SignatureBox: FC<{
<>
>
@@ -45,11 +64,5 @@ export const SignatureModal: FC<{
appendSignature: (sign: string) => void;
}> = (props) => {
const { appendSignature } = props;
- return (
-
- );
+ return ;
};
diff --git a/apps/frontend/src/components/third-parties/third-party.media.tsx b/apps/frontend/src/components/third-parties/third-party.media.tsx
index 2729607c..59917fec 100644
--- a/apps/frontend/src/components/third-parties/third-party.media.tsx
+++ b/apps/frontend/src/components/third-parties/third-party.media.tsx
@@ -182,9 +182,9 @@ export const ThirdPartyMedia: FC<{
return (
<>
-
>
);
diff --git a/apps/frontend/tailwind.config.js b/apps/frontend/tailwind.config.js
index e5c3f7e9..15e6a72b 100644
--- a/apps/frontend/tailwind.config.js
+++ b/apps/frontend/tailwind.config.js
@@ -74,6 +74,9 @@ module.exports = {
modalCustom: 'var(--color-modalCustom)',
newBgColor: 'var(--new-bgColor)',
+ newBackdrop: 'var(--new-back-drop)',
+ newSep: 'var(--new-sep)',
+ newBorder: 'var(--new-border)',
newBgColorInner: 'var(--new-bgColorInner)',
newBgLineColor: 'var(--new-bgLineColor)',
textItemFocused: 'var(--new-textItemFocused)',
@@ -91,6 +94,7 @@ module.exports = {
newTableText: 'var(--new-table-text)',
newTableTextFocused: 'var(--new-table-text-focused)',
newColColor: 'var(--new-col-color)',
+ newSettings: 'var(--new-settings)',
menuDots: 'var(--new-menu-dots)',
menuDotsHover: 'var(--new-menu-hover)',
bigStrip: 'var(--new-big-strips)',
@@ -223,6 +227,12 @@ module.exports = {
},
}),
screens: {
+ iconBreak: {
+ raw: '(max-width: 1560px)',
+ },
+ maxMedia: {
+ raw: '(max-width: 1400px)',
+ },
custom: {
raw: '(max-height: 800px)',
},
diff --git a/libraries/nestjs-libraries/src/database/prisma/media/media.repository.ts b/libraries/nestjs-libraries/src/database/prisma/media/media.repository.ts
index 572d1dfd..4c1d3e0b 100644
--- a/libraries/nestjs-libraries/src/database/prisma/media/media.repository.ts
+++ b/libraries/nestjs-libraries/src/database/prisma/media/media.repository.ts
@@ -78,10 +78,7 @@ export class MediaRepository {
},
},
};
- const pages =
- pageNum === 0
- ? Math.ceil((await this._media.model.media.count(query)) / 28)
- : 0;
+ const pages = Math.ceil((await this._media.model.media.count(query)) / 18);
const results = await this._media.model.media.findMany({
where: {
organizationId: org,
@@ -98,8 +95,8 @@ export class MediaRepository {
alt: true,
thumbnailTimestamp: true,
},
- skip: pageNum * 28,
- take: 28,
+ skip: pageNum * 18,
+ take: 18,
});
return {