diff --git a/packages/twenty-chrome-extension/.env.example b/packages/twenty-chrome-extension/.env.example index 4ab48f1d9267..278bc5952ef2 100644 --- a/packages/twenty-chrome-extension/.env.example +++ b/packages/twenty-chrome-extension/.env.example @@ -1,2 +1,2 @@ -VITE_SERVER_BASE_URL=http://localhost:3000 -VITE_FRONT_BASE_URL=http://localhost:3001 \ No newline at end of file +VITE_SERVER_BASE_URL=https://api.twenty.com +VITE_FRONT_BASE_URL=https://app.twenty.com \ No newline at end of file diff --git a/packages/twenty-chrome-extension/README.md b/packages/twenty-chrome-extension/README.md index fbe86fdfa960..749c477ef079 100644 --- a/packages/twenty-chrome-extension/README.md +++ b/packages/twenty-chrome-extension/README.md @@ -5,47 +5,56 @@ This extension allows you to save `company` and `people` information to your twe To install the extension in development mode with hmr (hot module reload), follow these steps. - STEP 1: Clone the repository and run `yarn install` in the root directory. + - STEP 2: Once the dependencies installation succeeds, create a file with env variables by executing the following command in the root directory. ``` cp ./packages/twenty-chrome-extension/.env.example ./packages/twenty-chrome-extension/.env ``` -- STEP 3: Now, execute the following command in the root directory to start up the development server on Port 3002. This will create a `dist` folder in `twenty-chrome-extension`. +- STEP 3 (optional): Update values of the environment variables to match those of your instance for `twenty-front` and `twenty-server`. If you want to work on your local machine with the default setup from `Twenty Docs`, replace everything in the .env file with the following. + +``` +VITE_SERVER_BASE_URL=http://localhost:3000 +VITE_FRONT_BASE_URL=http://localhost:3001 +``` + +- STEP 4: Now, execute the following command in the root directory to start up the development server on Port 3002. This will create a `dist` folder in `twenty-chrome-extension`. ``` yarn nx start twenty-chrome-extension ``` -- STEP 4: Open Google Chrome and head to the extensions page by typing `chrome://extensions` in the address bar. +- STEP 5: Open Google Chrome and head to the extensions page by typing `chrome://extensions` in the address bar.

-- STEP 5: Turn on the `Developer mode` from the top-right corner and click `Load unpacked`. +- STEP 6: Turn on the `Developer mode` from the top-right corner and click `Load unpacked`.

-- STEP 6: Select the `dist` folder from `twenty-chrome-extension`. +- STEP 7: Select the `dist` folder from `twenty-chrome-extension`.

-- STEP 7: This opens up the `options` page, where you must enter your API key. +- STEP 8: This opens up the `options` page, where you must enter your API key.

-- STEP 8: Reload any LinkedIn page that you opened before installing the extension for seamless experience. -- STEP 9: Visit any individual or company profile on LinkedIn and click the `Add to Twenty` button to test. +- STEP 9: Reload any LinkedIn page that you opened before installing the extension for seamless experience. + +- STEP 10: Visit any individual or company profile on LinkedIn and click the `Add to Twenty` button to test.

-To install the extension in production mode without hmr (hot module reload), replace the command in STEP THREE with `yarn nx build twenty-chrome-extension`. +To install the extension in production mode without hmr (hot module reload), replace the command in STEP FOUR with `yarn nx build twenty-chrome-extension`. You may or may not want to execute STEP THREE based on your requirements. \ No newline at end of file diff --git a/packages/twenty-chrome-extension/public/logo/32-32.svg b/packages/twenty-chrome-extension/public/logo/32-32.svg new file mode 100644 index 000000000000..b5f1e311f5b3 --- /dev/null +++ b/packages/twenty-chrome-extension/public/logo/32-32.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/twenty-chrome-extension/src/options/modules/api-key/components/ApiKeyForm.tsx b/packages/twenty-chrome-extension/src/options/modules/api-key/components/ApiKeyForm.tsx index c208d57c694e..88e051972fe4 100644 --- a/packages/twenty-chrome-extension/src/options/modules/api-key/components/ApiKeyForm.tsx +++ b/packages/twenty-chrome-extension/src/options/modules/api-key/components/ApiKeyForm.tsx @@ -65,6 +65,7 @@ export const ApiKeyForm = () => { } if (localStorage.serverBaseUrl) { + setShowSection(true); setRoute(localStorage.serverBaseUrl); } }; @@ -77,7 +78,11 @@ export const ApiKeyForm = () => { }, [apiKey]); useEffect(() => { - chrome.storage.local.set({ serverBaseUrl: route }); + if (import.meta.env.VITE_SERVER_BASE_URL !== route) { + chrome.storage.local.set({ serverBaseUrl: route }); + } else { + chrome.storage.local.set({ serverBaseUrl: '' }); + } }, [route]); const handleGenerateClick = () => { @@ -93,7 +98,7 @@ export const ApiKeyForm = () => { return ( - + diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/animation.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/animation.ts deleted file mode 100644 index 865d43b2b9a9..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/animation.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const ANIMATION = { - duration: { - instant: 0.075, - fast: 0.15, - normal: 0.3, - }, -}; - -export type AnimationDuration = 'instant' | 'fast' | 'normal'; diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/blur.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/blur.ts deleted file mode 100644 index 01f2651473e1..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/blur.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const BLUR = { - light: 'blur(6px)', - strong: 'blur(20px)', -}; diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/colors.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/colors.ts deleted file mode 100644 index 022a67b707a9..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/colors.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MAIN_COLORS } from '@/ui/theme/constants/MainColors'; -import { SECONDARY_COLORS } from '@/ui/theme/constants/SecondaryColors'; - -export const COLOR = { - ...MAIN_COLORS, - ...SECONDARY_COLORS, -}; diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/icon.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/icon.ts deleted file mode 100644 index e103c0b8ec3f..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/icon.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const ICON = { - size: { - sm: 14, - md: 16, - lg: 20, - xl: 40, - }, - stroke: { - sm: 1.6, - md: 2, - lg: 2.5, - }, -}; diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/modal.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/modal.ts deleted file mode 100644 index 2a53265cc00e..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/modal.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const MODAL = { - size: { - sm: '300px', - md: '400px', - lg: '53%', - }, -}; diff --git a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/text.ts b/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/text.ts deleted file mode 100644 index db9a0786b766..000000000000 --- a/packages/twenty-chrome-extension/src/options/modules/ui/theme/constants/text.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const TEXT = { - lineHeight: { - lg: 1.5, - md: 1.2, - }, - - iconSizeMedium: 16, - iconSizeSmall: 14, - - iconStrikeLight: 1.6, - iconStrikeMedium: 2, - iconStrikeBold: 2.5, -};