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 (